JPH0535493A - General reverse-assembler processing system for assembler - Google Patents

General reverse-assembler processing system for assembler

Info

Publication number
JPH0535493A
JPH0535493A JP20715191A JP20715191A JPH0535493A JP H0535493 A JPH0535493 A JP H0535493A JP 20715191 A JP20715191 A JP 20715191A JP 20715191 A JP20715191 A JP 20715191A JP H0535493 A JPH0535493 A JP H0535493A
Authority
JP
Japan
Prior art keywords
assembler
data
operand
load module
cpu
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP20715191A
Other languages
Japanese (ja)
Inventor
Koji Inazaki
弘次 稲崎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Software Kansai Ltd
Original Assignee
NEC Software Kansai Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Software Kansai Ltd filed Critical NEC Software Kansai Ltd
Priority to JP20715191A priority Critical patent/JPH0535493A/en
Publication of JPH0535493A publication Critical patent/JPH0535493A/en
Pending legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)
  • Stored Programmes (AREA)

Abstract

PURPOSE:To reduce the number of reverse-assembler programs by attaining a general reverse-assembler processing. CONSTITUTION:This system has a load module data reading means 2 which reads data from a load module file 1, CPU information table expanding means 8 which expands information concerned with a CPU a table, command code retrieving means 3 which decides a command code from a CPU information table 9 by using the load module data as a key, operand assembly means 4 which assembles assemble data by inserting actual data into an operand, and assembler data writing means 5 which writes the assembler data in an assembler source file 6.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、電子計算機におけるア
センブラの汎用的な逆アセンブラ処理方式に関するもの
である。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a general-purpose disassembler processing system for an assembler in an electronic computer.

【0002】[0002]

【従来の技術】従来、電子計算機における逆アセンブラ
を行う方式として、各CPU毎に専用の逆アセンブラを
行うプログラムを開発し使用していた。しかし、これで
は何百種類もあるCPU毎に逆アセンブラプログラムを
開発しなければならなかった。
2. Description of the Related Art Conventionally, as a method for performing disassembler in an electronic computer, a program for executing a dedicated disassembler for each CPU has been developed and used. However, in this case, it was necessary to develop a disassembler program for each of hundreds of CPUs.

【0003】[0003]

【発明が解決しようとする課題】従来のアセンブラにお
ける逆アセンブラ処理方式は、何百種類もあるCPU毎
に逆アセンブラプログラムを開発し直さなければならず
それに費やす開発費用が膨大になるという課題がある。
The disassembler processing method in the conventional assembler has the problem that the disassembler program must be redeveloped for each of the hundreds of CPUs, and the development cost consumed for it becomes enormous. ..

【0004】本発明の目的は上述の課題を解消するため
に逆アセンブラプログラムの開発工数を大巾に削減する
アセンブラにおける汎用逆アセンブラ処理方式を提供す
ることである。
It is an object of the present invention to provide a general-purpose disassembler processing method in an assembler that significantly reduces the development man-hours of a disassembler program in order to solve the above problems.

【0005】[0005]

【課題を解決するための手段】本発明のアセンブラにお
ける逆アセンブラ処理方式は、ロードモジュールファイ
ルからのデータを読込むロードモジュールデータ読込手
段と、CPUに関する情報をテーブルに展開するCPU
情報テーブル展開手段と、前記ロードモジュールデータ
をキーにして前記CPU情報テーブルより検索する命令
コード検索手段と、オペランドに実データを挿入しアセ
ンブラデータを組立てるオペランド組立手段と、前記命
令コードとオペランドからアセンブラデータをアセンブ
ラソースファイルに書込むアセンブラデータ書込手段を
有している。
DISCLOSURE OF THE INVENTION A disassembler processing method in an assembler of the present invention is a load module data reading means for reading data from a load module file, and a CPU for expanding information on the CPU in a table.
Information table expanding means, instruction code searching means for searching the CPU information table using the load module data as a key, operand assembling means for inserting actual data into operands to assemble assembler data, and assembler from the instruction codes and operands It has an assembler data writing means for writing data to an assembler source file.

【0006】[0006]

【作用】本発明のアセンブラにおける逆アセンブラ処理
方式におけるCPU情報テーブル展開手段はCPU情報
ファイルを読取りCPU情報テーブルに展開し、命令コ
ード検索手段がCPU情報テーブルから命令コードを決
定して、オペランド組立手段がオペランドに実データを
挿入してアセンブラデータを組立て、アセンブラデータ
書込手段がアセンブラデータをアセンブラソースファイ
ルに書込むので汎用の逆アセンブラ処理ができる。
In the disassembler processing method in the assembler of the present invention, the CPU information table expanding means reads the CPU information file and expands it in the CPU information table, and the instruction code searching means determines the instruction code from the CPU information table, and the operand assembling means. Inserts actual data into the operand to assemble the assembler data, and the assembler data writing means writes the assembler data in the assembler source file, so that general-purpose disassembler processing can be performed.

【0007】[0007]

【実施例】次に、本発明について図面を参照して説明す
る。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Next, the present invention will be described with reference to the drawings.

