[go: up one dir, main page]

JPH08286927A - Assembler processing method - Google Patents

Assembler processing method

Info

Publication number
JPH08286927A
JPH08286927A JP9220395A JP9220395A JPH08286927A JP H08286927 A JPH08286927 A JP H08286927A JP 9220395 A JP9220395 A JP 9220395A JP 9220395 A JP9220395 A JP 9220395A JP H08286927 A JPH08286927 A JP H08286927A
Authority
JP
Japan
Prior art keywords
information
file
assembler
instruction
processor
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
JP9220395A
Other languages
Japanese (ja)
Inventor
Fumiya Muto
文也 武藤
Kazumi Matsumoto
一美 松本
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.)
Hitachi Ltd
Hitachi Computer Engineering Co Ltd
Original Assignee
Hitachi Ltd
Hitachi Computer Engineering Co 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 Hitachi Ltd, Hitachi Computer Engineering Co Ltd filed Critical Hitachi Ltd
Priority to JP9220395A priority Critical patent/JPH08286927A/en
Publication of JPH08286927A publication Critical patent/JPH08286927A/en
Pending legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)

Abstract

(57)【要約】 【目的】アセンブラの処理方式において、プロセッサに
依存する情報(周辺リソース情報,命令構成情報)をア
センブラ本体に組み込まず、切り離すことにより、プロ
セッサの仕様変更に柔軟に対処できるアセンブラを提供
することにある。 【構成】周辺リソース情報ファイル101と命令構成情
報ファイル102を外部に持ち、アセンブラ本体104
のプロセッサ情報処理部105において、該情報をシン
ボル情報テーブル106と命令構成情報テーブル107
に登録し、アセンブリ言語展開処理部108において、
該テーブル情報を基にソースファイル103内のアセン
ブリ命令語のオブジェクトコード生成及び、構文チェッ
クを行なう。 【効果】プロセッサの仕様変更時に、アセンブラの変更
工数を低減できる効果があり、更に他のプロセッサ用の
アセンブラへも若干の変更で対応でき、開発工数を低減
できる効果がある。
(57) [Abstract] [Purpose] In the assembler processing method, the processor-dependent information (peripheral resource information, instruction configuration information) can be dealt with flexibly in response to processor specification changes by not separating it from the assembler body. To provide. [Structure] A peripheral resource information file 101 and an instruction structure information file 102 are provided outside, and an assembler body 104 is provided.
In the processor information processing unit 105, the symbol information table 106 and the instruction configuration information table 107
And the assembly language expansion processing unit 108
Based on the table information, the object code of the assembly instruction word in the source file 103 is generated and the syntax is checked. [Effect] When the specifications of the processor are changed, the number of man-hours required for changing the assembler can be reduced, and the assembler for another processor can be handled with a slight change, thereby reducing the number of development man-hours.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、アセンブラの処理方式
に関し、特に専用のアーキテクチャを持つプロセッサの
アセンブラの処理方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an assembler processing system, and more particularly to an assembler processing system for a processor having a dedicated architecture.

【0002】[0002]

【従来の技術】従来、アセンブラの処理方式において、
プロセッサ固有の情報である周辺リソース情報と命令構
成情報は、アセンブラの固有情報としてアセンブラ内に
組み込まれている。この場合、プロセッサの仕様変更が
発生した場合に、アセンブラの再構築(プログラム修
正)が必要となる。このようなアセンブラの処理方式に
関しては、例えば「アセンブラのアセンブル処理方式」
(特公平3−53333号)に示されている。
2. Description of the Related Art Conventionally, in the assembler processing system,
Peripheral resource information and instruction configuration information that are processor-specific information are incorporated in the assembler as assembler-specific information. In this case, when the specification of the processor is changed, it is necessary to reconstruct the assembler (correct the program). For such an assembler processing method, for example, "Assembler assemble processing method"
(Japanese Patent Publication No. 3-53333).

【0003】[0003]

