JPH0390931A - Generation of rom transformation program - Google Patents

Generation of rom transformation program

Info

Publication number
JPH0390931A
JPH0390931A JP22589789A JP22589789A JPH0390931A JP H0390931 A JPH0390931 A JP H0390931A JP 22589789 A JP22589789 A JP 22589789A JP 22589789 A JP22589789 A JP 22589789A JP H0390931 A JPH0390931 A JP H0390931A
Authority
JP
Japan
Prior art keywords
area
program
rom
linker
unchanged
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
JP22589789A
Other languages
Japanese (ja)
Inventor
Jun Goto
純 後藤
Masaki Takashima
高島 正貴
Naoko Tsuchiya
土屋 奈穂子
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP22589789A priority Critical patent/JPH0390931A/en
Publication of JPH0390931A publication Critical patent/JPH0390931A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

PURPOSE:To attain the effective use of a memory area and at the same time to omit the manual jobs for improvement of the program generation efficiency by allocating a variable having the initial value to an original position in a linker connection process and moving the initial value of the variable to a point right after a non-changed area at output of a load module. CONSTITUTION:A variable having the initial value is assigned to its original position in a linker connection process and then assigned to an area starting at an address shown by a specific symbol set right after a non-changed data on a non-changed area in a subsequent output process. Then a ROM transformation program is generated with all data on a non-changed area defined as those to be written into a ROM as they are. As a result, no useless part is generated in the continuous areas of data in the non-changed area. Then a desired ROM transformation program is generated when the data outputted via a linker are just defined as those to be written into the ROM as they are. Thus the program generation efficiency is improved.

Description