【0008】図1は、本発明の一実施例のアセンブラに
おける汎用逆アセンブラ処理方式のブロック図である。
本実施例は、次のような部分から構成される。
FIG. 1 is a block diagram of a general-purpose disassembler processing system in an assembler according to an embodiment of the present invention.
The present embodiment is composed of the following parts.

【0009】・ロードモジュールファイル(1) よりデー
タを逐次読取っていく部分であるロードモジュールデー
タ読み込み手段(2) 、 ・そのデータをキーにしてCPU情報テーブルより検索
し命令コードを決定する部分である命令コード検索手段
(3) 、 ・オペランドの仮引数を実データに置き換えオペランド
を組み立てる部分であるオペランド組立手段(4) 、 ・これらの命令コードとオペランドよりアセンブラデー
タをアセンブラソースファイル(6) に書込む部分である
アセンブラデータ書込手段(5) 、 ・CPU情報ファイル(7) を事前に読取りCPU情報テ
ーブル(9)に展開する部分であるCPU情報テーブル展
開手段(8) 、 図2は、本発明におけるCPU情報に関するデータの構
成図である。図2において次のような項目を含んでい
る。
Load module data reading means (2) which is a part for sequentially reading data from the load module file (1), and a part for determining an instruction code by searching the CPU information table using the data as a key. Instruction code search means
(3),-Operand assembling means (4), which is the part that replaces the dummy argument of the operand with actual data, and-is the part that writes the assembler data to the assembler source file (6) from these instruction codes and operands. Assembler data writing means (5), CPU information table expanding means (8) which is a part for reading the CPU information file (7) in advance and expanding it in the CPU information table (9), FIG. It is a block diagram of the data regarding. In FIG. 2, the following items are included.

【0010】・機械語コードを定義する部分(10) ・命令コードのみの長さを定義する部分(11) ・命令部とオペランド部を含む全体長を定義する部分(1
2) ・オペランドにおける仮り引数の数を定義する部分(13) ・命令コード部分(14) ・オペランド部分(15) これらの項目によりCPUに依存しない、汎用的な逆ア
センブラを行う処理方式が可能となる。
A part defining the machine language code (10) a part defining the length of only the instruction code (11) a part defining the entire length including the instruction part and the operand part (1
2) -A part that defines the number of dummy arguments in the operand- (13) -Instruction code part (14) -Operand part (15) These items enable a general-purpose disassembler processing method that does not depend on the CPU. Become.