【発明が解決しようとする課題】専用プロセッサを制御
するコントロールウェア(以後「C/W」という)の開
発は、ハードウェアと同時並行開発が一般的であり、C
/W開発中にハードウェアの仕様変更が発生する可能性
が高い。この場合、C/Wの変更と共にアセンブラも変
更する必要がある。なお、その変更作業は短期間で実施
し、C/W設計者にアセンブラシステムを提供しなくて
はならない。
The development of controlware (hereinafter referred to as "C / W") for controlling a dedicated processor is generally performed in parallel with hardware.
/ W There is a high possibility that hardware specifications will change during development. In this case, it is necessary to change the assembler as well as the C / W. The change work must be carried out in a short period of time and the assembler system must be provided to the C / W designer.

【0004】従って前記従来技術においては、アセンブ
ラの再構築が必要となり、変更に費やす時間及び、期間
が大きくなる。
Therefore, in the above-mentioned conventional technique, it is necessary to reconstruct the assembler, and the time and period required for the change become large.

【0005】本発明の目的は、プロセッサに依存する情
報(周辺リソース情報,命令構成情報)をアセンブラ本
体に組み込まず、切り離すことにより、プロセッサの仕
様変更に柔軟に対処できるアセンブラを提供することに
ある。
An object of the present invention is to provide an assembler capable of flexibly coping with a specification change of a processor by separating processor-dependent information (peripheral resource information, instruction configuration information) from the assembler body without incorporating it. .

【0006】[0006]

【課題を解決するための手段】本発明によれば、周辺リ
ソース情報を定義したファイルと、命令構成情報を定義
したファイルと、周辺リソース情報を解析しテーブルに
登録する手段と、命令構成情報を解析しテーブルに登録
する手段と、該テーブル郡を基にソースプログラムをオ
ブジェクトコードに変換する手段と、該テーブル郡を基
にソースプログラムの構文規則をチェックする手段を提
供する。
According to the present invention, a file defining peripheral resource information, a file defining instruction configuration information, a means for analyzing peripheral resource information and registering it in a table, and an instruction configuration information A means for analyzing and registering in a table, a means for converting a source program into an object code based on the table group, and a means for checking the syntax rule of the source program based on the table group are provided.

【0007】[0007]

【作用】上記手段によれば、周辺リソース情報を定義し
たファイルは、リソース名称,変換コードとリソースの
種類を示すリソース属性により構成する。命令構成情報
を定義したファイルは、アセンブリ命令語名称,変換コ
ード,オブジェクトコード形式と構文規則情報により構
成する。これらのファイルはエディタにより入力し、こ
れにより変更も容易に可能である。
According to the above means, the file in which the peripheral resource information is defined is composed of the resource name, the conversion code and the resource attribute indicating the type of resource. The file defining the instruction configuration information is composed of assembly instruction word names, conversion codes, object code formats and syntax rule information. These files are input by an editor, and can be easily changed.

【0008】周辺リソース情報を解析しテーブルに登録
する手段と、命令構成情報を解析しテーブルに登録する
手段は、上記ファイル内の定義情報が規定形式で記述し
ているか否かをチェックし、定義情報をテーブルヘ登録
する。該処理を全定義情報に対して繰り返すことによ
り、アセンブラ内にプロセッサ固有の情報が登録され
る。
The means for analyzing the peripheral resource information and registering it in the table and the means for analyzing the instruction structure information and registering it in the table check whether or not the definition information in the file is described in a prescribed format, and define it. Register information in the table. By repeating the processing for all the definition information, the processor-specific information is registered in the assembler.

【0009】ソースプログラムをオブジェクトコードに
変換する手段と、構文規則をチェックする手段は、構文
分解処理により分解した各要素(アセンブリ命令語,周
辺リソース情報 ほか)を検索キーとして上記テーブル
を検索し、テーブル情報に従ってオブジェクトコードへ
の変換と構文チェックを実施する。該処理方法によりプ
ロセッサの仕様変更に柔軟に対処できるアセンブラシス
テムを実現する。
The means for converting the source program into an object code and the means for checking the syntax rules search the above table using each element (assembly instruction word, peripheral resource information, etc.) decomposed by the syntax decomposition process as a search key, Convert to object code and check syntax according to table information. An assembler system capable of flexibly coping with the specification change of the processor is realized by the processing method.