【発明の詳細な説明】 〔概要〕 ROM化プログラムの生成方法に関し、メモリの無駄領
域を無くして有効利用を図るとともに、ROM化プログ
ラムの生成に際して手作業を無くして能率を向上できる
ROM化プログラムの生成方法を提供することを目的と
し、非変更領域と変更領域を有するメモリ領域で複数の
オブジェクトプログラムをリンカにより結合処理してロ
ードモジュールを生成するとともに、リンカの結合処理
に際してプログラムのソースや定数等の非変更データに
ついては非変更領域に割り当て、変数および変更される
が初M(a’をもつ変数については変更領域に割り当て
、ロードモジュールに生成されたプログラムをROM化
するに際しては前記非変更パラメータおよび初期値をも
つ変数についてのみROMの内容として書き込み、RO
M化プログラムを生成するROM化プログラムの生成方
法において、前記初期値をもつ変数を非変更領域におけ
る非変更データの直後の特定シンボルで表示されるアド
レスから始まる領域に割り当てる工程と、該工程により
割り当てられた内容を含む非変更領域のデータをリンカ
の出力としてROM化プログラムを生成する工程と、を
含むように構成する。
[Detailed Description of the Invention] [Summary] Regarding a method for generating a ROMized program, a ROMized program is provided that eliminates wasted memory area and aims for effective use, and improves efficiency by eliminating manual work when generating a ROMized program. The purpose is to provide a generation method that uses a linker to combine multiple object programs in a memory area that has an unchanged area and a changed area to generate a load module. Unchanged data is allocated to the unchanged area, variables and variables with the first M(a') are allocated to the changed area, and when the program generated in the load module is converted to ROM, the unchanged parameters are Only variables with initial values are written as ROM contents, and RO
A method for generating a ROMized program that generates an Mized program includes a step of allocating a variable having the initial value to an area starting from an address indicated by a specific symbol immediately after unchanged data in an unchanged area; The method is configured to include the step of generating a ROMized program by using the data in the unchanged area including the updated contents as output from the linker.

〔産業上の利用分野〕[Industrial application field]

本発明は、ROM化プログラムの生成方法に係り、詳し
くは、リンカがROM化するプログラムを生成する際の
メモリ配置を改良したROM化プログラムの生成方法に
関する。
The present invention relates to a method for generating a ROMized program, and more particularly, to a method for generating a ROMized program in which the memory arrangement is improved when a linker generates a program to be converted into a ROM.

ソフトウェアの開発において開発規模の大きなプログラ
ムは複数に分けて分割コンパイルされる。
In software development, large-scale programs are divided into multiple parts and compiled.

この分割コンパイルは関数や変数が別ファイルになるた
め、単体のファイルでは解決できないシンボルが生じる
。これを解決するためにリンカを用い結合処理を行う。
In this split compilation, functions and variables are placed in separate files, resulting in symbols that cannot be resolved in a single file. To solve this problem, a linker is used to perform the binding process.

こここに、1つもしくは2つ以上のオブジェクトプログ
ラムから1つの実行可能なプログラムを生成することを
リンクまたは連結編集といい、この処理をするプログラ
ムをリンカ(linker) と呼んでいる。
Here, the process of generating one executable program from one or more object programs is called linking or concatenated editing, and the program that performs this process is called a linker.

リンカでは、実行可能なプログラムを生成する。A linker generates an executable program.

リンカは複数個のオブジェクトを入力とし、1つの実行
可能なプログラムを出力するもので、結合処理により未
解決のシンボルを検索し、それぞれを解決していく。未
解決シンボルが全て解決された状態で初めて実行可能な
プログラムが生成される。但し、未解決シンボルを解決
するためには各シンボルの位置関係が決定されている必
要がある。
A linker takes multiple objects as input and outputs one executable program, and uses a combination process to search for unresolved symbols and resolve each one. An executable program is generated only when all unresolved symbols are resolved. However, in order to resolve unresolved symbols, the positional relationship of each symbol must be determined.

また、リンカに必要とされる機能の1つにメモリ配置の
機能がある。このメモリ配置の機能は、プログラムのソ
ースや定数のような「非変更領域」、変数のような「初
期値を持たない変更領域」、変更されるが、初期値を持
つ変数のような「初期値・を持つ変更領域」の3つに分
類し、各々を連続した領域に割り当てるものである。
Furthermore, one of the functions required of the linker is a memory allocation function. This memory allocation function is divided into "unchanged areas" such as program sources and constants, "changed areas" such as variables that do not have initial values, and "initialized areas" such as variables that are changed but have initial values. The change area is divided into three areas: ``Change areas with value .'', and each area is assigned to a continuous area.

ROM化においては初期値を持つ領域、すなわち、「非
変更領域」、「初期値を持つ変更領域」についてのみR
OMとして書き込む。
When converting to ROM, R is applied only to areas with initial values, that is, "unchanged areas" and "changed areas with initial values."
Write as OM.

本発明は、このようなROM化するプログラムを生成す
る際の方式を技術的背景としている。
The technical background of the present invention is a method for generating a program to be stored in a ROM.

〔従来の技術〕[Conventional technology]

従来のROM化プログラムの生成方法について説明する
と、リンカを用いてROM化する場合には次のような方
法で行われる。第6図はそのプロセスを示す図である。
To explain the conventional method of generating a ROMized program, when a linker is used to create a ROMized program, the following method is used. FIG. 6 is a diagram showing the process.

第6図に示すあるプログラム1がソースコード(Cod
e) 、定数(Const) 、初期値付きの変数(V
arl)、初期値なしの変更(Var2 )で構成され
、そのプログラム1を格納するメモリの構成が0000
 (番地を指す。以下、同様)から2000までがRO
M、2000から4000までがRAMで構成されてい
るとする。
A program 1 shown in FIG. 6 is a source code (Cod
e), constant (Const), variable with initial value (V
arl), change without initial value (Var2), and the configuration of the memory that stores the program 1 is 0000.
(Refers to the address. The same applies hereafter) to 2000 is RO
Assume that M, 2000 to 4000 are composed of RAM.

このプログラム1においてCodd + Con5tは
非変更領域であるためROM領域のooooから200
0に、Varl + Var2は変更の可能性があるた
めRA M a域の2000番地以降に割り付ける(第
6図(a)参照)。次いで、リンカへの出力はこの割り
付は通りに出力される(第6図(b、)参照)。また、
ROMへの書き込みにおいては、非変更領域のCodd
 。
In this program 1, since Codd + Con5t is an unchanged area, 200 from oooo in the ROM area
0 and Varl + Var2 may be changed, so they are allocated to address 2000 and later in the RAM a area (see FIG. 6(a)). Then, the output to the linker is output according to this allocation (see FIG. 6(b)). Also,
When writing to ROM, Codd in the unchanged area
.

Con5t 、及び初期値を持つ変更領域のVarlを
、それぞれ個別に書き込む(第6図(C)参照)。実行
時において2000番地からの領域はRAMである必要
があるため、Varlの領域はROM割り付は時に20
00番地からとは異なる領域に割り付ける必要がある。
Con5t and Varl of the change area having the initial value are written individually (see FIG. 6(C)). At runtime, the area starting from address 2000 needs to be RAM, so the Varl area is sometimes 20 ROM allocated.
It is necessary to allocate it to a different area from address 00.

通常、ROMの割り付けは2000番地からの領域に出
力されたVarlの出力値をROMに書き込み、ROM
を割り付ける際に手作業で指定のアドレスにずらす方法
をとっている(第6図(d)参照)。
Normally, ROM allocation is done by writing the output value of Varl output to the area starting from address 2000 to the ROM, and
When allocating the address, a method is used in which the address is manually shifted to a specified address (see Figure 6(d)).

また、実行時には2000番地からの領域にはVarl
の初期値が必要なため、プログラム実行の前にROMに
割り付けられたVarlの初期値を2000番地からの
領域にコピーしている(第6図(e)参照)。
Also, during execution, the area from address 2000 is Varl.
Since the initial value of Varl is required, the initial value of Varl allocated to the ROM is copied to the area starting from address 2000 before program execution (see FIG. 6(e)).

なお、上記におけるリンカの処理としては大きく4つに
分かれ、第7.8図に示すフローチャートで表される。
Note that the linker processing described above is roughly divided into four parts, which are represented by the flowchart shown in FIG. 7.8.

第7図は従来の一般的なリンカの処理を表すフローチャ
ート、第8図はロードモジュールの出力処理を表すフロ
ーチャートである。
FIG. 7 is a flowchart showing the processing of a conventional general linker, and FIG. 8 is a flowchart showing the output processing of a load module.

まず、ステップSlのオブジェクト入力ではリンク処理
すべきオブジェクトを全て入力し、外部参照テーブル、
外部定義テーブルを作成する。次いで、ステップS2の
領域の割り付けでは入力したオブジェクトに対し、指定
された領域を割り付ける。その後、ステップS3のシン
ボルの解決において外部参照などの未解決シンボルを解
決し、ロードモジュールを作成する。未解決シンボルが
全て解決されたならば、ステップS4のロードモジュー
ルの出力において、作成されたロードモジュールを出力
してリンカの処理を終了する。実際のロードモジュール
は複数又は1つのメモリイメージデータレコードにより
構成され、メモリイメージデータレコードは例えば第9
図のような形式になっている。この場合、 アドレス部2:メモリイメージのデータがロードされる
べきアドレスの情報 レコード長3:メモリイメージデータの長さメモリイメ
ージデータ4:展開されるメモリイメージのデータ(長
さは任意) で定義され、アドレス部2はその後に続(メモリイメー
ジのデータ4がロードされるべきアドレスを示し、レコ
ード長3はメモリイメージデータ4の長さを示す。した
がって、ロードモジュールの出力とは、このメモリイメ
ージデータレコードをを全て出力することになり、その
処理は第 図のフローチャートで示すように、ステップ
S、でセクションが終了するか否かを判別し、NOの時
はステップS6でセクションに属する全メモリのイメー
ジデータレコードを出力することで行われる。
First, in the object input in step Sl, all objects to be linked are input, and the external reference table,
Create an externally defined table. Next, in area allocation in step S2, the designated area is allocated to the input object. Thereafter, in symbol resolution in step S3, unresolved symbols such as external references are resolved and a load module is created. When all unresolved symbols have been resolved, the created load module is output in step S4, and the linker processing is terminated. The actual load module is composed of a plurality of memory image data records or one memory image data record, and the memory image data record is, for example, the 9th memory image data record.
The format is as shown in the figure. In this case, Address part 2: Information of the address where the memory image data is to be loaded Record length 3: Length of the memory image data Memory image data 4: Data of the memory image to be expanded (length is arbitrary) , the address part 2 indicates the address where the data 4 of the memory image is to be loaded, and the record length 3 indicates the length of the memory image data 4. Therefore, the output of the load module is the address where the data 4 of the memory image is to be loaded. All records will be output, and the process is as shown in the flowchart in Figure 1. In step S, it is determined whether or not the section ends. If NO, in step S6 all memory belonging to the section is output. This is done by outputting an image data record.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

しかしながら、このような従来のROM化プログラムの
生成方法にあっては、初期値付きの変数(Varl)を
ROM 領域内のある領域に書き込んでいるが、その領
域はプログラム開始時にRAM領域にコピーしなければ
らないため、このコピー処理をプログラム先頭に付加し
ている。したがって、プログラム作成時にはROM内の
初期値付きの変数(Varl)の開始位置が確定してい
る必要があるが、ソースコード(Code) 、定数(
Const)の大きさは結合処理が終了するまで不明で
ある。そのため、初期値付きの変数(Varl)は固定
領域(予めメモリコード(Code) %定数(Con
st)の大きさを予測し、その領域以降の領域、第6図
では1000番地から)に書き込んでいる。このとき、
Code、C。
However, in this conventional ROM program generation method, a variable (Varl) with an initial value is written to a certain area in the ROM area, but that area is copied to the RAM area when the program starts. Since it is necessary, this copy processing is added to the beginning of the program. Therefore, when creating a program, it is necessary to determine the starting position of a variable (Varl) with an initial value in the ROM, but it is also necessary to determine the starting position of a variable (Varl) with an initial value in the ROM.
Const) is unknown until the joining process is completed. Therefore, variables with initial values (Varl) are stored in a fixed area (memory code (Code) %constant (Con) in advance.
The size of st) is predicted and written in the area after that area (starting from address 1000 in FIG. 6). At this time,
Code, C.

nst領域から固定番地のVarl領域までの間の領域
5 (第6図(d)のハンチング部分)が設けられるた
め、この領域5がメモリの有効利用という点で無駄にな
るという問題点があった。
Since area 5 (hunting part in Figure 6(d)) is provided between the nst area and the Varl area at a fixed address, there is a problem that this area 5 is wasted in terms of effective memory utilization. .

また、従来は出力するに際し、Varlのような初期値
を持つ領域はROMへの書き込み後、手作業でROMの
割り付はアドレスをずらしていることから(第6図(c
)(d)参照)、煩わしい手作業が必要で面倒であり能
率が悪いという問題点があった。
In addition, when conventionally outputting an area with an initial value such as Varl, after writing to the ROM, the ROM allocation was done manually by shifting the address (see Figure 6 (c).
) (d)), there was a problem that it required troublesome manual work, was troublesome, and was inefficient.

そこで本発明は、リンカの結合処理に際しては初期値を
もつ変数を本来の位置(変更領域)に割り当て、ロード
モジュールを出力する際には初1朋値を持つ変数の初期
値を非変更領域の直後に移動して出力することにより、
メモリの無駄領域を無くして有効利用を図るとともに、
ROM化プログラムの生成に際して手作業を無くして能
率を向上できるROM化プログラムの生成方法を提供す
ることを目的としている。
Therefore, the present invention allocates variables with initial values to their original positions (changed areas) during linker binding processing, and assigns initial values of variables with initial values to unchanged areas when outputting a load module. By moving and outputting immediately after
In addition to eliminating wasted areas of memory and making effective use of it,
It is an object of the present invention to provide a method for generating a ROMized program that can eliminate manual work and improve efficiency when generating a ROMized program.

〔課題を解決するための手段〕[Means to solve the problem]

本発明によるROM化プログラムの生成方法は上記目的
達成のため、非変更領域と変更領域を有するメモリ領域
で複数のオブジェクトプログラムをリンカにより結合処
理してロードモジュールを生成するとともに、リンカの
結合処理に際してプログラムのソースや定数等の非変更
データについては非変更領域に割り当て、変数および変
更されるが初期値をもつ変数については変更領域に割り
当て、ロードモジュールに生威されたプログラムをRO
M化するに際しては前記非変更パラメータおよび初期値
をもつ変数についてのみROMの内容として書き込み、
ROM化プログラムを生成するROM化プログラムの生
成方法において、前記初期値をもつ変数を非変更領域に
おける非変更データの直後の特定シンボルで表示される
アドレスから始まる領域に割り当てる工程と、該工程に
より割り当てられた内容を含む非変更領域のデータをリ
ンカの出力としてROM化プログラムを生成する工程と
、を含むようにしている。
In order to achieve the above object, the method for generating a ROM program according to the present invention generates a load module by combining a plurality of object programs using a linker in a memory area having an unchanged area and a changed area. Unchanged data such as program sources and constants are allocated to the unchanged area, variables and variables that are changed but have initial values are allocated to the changed area, and the program created in the load module is transferred to the RO.
When converting to M, only the unchanged parameters and variables with initial values are written as ROM contents,
A method for generating a ROMized program that generates a ROMized program includes a step of allocating a variable having the initial value to an area starting from an address indicated by a specific symbol immediately after unchanged data in an unchanged area; The method includes the step of generating a ROMized program by using the data in the unchanged area including the updated contents as output from the linker.

〔作用) 本発明では、初期値をもつ変数はリンカの結合処理の段
階では本来の位置(変更領域)に割り当てられ、その後
の出カニ程で非変更領域における非変更データの直後の
特定シンボルで表示されるアドレスから始まる領域に割
り当てられ、そして非変更領域のデータが全てそのまま
ROMに書き込むべきデータとしてROM化プログラム
が生成される。
[Operation] In the present invention, variables with initial values are assigned to their original positions (changed areas) during the linker's linking process, and are assigned to specific symbols immediately after unchanged data in unchanged areas during subsequent output. A ROM program is generated as data that is allocated to an area starting from the displayed address, and all data in the unchanged area is to be written as is into the ROM.