【0011】図3は、本発明の逆アセンブラ例を示す図
である。図3を参照して動作を説明する。ロードモジュ
ールファイルの内容16が1000番地に12、1001
番地に34、1002番地に56、1003番地に78
が入っていた場合、また、CPU情報ファイルの内容17
が機械語コード10が12と34、命令長11が2、全
体長12が4、仮引き数の数13が2、命令コード14
がLOAD、オペランド15が(IX+$(3,1),
$(4,1)に定義されていた場合、これを逆アセンブ
ラを行うと、 ・CPU情報ファイルの内容17の機械語コードの12,
34がロードモジュールファイルの内容16の1000番
地と1001番地の12,34と一致するので命令コー
ドのLOADが選択される。
FIG. 3 is a diagram showing an example of the disassembler of the present invention. The operation will be described with reference to FIG. The contents 16 of the load module file is 12,1001 at the address 1000
34 at address, 56 at 1002, 78 at 1003
If is included, the contents of the CPU information file 17
Are machine code 10 and 12; instruction length 11 is 2; overall length 12 is 4; dummy argument number 13 is 2; instruction code 14
Is LOAD, operand 15 is (IX + $ (3,1),
If it is defined as $ (4,1), and then disassemble it, the machine language code of contents 17 of the CPU information file is 12,
Since 34 matches the contents address 1000 of the load module file 16 and addresses 12 and 34 of address 1001, the instruction code LOAD is selected.

【0012】・この命令コードのオペランドは(IX+
$(3,1),$(4,1)で仮引き数の数が2である
ので実引き数との置換を行う。まず、$(3,1)より
ロードモジュールファイルの内容16の3番目から1バイ
トのデータである5 6を選択、つぎに$(4,1)よ
り4番目から1バイトのデータである78 を選択し、
実オペランドを作成する。
The operand of this instruction code is (IX +
Since the number of temporary arguments in $ (3,1) and $ (4,1) is 2, the actual argument is replaced. First, from $ (3,1), select 5 6 which is the 1st byte data from the 3rd in the content 16 of the load module file. Selected,
Create a real operand.

【0013】・これらの命令コードと実オペランドよ
り、逆アセンブラ後のアセンブラデータ18を得ることが
可能となる。
The assembler data 18 after the disassembler can be obtained from these instruction codes and actual operands.

【0014】[0014]

【発明の効果】以上説明したように本発明は、CPU情
報ファイルのみを各CPU毎に作成しておくだけで逆ア
センブラが可能となる為、逆アセンブラプログラムの開
発工数が大幅に削減されるという効果がある。
As described above, according to the present invention, the disassembler can be performed only by creating the CPU information file for each CPU, so that the man-hours for developing the disassembler program can be greatly reduced. effective.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明の一実施例のアセンブラにおける汎用逆
アセンブラ処理方式のブロック図である。
FIG. 1 is a block diagram of a general-purpose disassembler processing method in an assembler according to an embodiment of the present invention.

【図2】本発明におけるCPU情報に関するデータの構
成図である。
FIG. 2 is a configuration diagram of data relating to CPU information in the present invention.

【図3】本発明の実施例における逆アセンブラ例を示し
ている図である。
FIG. 3 is a diagram showing an example of a disassembler in an embodiment of the present invention.

【符号の説明】[Explanation of symbols]

(1) 逆アセンブラの入力になるロードモジュールファ
イル (2) ロードモジュールデータ読込手段 (3) 命令コード検索手段 (4) オペランド組立手段 (5) アセンブラデータ書込手段 (6) アセンブラソースファイル (7) CPU情報ファイル (8) CPU情報テーブル展開手段 (9) CPU情報テーブル (15) 仮引数を含むオペランド (16) 逆アセンブラ後のアセンブラデータの例
(1) Load module file to be input to the disassembler (2) Load module data reading means (3) Instruction code searching means (4) Operand assembling means (5) Assembler data writing means (6) Assembler source file (7) CPU information file (8) CPU information table expansion means (9) CPU information table (15) Operand including dummy argument (16) Example of assembler data after disassembler

Claims (1)

【特許請求の範囲】 【請求項1】 ロードモジュールファイルからのデータ
を読込むロードモジュールデータ読込手段と、CPU情
報ファイルを事前に読みとりCPUに関する情報をテー
ブルに展開するCPU情報テーブル展開手段と、前記ロ
ードモジュールデータ読込手段によって読込んだロード
モジュールデータをキーに前記CPU情報テーブルより
検索して命令コードを決定する命令コード検索手段と、
前記CPU情報テーブルからのオペランドに実データを
挿入してアセンブラデータを組立てるオペランド組立手
段と、前記命令コード検索手段で決定した命令コードと
前記オペランド組立手段によるオペランドによるアセン
ブラデータをアセンブラソースファイルに書込むアセン
ブラデータ書込手段とを有するアセンブラにおける汎用
逆アセンブラ処理方式。
Claim: What is claimed is: 1. A load module data reading means for reading data from a load module file, a CPU information table expanding means for reading a CPU information file in advance and expanding information about a CPU in a table, Instruction code search means for determining an instruction code by searching the CPU information table with the load module data read by the load module data reading means as a key;
Operand assembling means for assembling assembler data by inserting actual data into the operand from the CPU information table, and writing the assembler data by the instruction code determined by the instruction code searching means and the operand by the operand assembling means into an assembler source file. A general-purpose disassembler processing method in an assembler having assembler data writing means.
JP20715191A 1991-07-25 1991-07-25 General reverse-assembler processing system for assembler Pending JPH0535493A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP20715191A JPH0535493A (en) 1991-07-25 1991-07-25 General reverse-assembler processing system for assembler

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP20715191A JPH0535493A (en) 1991-07-25 1991-07-25 General reverse-assembler processing system for assembler

Publications (1)

Publication Number Publication Date
JPH0535493A true JPH0535493A (en) 1993-02-12

Family

ID=16535066

Family Applications (1)

Application Number Title Priority Date Filing Date
JP20715191A Pending JPH0535493A (en) 1991-07-25 1991-07-25 General reverse-assembler processing system for assembler

Country Status (1)

Country Link
JP (1) JPH0535493A (en)

Similar Documents

Publication Publication Date Title
US7458069B2 (en) System and method for fusing instructions
JP3130446B2 (en) Program conversion device and processor
KR0125605B1 (en) Method and device for verifying operation of machine language program
JPS62226231A (en) Processor
JPH0535493A (en) General reverse-assembler processing system for assembler
JPH10320212A (en) Cache optimizing method
JP3461185B2 (en) Method and apparatus for registering source code line number to load module
JP3313859B2 (en) Redundant remover
JPH11154093A (en) Program compiler and storage medium recording compiler program
JP2919406B2 (en) Performance evaluation method
JP2000207226A (en) Code optimizing device, language processor, and code optimization method
JP2004118518A (en) Simulator, and recording medium recording the simulator readable in computer
JPH04365133A (en) Preload instruction executing device and program correcting device
JP2606658B2 (en) Logic simulator and control method
JP3130421B2 (en) Program analysis method and apparatus
JP2000132405A (en) In-line expansion processing device and method
JPH1124939A (en) Program conversion method
JP2786689B2 (en) Compiler processing method
JPH0561687A (en) Processing system for compiler
JPH0658632B2 (en) Data processing device
JPH0619713B2 (en) Logic type data processor
JPH0427575B2 (en)
JPH05108372A (en) System for outputting compiler optimization processing content
JPS63278144A (en) Disassembling system
JPH06119203A (en) Debugging line deleting device