【0010】[0010]

【実施例】以下、本発明の一実施例を図により説明す
る。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings.

【0011】図1は本発明の構成図である。同図におい
て、101は周辺リソース情報を定義した周辺リソース
情報ファイル、102は命令構成情報を定義した命令構
成情報ファイル、103はソースプログラムを格納した
ソースファイル、104はアセンブラ本体、105は周
辺リソース情報ファイル101と命令構成情報ファイル
102を読み込み解析し、テーブルへ登録するプロセッ
サ情報処理部、106はプロセッサ情報処理部105に
より解析した周辺リソース情報を格納するシンボル情報
テーブル、107はプロセッサ情報処理部105により
解析した命令構成情報を格納する命令構成情報テーブ
ル、108はソースファイル103を読み込み解析し、
シンボル情報テーブル106と命令構成情報テーブル1
07を基にオブジェクトコード生成,構文チェックを行
なうアセンブリ言語展開処理部、109はアセンブリ言
語展開処理部108により生成したオブジェクトコード
とソースリストを各ファイルに出力するファイル出力
部、110はオブジェクトコードを蓄積するオブジェク
トファイル、111はソースリストを蓄積するリストフ
ァイルである。
FIG. 1 is a block diagram of the present invention. In the figure, 101 is a peripheral resource information file that defines peripheral resource information, 102 is an instruction configuration information file that defines instruction configuration information, 103 is a source file that stores a source program, 104 is an assembler body, and 105 is peripheral resource information. A processor information processing unit that reads and analyzes the file 101 and the instruction configuration information file 102 and registers them in the table, 106 is a symbol information table that stores the peripheral resource information analyzed by the processor information processing unit 105, and 107 is a processor information processing unit 105. An instruction configuration information table storing the analyzed instruction configuration information, 108 reads the source file 103, analyzes it,
Symbol information table 106 and instruction structure information table 1
An assembly language expansion processing unit for performing object code generation and syntax check based on 07, 109 is a file output unit for outputting the object code generated by the assembly language expansion processing unit 108 and a source list to each file, and 110 is an accumulation of the object code. The object file 111 is a list file for accumulating the source list.

【0012】アセンブラ本体104において、プロセッ
サ情報処理部105を実行することにより、アセンブラ
内にプロセッサ固有の情報が登録され、その後アセンブ
リ言語展開処理部108を実行することで、オブジェク
トコード生成,構文チェックが可能となる。また、ファ
イル出力部については本発明に直接関係ないので説明は
省略する。
In the assembler body 104, the processor information processing unit 105 is executed to register the processor-specific information in the assembler, and then the assembly language expansion processing unit 108 is executed to generate the object code and check the syntax. It will be possible. Further, the file output unit is not directly related to the present invention, and therefore its explanation is omitted.

【0013】図2はプロセッサ情報処理部105におけ
る周辺リソース情報ファイル101とシンボル情報テー
ブル106の関係を示したものである。周辺リソース情
報ファイル101は、リソース名称,変換コードとリソ
ースの種類を示すリソース属性(コード化)にて構成す
る。この図の最初の例は、リソース名称「REG1」
は、変換コードが「(10)16」,リソース属性が「レ
ジスタ」であることを示している。
FIG. 2 shows the relationship between the peripheral resource information file 101 and the symbol information table 106 in the processor information processing unit 105. The peripheral resource information file 101 is composed of a resource name, a conversion code, and a resource attribute (coding) indicating the type of resource. The first example in this figure shows the resource name "REG1"
Indicates that the conversion code is “(10) 16 ” and the resource attribute is “register”.

【0014】シンボル情報テーブル106には、これら
の情報を格納すると共に、アセンブリ言語展開処理部1
08にて処理する周辺リソース情報の他に、ソースファ
イル103内で定義する分岐先ラベル情報等も格納す
る。また、シンボル情報テーブル106にシンボル(周
辺リソース情報,分岐先ラベル情報 等)を登録する際
は、名称の重複チェックを行なう。
The symbol information table 106 stores these pieces of information, and at the same time, the assembly language expansion processing unit 1
In addition to the peripheral resource information processed in 08, branch destination label information defined in the source file 103 is also stored. Further, when a symbol (peripheral resource information, branch destination label information, etc.) is registered in the symbol information table 106, name duplication check is performed.