したがって、非変更領域においてはデータの領域の連な
りに無駄な部分がなくなり、また、リンカにより出力さ
れたデータをそのままROMに書き込むべきデータとす
るのみで目的とするROM化プログラムの生成が可能と
なり、能率が向上する。
Therefore, in the non-change area, there is no wasted part in the series of data areas, and it is possible to generate the desired ROM program by simply using the data output by the linker as data to be written to the ROM. Improves efficiency.

〔実施例〕〔Example〕

以下、本発明を図面に基づいて説明する。 Hereinafter, the present invention will be explained based on the drawings.

第1〜5図は本発明に係るROM化プログラムの生成方
法の一実施例を示す図である。第1図はROM化プログ
ラムの生成方法を実現する装置の全体構成図であり、こ
の図において、11は各種の演算処理を行う中央演算装
置で、例えばある言語処理系のソースプログラムをコン
パイルしてオブジェクトプログラム12を生威し、これ
を外部記憶装置13に格納するとともに、リンカの作業
領域としてメモリ14を使用し、リンカにより複数のオ
ブジェクトプログラムを連結し、例えば外部参照される
アドレスを調べ、空白の部分を埋めて実行可能なプログ
ラムをロードモジュール15として生威し外部記憶装置
13に格納する。
1 to 5 are diagrams showing an embodiment of a method for generating a ROMized program according to the present invention. FIG. 1 is an overall configuration diagram of a device that implements the ROM program generation method. In this diagram, numeral 11 is a central processing unit that performs various arithmetic processing, for example, compiling a source program for a language processing system. The object program 12 is generated and stored in the external storage device 13, and the memory 14 is used as a work area for the linker, and the linker connects multiple object programs. An executable program is created by filling in the part and stored in the external storage device 13 as a load module 15.