【0015】図3はプロセッサ情報処理部105におけ
る命令構成情報ファイル102と命令構成情報テーブル
107の関係を示したものである。命令構成情報ファイ
ル102は、アセンブリ命令語名称,変換コード,オブ
ジェクトコード形式(命令長と各コードの格納位置)と
構文規則情報(オペランド属性)にて構成する。この図
の例は、アセンブリ命令語名称「ADD」は、変換コー
ドが「(10)16」,オブジェクトコード形式が「4バ
イト命令で、命令コードは0バイト目から1バイト分の
範囲に格納し、第一オペランドコードは1バイト目から
1バイト分の範囲に格納し、第二オペランドコードは2
バイト目から1バイト分の範囲に格納」,構文規則情報
が「第一オペランドにレジスタを記述し、第二オペラン
ドにレジスタを記述」であることを示している。
FIG. 3 shows the relationship between the instruction configuration information file 102 and the instruction configuration information table 107 in the processor information processing unit 105. The instruction configuration information file 102 is composed of an assembly instruction word name, a conversion code, an object code format (instruction length and storage position of each code), and syntax rule information (operand attribute). In the example of this figure, the assembly instruction word name “ADD” has a conversion code of “(10) 16 ”, an object code format of “4 byte instruction, and the instruction code is stored in the range of 0 byte to 1 byte. , The first operand code is stored in the range from the first byte to 1 byte, and the second operand code is 2
Stored in the range of 1 byte from the byte ”, the syntax rule information is" register is described in the first operand and register is described in the second operand ".

【0016】命令構成情報テーブル107は、これらの
情報を格納する。また、命令構成情報テーブル107に
命令語を登録する際は、名称の重複チェックを行なう。
The instruction structure information table 107 stores these pieces of information. When registering a command word in the command configuration information table 107, a name duplication check is performed.

【0017】周辺リソース情報ファイル101と命令構
成情報ファイル102は、エディタにより入力可能であ
り、これにより変更も容易である。
The peripheral resource information file 101 and the instruction configuration information file 102 can be input by an editor, and can be easily changed.

【0018】図4はアセンブリ言語展開処理部108に
おけるオブジェクトコード生成と構文チェック処理のフ
ローチャートである。本アセンブラは2パスアセンブラ
の例であり、1パス目にソースファイル103内の全シ
ンボル情報を解析し、シンボル情報テーブル106に登
録済みであることを前提とし、2パス目の処理として、
以下、図2,図3の例の情報を基にソースファイル10
3中のソースステップ「 ADD REG1,RE
G2 」のオブジェクトコード生成と構文チェック処
理について説明する。
FIG. 4 is a flow chart of object code generation and syntax check processing in the assembly language expansion processing unit 108. This assembler is an example of a two-pass assembler, and it is premised that all symbol information in the source file 103 is analyzed in the first pass and registered in the symbol information table 106.
Below, the source file 10 based on the information of the examples of FIGS.
Source step in 3 “ADD REG1, RE
G2 "object code generation and syntax check processing will be described.

【0019】ステップ401は、ソースファイル103
より1ソースステップを読み込み、構文分解を行なう。
構文分解とは、文字列の区切りを認識しその記述位置に
より命令語,第一オペランド,第二オペランドの文字列
を取得することである。この例の場合、命令語は「AD
D」,第一オペランドは「REG1」,第二オペランド
は「REG2」となる。
In step 401, the source file 103
More 1 source step is read and the syntax is decomposed.
The syntax decomposition is to recognize the delimiter of the character string and acquire the character strings of the command word, the first operand, and the second operand according to the description position. In this example, the command word is "AD
D ", the first operand is" REG1 ", and the second operand is" REG2 ".