16は端末機器で、例えばキーボードにより構成され、
端末機器16の上にはCRT等からなるデイスプレィ1
7が設置されている。
16 is a terminal device, such as a keyboard;
On top of the terminal device 16 is a display 1 consisting of a CRT or the like.
7 is installed.

以上の構成において、第2図はリンカ処理のフローチャ
ートであり、また第3図はROM化プログラムの生成プ
ロセスを示す図である。
In the above configuration, FIG. 2 is a flowchart of linker processing, and FIG. 3 is a diagram showing a ROMization program generation process.

第2図において、ステップS11でリンカ処理すべきオ
ブジェクトを入力し、ステップSI2で指定された領域
を割り付ける。これらのステップ処理は従来例と同様で
あり、そのプロセスは第3図(a)のように示される。
In FIG. 2, an object to be processed by the linker is input in step S11, and a designated area is allocated in step SI2. These step processes are similar to those of the conventional example, and the process is shown in FIG. 3(a).

次いで、ステップSでROM化を行うか否かを判別し、
ROM化を行うときはステップS、に進み、そうでない
ときはステップSI4をジャンプしてステップSISに
進む。
Next, in step S, it is determined whether or not to perform ROMization,
If ROMization is to be performed, the process proceeds to step S; otherwise, the process jumps to step SI4 and proceeds to step SIS.

ステップS、では特定シンボルの生成、すなわち領域を
割り付けた後の処理として特定シンボル(Varls)
に、ソースコード(Code)、定数(Const)領
域の直後のアドレスを割り当てて、この情報を外部定義
テーブルに加える(第3図(b)参照)。
In step S, a specific symbol (Varls) is generated as a process after the generation of a specific symbol, that is, the area is allocated.
The address immediately after the source code (Code) and constant (Const) area is assigned to , and this information is added to the external definition table (see FIG. 3(b)).

その後、ステップSI5でシンボルの解決処理を行う。Thereafter, symbol resolution processing is performed in step SI5.

このときの特徴としては、特定のシンボル(Varls
)を作成するだけで実際の領域を変更するわけではない
。領域は指定された領域のままシンボルの解決処理を行
う。領域の変更は、この次に記述するロードモジュール
の出力処理において行う。
The characteristics at this time include specific symbols (Varls
) but does not change the actual area. Symbol resolution processing is performed as the area remains the specified area. The area is changed in the load module output process described next.

次いで、ステップS16のロードモジュール出力処理で
は、領域をずらす処理を行う。この処理の詳細は第4図
のフローチャートで示される。まず、ステ・7プS21
で処理をしているセクションが終了か否かを判別し、終
了していないときはステップS2□で現在リンク処理を
しているオブジェクトがROM化を行い、かつ、出力セ
クションが初期値を持つ変数領域(Varl)であるか
否かを判別し、YESのときはステップS23でメモリ
イメージデータレコードのアドレス部をソースコード(
Code)、定数(Const)領域の直後に変更する
。これにより、出力するロードモジュールの構成はソー
スコード(Code)、定数(Const) 、初期値
を持つ変数(Varl)の各領域が連続して配置される
。なお、第3図(a)の割り付けを例にすると、シンボ
ルの解決が終了した時点でのメモリイメージデータレコ
ードは第5図(a)のように示される。次いで、ステッ
プSZ4でセクションに属する全メモリイメージデータ
レコードの出力処理を行う。一方、ステップS2□でN
oのときはステップS23をジャンプしてステップSZ
4に進む。したがって、ステップSzaではロードモジ
ュールの出力処理となり、この出力の際に、Code 
、 Con5t (第1.第2番目のメモリイメージデ
ータレコード)に関してはアドレス部の変更なしに出力
し、Varlに関してはアドレス部を2000からコー
ド、定数領域の直後のアドレスである0FOOに変更し
、出力する。この状態は第5図(b)のように示される
Next, in the load module output process of step S16, a process of shifting the area is performed. Details of this process are shown in the flowchart of FIG. First, Step 7 S21
It is determined whether the section being processed has ended or not, and if it has not ended, the object currently being linked is converted to ROM in step S2□, and the output section is set to a variable with an initial value. It is determined whether or not it is an area (Varl), and if YES, the address part of the memory image data record is converted into the source code (
Code) and immediately after the constant (Const) area. As a result, the configuration of the load module to be output is such that the areas of source code (Code), constants (Const), and variables with initial values (Varl) are arranged consecutively. Note that, taking the layout shown in FIG. 3(a) as an example, the memory image data record at the time when symbol resolution is completed is shown as shown in FIG. 5(a). Next, in step SZ4, all memory image data records belonging to the section are outputted. On the other hand, in step S2□
If o, jump to step S23 and proceed to step SZ.
Proceed to step 4. Therefore, in step Sza, the load module is outputted, and at the time of outputting, Code
, Con5t (first and second memory image data records) are output without changing the address part, and for Varl, the address part is changed from 2000 to 0FOO, which is the address immediately after the code and constant area, and output. do. This state is shown in FIG. 5(b).