【0020】ステップ402は、ステップ401により
取得した命令語をキーとし、命令構成情報テーブル10
7を検索し、そのテーブルの配列番号を取得する。この
例の場合、命令語「ADD」の命令構成情報テーブル1
07の配列番号は「20」となる。
In step 402, the instruction word acquired in step 401 is used as a key, and the instruction structure information table 10
7 is obtained and the array element number of the table is acquired. In the case of this example, the instruction configuration information table 1 of the instruction word “ADD”
The sequence number of 07 is "20".

【0021】ステップ403は、ステップ402の検索
結果の判定である。この例の場合、命令語「ADD]
は、命令構成情報テーブル107に存在するので、ステ
ップ404へ進む。命令語が存在しない場合は未定義命
令エラーとなり、ステップ411のエラー処理(エラー
メッセージ出力 他)を実行して、次ソースステップの
処理(ステップ401より)を行なう。
Step 403 is the determination of the search result of step 402. In the case of this example, the instruction word "ADD"
Exists in the instruction configuration information table 107, the process proceeds to step 404. If the command word does not exist, an undefined command error occurs, and the error process of step 411 (error message output etc.) is executed to perform the process of the next source step (from step 401).

【0022】ステップ404は、命令構成情報テーブル
107の配列番号の示すオブジェクトコード形式に従
い、オブジェクトコードを生成する。この例の場合、命
令語「ADD」は、4バイト命令で命令コード「(1
0)16」は0バイト目から1バイト分の範囲に格納さ
れ、生成するオブジェクトコードは「(1000000
0)16」となる。
In step 404, an object code is generated according to the object code format indicated by the array element number in the instruction structure information table 107. In this example, the instruction word “ADD” is a 4-byte instruction and the instruction code “(1
0) 16 "is stored in the range from the 0th byte to the 1st byte, and the generated object code is" (1000000
0) 16 ”.

【0023】ステップ405からステップ409は、オ
ペランドの処理である。これらの処理をオペランド数分
繰り返すことにより、1ソースステップのアセンブリ命
令語のオペランドのオブジェクトコード生成と構文チェ
ックが可能となる。以下にその詳細を説明する。
Steps 405 to 409 are processing of operands. By repeating these processes for the number of operands, it becomes possible to generate the object code and syntax check the operand of the assembly instruction word of one source step. The details will be described below.

【0024】ステップ405は、命令構成情報テーブル
107の配列番号の示すオペランド情報分の処理が終了
したか、またはソースファイル103内の1ソースステ
ップのオペランド数分の処理が終了したかを判定する。
アセンブリ命令語の中には、オペランドが無いもの,オ
ペランドが一つのものもあり、これらは命令構成情報フ
ァイル102内の記述記号「OP1,OP2」の記述の
有無によって表現する。この例の場合、命令語「AD
D」は、命令構成情報テーブル107のオペランド情報
によると、二つのオペランドによる命令語であり、ソー
スファイル103内の1ソースステップのオペランド数
も二個であるため以降の処理を二回繰り返すこととな
る。
In step 405, it is determined whether the processing for the operand information indicated by the array element number of the instruction configuration information table 107 has been completed or the processing for the number of operands of one source step in the source file 103 has been completed.
Some of the assembly instruction words have no operands, and some have one operand. These are expressed by the presence or absence of the description symbols “OP1, OP2” in the instruction configuration information file 102. In this example, the command word "AD
According to the operand information of the instruction structure information table 107, “D” is an instruction word with two operands, and since the number of operands of one source step in the source file 103 is also two, the following processing is repeated twice. Become.

【0025】ステップ406は、ステップ401により
取得したオペランドをキーとし、シンボル情報テーブル
106を検索し、そのテーブルの配列番号を取得する。
この例の場合、第一オペランド「REG1」のシンボル
情報テーブル106の配列番号は「32」となる。
In step 406, the operand obtained in step 401 is used as a key to search the symbol information table 106 and the array element number of the table is obtained.
In the case of this example, the array element number of the symbol information table 106 of the first operand “REG1” is “32”.