以上のフロー処理に基づ<ROM化プログラムの生成を
わかりやすく説明するために、第3図を参照して述べる
と、いま、従来例と同様に、あるプログラム1がソース
コード(Code) 、定数(C。
In order to clearly explain the generation of a ROMized program based on the above flow process, referring to FIG. (C.

n5t)、初期値付きの変数(Varl) 、初期値な
しの変数(Var2)で構成され、そのプログラム1を
格納するメモリの構成がoooo番地から2000番地
までがROM、2000番地から4000番地までがR
AMで構成されているとする。リンカにおいては第3図
(a)に示すように従来と同様のメモリ割り付げを行う
。リンカの出力では、本実施例の1つの機能である、結
合処理時と出力時とで異なる領域に割り付ける機能を用
いて、Code 、 Con5tの領域の直後にVar
lを出力する(第3図(b)参照)。ROMへの書き込
みにおいてはこの出力された連続する3つの領域をその
まま書き込む(第3図(c)参照)。ROMに書き込ん
だ状態が割り付けられると状態と同じであるため、その
まま、ROMを割り付ける(第3図(d)参照)。次い
で、従来例と同様にプログラム実行の前にROMに割り
付けられたVarlの初g値を2000番地からの領域
にコピーシている(第3図(e)参照)。ここで、この
コピー処理において特定シンボルを用いることにより、
ROM上のVarlの初期(Ii!領域の先頭アドレス
を用いることができる。
n5t), a variable with an initial value (Varl), and a variable without an initial value (Var2).The structure of the memory that stores program 1 is ROM from address oooo to address 2000, and from address 2000 to address 4000. R
Suppose that it is composed of AM. The linker performs memory allocation similar to the conventional method, as shown in FIG. 3(a). In the output of the linker, by using the function of this embodiment that allocates different areas during the join process and when outputting, Var is assigned immediately after the Code and Con5t areas.
1 (see FIG. 3(b)). When writing to the ROM, the three consecutive output areas are written as they are (see FIG. 3(c)). Since the state written in the ROM is the same as the state when it is allocated, the ROM is allocated as is (see FIG. 3(d)). Next, as in the conventional example, the initial g value of Varl allocated to the ROM before program execution is copied to the area starting from address 2000 (see FIG. 3(e)). Here, by using a specific symbol in this copy process,
The initial address of Varl (Ii! area) on the ROM can be used.

このようにして、ROMの無駄領域をなくして、ROM
割り付は時にアドレスをずらすという煩わしい作業をな
くすことができる。その結果、メモリの有効利用が図れ
るとともに、ROM化プログラム生成の能率を向上させ
ることができる。
In this way, the wasted area of ROM is eliminated and the ROM
Allocation can sometimes eliminate the troublesome task of shifting addresses. As a result, memory can be used effectively and the efficiency of ROM program generation can be improved.

〔発明の効果〕〔Effect of the invention〕

本発明によれば、ROM化プログラムの生成に際してメ
モリ (非変更領域)の無駄な領域を無くして有効利用
を図ることができるとともに、煩わしい手作業を無くし
て能率を向上できるという効果が得られる。
According to the present invention, when generating a ROMized program, it is possible to eliminate wasted areas of memory (unchanged areas) and make effective use of the memory, and it is also possible to improve efficiency by eliminating troublesome manual work.

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

第1〜5図は本発明に係るROM化プログラムの生成方
法の一実施例を示す図であり、第1図はそのROM化プ
ログラムの生成方法を実現する装置の全体構成図、 第2図はそのリンカ処理のフローチャート、第3図はそ
のプロセスを説明する図、 第4図はそのロードモジュール出力処理のフローチャー
ト、 第5図はそのメモリイメージデータレコードを示す図、 第6〜9図は従来のROM化プログラムの生成方法を示
す図であり、 第6図はそのプロセスを説明する図、 第7図はそのリンカ処理のフローチャート、第8図はそ
のロードモジュール出力、処理のフローチャート、 第9図はそのメモリイメージデータレコードを示す図で
ある。 1・・・・・・プログラム、 11・・−・・・中央演算装置、 12・・・・−・オブジェクトプログラム、13・・・
・・・外部記憶装置、 14・・・・−・メモリ、 15・−・・・・ロードモジュール、 16・・・・・・端末機器、 17・・・・・・デイスプレィ。 一実施例のリンカ処理のフローチャー 第2図 ト 231例のロードモジュール出力処理のフロチャート 第 図 従来のリンカ処理のフC−チャート 第 図 アドレス セクション長 一冥施例のメモリイメージデー 第 アドレス セクション長 一タレコードを示す図 図 従来のロードモジュール出力処理のフローチャート従来
の/モリイメージデータレニ ドを示す図 第 図
1 to 5 are diagrams showing an embodiment of the ROM program generation method according to the present invention, FIG. 1 is an overall configuration diagram of a device that implements the ROM program generation method, and FIG. A flowchart of the linker processing, Fig. 3 is a diagram explaining the process, Fig. 4 is a flowchart of the load module output processing, Fig. 5 is a diagram showing the memory image data record, and Figs. 6 to 9 are diagrams explaining the process. FIG. 6 is a diagram explaining the process, FIG. 7 is a flowchart of linker processing, FIG. 8 is a flowchart of the load module output and processing, and FIG. 9 is a diagram showing a method of generating a ROM program. It is a figure which shows the memory image data record. 1...Program, 11...Central processing unit, 12...Object program, 13...
...External storage device, 14...Memory, 15...Load module, 16...Terminal device, 17...Display. Flowchart of linker processing in one embodiment Figure 2 Flowchart of load module output processing in example 231 Figure C-chart of conventional linker processing Figure Address section length Memory image data in example Address section Diagram showing long data record Flowchart of conventional load module output processing Diagram showing conventional /mori image data record

Claims (1)

【特許請求の範囲】 非変更領域と変更領域を有するメモリ領域で複数のオブ
ジェクトプログラムをリンカにより結合処理してロード
モジュールを生成するとともに、リンカの結合処理に際
してプログラムのソースや定数等の非変更データについ
ては非変更領域に割り当て、変数および変更されるが初
期値をもつ変数については変更領域に割り当て、 ロードモジュールに生成されたプログラムをROM化す
るに際しては前記非変更パラメータおよび初期値をもつ
変数についてのみROMの内容として書き込み、ROM
化プログラムを生成するROM化プログラムの生成方法
において、 前記初期値をもつ変数を非変更領域における非変更デー
タの直後の特定シンボルで表示されるアドレスから始ま
る領域に割り当てる工程と、該工程により割り当てられ
た内容を含む非変更領域のデータをリンカの出力として
ROM化プログラムを生成する工程と、を含むようにし
たことを特徴とするROM化プログラムの生成方法。
[Claims] A load module is generated by combining multiple object programs using a linker in a memory area that has an unchanged area and a changed area, and unchanged data such as program sources and constants are generated during the linker's combining process. are allocated to the unchanged area, variables and variables that are changed but have initial values are allocated to the changed area, and when the program generated in the load module is converted to ROM, the unchanged parameters and variables with initial values are allocated Only write as ROM contents, ROM
A method for generating a ROMized program that generates a ROMized program includes the steps of allocating a variable having the initial value to an area starting from an address indicated by a specific symbol immediately after unchanged data in an unchanged area; 1. A method for generating a ROMized program, comprising the step of generating a ROMized program by using data in an unchanged area including the contents as output from a linker.
JP22589789A 1989-08-31 1989-08-31 Generation of rom transformation program Pending JPH0390931A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP22589789A JPH0390931A (en) 1989-08-31 1989-08-31 Generation of rom transformation program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP22589789A JPH0390931A (en) 1989-08-31 1989-08-31 Generation of rom transformation program

Publications (1)

Publication Number Publication Date
JPH0390931A true JPH0390931A (en) 1991-04-16

Family

ID=16836597

Family Applications (1)

Application Number Title Priority Date Filing Date
JP22589789A Pending JPH0390931A (en) 1989-08-31 1989-08-31 Generation of rom transformation program

Country Status (1)

Country Link
JP (1) JPH0390931A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10456786B2 (en) 2013-03-12 2019-10-29 Abbott Laboratories Septums and related methods

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10456786B2 (en) 2013-03-12 2019-10-29 Abbott Laboratories Septums and related methods
US11731134B2 (en) 2013-03-12 2023-08-22 Abbott Laboratories Septums and related methods

Similar Documents

Publication Publication Date Title
JPH01154267A (en) Incorporating system for input/output device control program of operating system
JPH01306923A (en) System for connecting different languages
JP2927180B2 (en) Debugging method of information processing program and debugger therefor
JP2001216169A (en) Method, system, program and data structure for converting instruction of first bit architecture into instruction of second bit architecture
US6175935B1 (en) Software debugging method and recording medium to which debugging program has been recorded
JPH0390931A (en) Generation of rom transformation program
JPH0863421A (en) Centralized management system for hardware constitution information
JPH01295332A (en) Program allocation system
JP2764358B2 (en) Data driven information processor
JPH03135630A (en) Instruction scheduling system
JP2003076547A (en) System and method for automatically generating control software
JP2669387B2 (en) Database driven automatic program generation system
JPH07129408A (en) Executing system for language processing program
JP2000035882A (en) Method for dynamic change of function calling sequence
JPH05282134A (en) Divided load module formation system
JPH04117523A (en) Program editing device
JPS59121442A (en) Producing and processing method of desired code
JPH0736676A (en) Automatic assemble program arranging device
JPH02245934A (en) Data processor
JPH02130637A (en) Source code translating system
JPH0229828A (en) Logic circuit converting system
JPH0239242A (en) Temporary work area allocation system for electronic computer system
JPH02148220A (en) Selective copying system for program
JPH04282729A (en) Program converter
JPH07141189A (en) Overlay linking system