【0026】ステップ407は、ステップ406により
検索したシンボルが定義済みのシンボルか否かの判定で
ある。定義済みシンボルとは、周辺リソース情報ファイ
ル101とソースファイル103内で定義したシンボル
を示す。未定義シンボルとは、定義してなく使用してい
るシンボル(例えば、分岐先の定義がなく、アセンブリ
命令語のオペランドに使用)を示す。これらはシンボル
情報テーブル106内の属性により判定することができ
る。この例の場合、第一オペランド「REG1」は、定
義済みシンボルであるためステップ408へ進む。未定
義シンボルの場合は、構文エラーとなり、ステップ41
1のエラー処理(エラーメッセージ出力他)を実行し
て、次ソースステップの処理(ステップ401より)を
行なう。ステップ408は、命令構成情報テーブル10
7内のオペランド属性とシンボル情報テーブル106内
のシンボル属性が一致するか否かを判定する。この例の
場合、第一オペランド「REG1」は、命令構成情報テ
ーブル107内のオペランド属性が「レジスタ],シン
ボル情報テーブル106内の属性が「レジスタ」である
ため一致し、ステップ409ヘ進む。一致しない場合
は、構文エラーとなり、ステップ411のエラー処理
(エラーメッセージ出力 他)を実行して、次ソースス
テップの処理(ステップ401より)を行なう。
In step 407, it is judged whether or not the symbol retrieved in step 406 is a defined symbol. The defined symbols are symbols defined in the peripheral resource information file 101 and the source file 103. The undefined symbol indicates a symbol which is used without being defined (for example, there is no branch destination definition and it is used as an operand of an assembly instruction word). These can be determined by the attributes in the symbol information table 106. In the case of this example, since the first operand “REG1” is a defined symbol, the process proceeds to step 408. If it is an undefined symbol, a syntax error occurs and step 41
The error processing 1 (error message output, etc.) is executed, and the processing of the next source step (from step 401) is performed. Step 408 is the instruction configuration information table 10.
It is determined whether the operand attribute in 7 and the symbol attribute in the symbol information table 106 match. In the case of this example, the first operand “REG1” matches because the operand attribute in the instruction configuration information table 107 is “register” and the attribute in the symbol information table 106 is “register”, and the process proceeds to step 409. If they do not match, a syntax error occurs, and the error process of step 411 (error message output etc.) is executed to perform the process of the next source step (from step 401).

【0027】ステップ409は、命令構成情報テーブル
107の配列番号の示すオブジェクトコード形式に従
い、オペランドのオブジェクトコードを生成する。この
例の場合、第一オペランド「REG1」は、シンボル情
報テーブル106により変換コードは「(10)16」と
なり、1バイト目から1バイト分の範囲に格納され、生
成するオブジェクトコードは「(1010000
0)16」となる。
In step 409, the object code of the operand is generated according to the object code format indicated by the array element number of the instruction structure information table 107. In the case of this example, the conversion code of the first operand “REG1” is “(10) 16 ” according to the symbol information table 106 and is stored in the range of 1 byte from the first byte, and the generated object code is “(1010000).
0) 16 ”.

【0028】以上、ステップ405から409までオペ
ランド数分繰り返すことにより、アセンブリ命令語のオ
ペランドのオブジェクトコードの生成と構文チェックが
終了する。この例の場合、完成したオブジェクトコード
は「(10102000)16」となる。
By repeating steps 405 to 409 as many times as the number of operands, the generation of the object code of the operand of the assembly instruction word and the syntax check are completed. In the case of this example, the completed object code is “(10102000) 16 ”.

【0029】ステップ410は、ステップ401から4
09の一連の処理が終了した後、オペランド数の過不足
をチェックする。この例の場合、命令構成情報テーブル
107内のオペランド数が二個,ソースファイル103
内のオペランド数が二個であり一致するため、次ソース
ステップの処理(ステップ401より)を行なう。一致
しない場合は、構文エラーとなり、ステップ411のエ
ラー処理(エラーメッセージ出力 他)を実行して次ソ
ースステップの処理(ステップ401より)を行なう。
Step 410 includes steps 401 to 4
After the processing sequence of 09 is completed, the number of operands is checked for excess or deficiency. In the case of this example, the number of operands in the instruction configuration information table 107 is two, and the source file 103
Since the number of operands in the two is the same and the two match, the processing of the next source step (from step 401) is performed. If they do not match, a syntax error occurs, and the error process of step 411 (error message output etc.) is executed to perform the process of the next source step (from step 401).

【0030】以上、ステップ401から411まで、命
令構成情報テーブル107とシンボル情報テーブル10
6を基に処理することにより、アセンブリ命令語のオブ
ジェクトコードの生成と構文規則のチェックが可能とな
る。
As described above, from step 401 to step 411, the instruction configuration information table 107 and the symbol information table 10
By processing based on 6, it is possible to generate the object code of the assembly instruction word and check the syntax rule.

【0031】[0031]

【発明の効果】以上説明したように、本発明は従来のア
センブラの処理方式において、プロセッサに依存する情
報(周辺リソース情報,命令構成情報)をアセンブラ本
体に組み込まず、切り離して処理することにより、プロ
セッサの仕様変更時にアセンブラの変更工数を低減でき
る効果があり、更に他のプロセッサ用のアセンブラへも
若干の変更で対応でき、開発工数を低減できる効果があ
る。
As described above, according to the present invention, in the processing method of the conventional assembler, the processor-dependent information (peripheral resource information, instruction configuration information) is not incorporated in the assembler body but is processed separately. This has the effect of reducing the man-hours for changing the assembler when changing the specifications of the processor, and it is also possible to reduce the development man-hours by making slight changes to the assembler for other processors.

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

【図1】本発明の構成図である。FIG. 1 is a configuration diagram of the present invention.

【図2】周辺リソース情報ファイルとシンボル情報テー
ブルの関係図である。
FIG. 2 is a relationship diagram of a peripheral resource information file and a symbol information table.

【図3】命令構成情報ファイルと命令構成情報テーブル
の関係図である。
FIG. 3 is a relationship diagram of an instruction configuration information file and an instruction configuration information table.

【図4】オブジェクトコード生成と構文チェック処理の
フローチャートである。
FIG. 4 is a flowchart of object code generation and syntax check processing.

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

101…周辺リソース情報ファイル、102…命令構成
情報ファイル、103…ソースファイル、 10
4…アセンブラ本体、105…プロセッサ情報処理部、
106…シンボル情報テーブル、107…命令構成情
報テーブル、 108…アセンブリ言語展開処理部、1
09…ファイル出力部、 110…オブジェクト
ファイル、111…リストファイル。
101 ... Peripheral resource information file, 102 ... Instruction configuration information file, 103 ... Source file, 10
4 ... Assembler main body, 105 ... Processor information processing unit,
106 ... Symbol information table, 107 ... Instruction configuration information table, 108 ... Assembly language expansion processing unit, 1
09 ... File output unit, 110 ... Object file, 111 ... List file.

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】コンピュータ言語の一種であるアセンブリ
言語で記述されたソースプログラムを入力し、オブジェ
クトコードを生成し、オブジェクトファイル,リストフ
ァイルを出力するアセンブラにおいて、オブジェクトコ
ードの変換対象となるレジスタ名称などのプロセッサ固
有の周辺リソースに関する情報(以後「周辺リソース情
報」という)を定義したファイルと、ソースプログラム
をオブジェクトコードに変換する前に該ファイルを解析
しテーブルに登録する手段と、該テーブル情報を基にオ
ブジェクトコードに変換する手段を備え、プロセッサに
依存する周辺リソース情報を外部に持つことを特徴とす
るアセンブラのオブジェクトコード生成処理方式。
1. A assembler for inputting a source program written in an assembly language which is a kind of computer language to generate an object code and outputting an object file and a list file. A file that defines information about peripheral resources specific to the processor (hereinafter referred to as "peripheral resource information"), a means for analyzing the file before converting the source program into an object code, and registering the table in a table, and a table based on the table information. An assembler object code generation processing method characterized in that it has means for converting to object code and has peripheral resource information depending on the processor externally.
【請求項2】前記アセンブラにおいて、オブジェクト構
成,命令構文規則に関する情報(以後「命令構成情報」
という)を定義したファイルと、アセンブル前に該ファ
イルを解析しテーブルに登録する手段と、該テーブル情
報を基に構文をチェックしオブジェクトコードに変換す
る手段を備え、プロセッサに依存する命令構成情報を外
部に持つことを特徴とするアセンブラのオブジェクトコ
ード生成及び、構文チェック処理方式。
2. In the assembler, information on object configuration and instruction syntax rules (hereinafter referred to as "instruction configuration information").
, A file that defines the file), a unit that analyzes the file before assembling and registers it in a table, and a unit that checks the syntax based on the table information and converts it into an object code. An assembler object code generation and syntax check processing method characterized by having it externally.
JP9220395A 1995-04-18 1995-04-18 Assembler processing method Pending JPH08286927A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9220395A JPH08286927A (en) 1995-04-18 1995-04-18 Assembler processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9220395A JPH08286927A (en) 1995-04-18 1995-04-18 Assembler processing method

Publications (1)

Publication Number Publication Date
JPH08286927A true JPH08286927A (en) 1996-11-01

Family

ID=14047897

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9220395A Pending JPH08286927A (en) 1995-04-18 1995-04-18 Assembler processing method

Country Status (1)

Country Link
JP (1) JPH08286927A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005520254A (en) * 2002-03-14 2005-07-07 コンテントガード ホールディングズ インコーポレイテッド Method and apparatus for processing usage rights expressions
WO2011024554A1 (en) * 2009-08-25 2011-03-03 日本電気株式会社 Assembler device, parsing method, and assembler program
JP2011215759A (en) * 2010-03-31 2011-10-27 Mitsubishi Electric Corp Apparatus and program for generating and processing of code

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005520254A (en) * 2002-03-14 2005-07-07 コンテントガード ホールディングズ インコーポレイテッド Method and apparatus for processing usage rights expressions
WO2011024554A1 (en) * 2009-08-25 2011-03-03 日本電気株式会社 Assembler device, parsing method, and assembler program
JP5413623B2 (en) * 2009-08-25 2014-02-12 日本電気株式会社 Assemble device, syntax analysis method, and assembler program
JP2011215759A (en) * 2010-03-31 2011-10-27 Mitsubishi Electric Corp Apparatus and program for generating and processing of code

Similar Documents

Publication Publication Date Title
JP3430252B2 (en) Source code conversion method, recording medium recording source code conversion program, and source code conversion device
AU2002234715B2 (en) Method for compressing/decompressing a structured document
EP0735466A2 (en) Method and apparatus for displaying locations of errors detected inside software macro calls
US20040158820A1 (en) System for generating an application framework and components
JPS6288033A (en) Apparatus and method for generating software program
US6101325A (en) Parameterized packaging system for programming languages
US20010051974A1 (en) Method and apparatus for automatic generation of data interfaces
JP2879099B1 (en) Abstract syntax tree processing method, computer readable recording medium recording abstract syntax tree processing program, computer readable recording medium recording abstract syntax tree data, and abstract syntax tree processing device
CN115293200A (en) Digital Signal Processor (DSP) assembler transplanting method based on processor architecture description
US20040010780A1 (en) Method and apparatus for approximate generation of source code cross-reference information
CN113900657A (en) Method for reading data rule, electronic device and storage medium
JPH08286927A (en) Assembler processing method
US7694283B2 (en) Method and apparatus for generating specification data
JPH11296359A (en) Program development support tool
JPH04286029A (en) Source program converter
JPH08194611A (en) A device that analyzes the range of influence of program modification
EP0803806A2 (en) Data conversion mechanism for computer system
CN117827171A (en) Method and device for generating project source codes through json schema file
Amal et al. Software tool for translating pseudocode to a programming language
JPH07121379A (en) Multilingual compiler
JP2003330731A (en) Project management file generator
JP3370243B2 (en) Compilation method and apparatus
CN118590563A (en) A method, device, equipment and medium for parsing a DBC file into a JSON file
CN118210508A (en) A FrancaIDL file parsing method and device
CN112162738A (en) Data conversion method and device, terminal equipment and storage medium