JPS5987550A - Data processing system - Google Patents

Data processing system

Info

Publication number
JPS5987550A
JPS5987550A JP19751582A JP19751582A JPS5987550A JP S5987550 A JPS5987550 A JP S5987550A JP 19751582 A JP19751582 A JP 19751582A JP 19751582 A JP19751582 A JP 19751582A JP S5987550 A JPS5987550 A JP S5987550A
Authority
JP
Japan
Prior art keywords
module
memory
address
program
read
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
JP19751582A
Other languages
Japanese (ja)
Inventor
Masamichi Kato
加藤 正道
Tatsurou Oishi
尾石 辰郎
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
Original Assignee
Hitachi 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 filed Critical Hitachi Ltd
Priority to JP19751582A priority Critical patent/JPS5987550A/en
Publication of JPS5987550A publication Critical patent/JPS5987550A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)

Abstract

PURPOSE:To use in common an area for a variable, which is used between programs used in common, by storing not only a program executing instruction but also an information required for coupling a program to others in a read only memory. CONSTITUTION:A module group is stored in a read only memory chip 17, and simultaneously, an information for coupling these modules is also stored. This chip 17 is installed to a socket 18. When an electric power source is turned on, a read only memory 12A is checked, a coupling information is found out, and this information secures a part of a read/write memory 12B as a couplling table of a program group and is stored in this table. It will do that this coupling processing is executed only once, and when the electric power source is turned on, a coupling instruction is executed by applying an interrupting signal to an operation processing device by a power-on resetting circuit 14. Also, it is executed by executing a coupling program stored in the read only memory. When this coupling processing is ended, a computer system can be used.

Description

【発明の詳細な説明】 〔発明の利用分野〕 本発明はデータ処理方式に関し、よシ詳細には、読出し
専用メモリに格納されたプログラムを共用化するととも
に、該共用するプログラム間で使用する変数用領域をも
共用化するようにしたデータ処理方式に関する。
[Detailed Description of the Invention] [Field of Application of the Invention] The present invention relates to a data processing method, and more particularly, the present invention relates to a data processing method, and more specifically, to sharing a program stored in a read-only memory, and to improving variables used between the shared programs. The present invention relates to a data processing method in which storage areas are also shared.

〔従来技術〕[Prior art]

計算機プログラムは1つあるいは複数のプログラム部分
(「モジュール」あるいは「サブルーチン」と呼ばれる
。以下、「モジュール」という。)から構成キj、てい
る。各モジュールは、通常、アセンブラあるいはコンパ
イラと呼ばれる変換プログラムにより、再配置可能形式
のプログラムに変換される。次に、これらの再配置可能
形式に変換された複数のモジュールは、リンケージ・エ
ディタと呼ぼれる結合編集プログラムにより、機械が解
釈・実行できる1つの機械語のプログラムに変換される
。この変換されたプログラムは読出し専用メモリ内等に
記憶されて逐次実行きれる。
A computer program is composed of one or more program parts (called "modules" or "subroutines", hereinafter referred to as "modules"). Each module is usually converted into a relocatable program by a conversion program called an assembler or compiler. Next, the plurality of modules converted into the relocatable format are converted into a single machine language program that can be interpreted and executed by a machine by a combination editing program called a linkage editor. This converted program is stored in a read-only memory or the like and can be executed sequentially.

1つのモジュール内では、制御の移@は自己相対形式に
より、モジュールをメモリ内のどのアドレスにセットし
ても実行することができる。また、該モジュール内で使
用する内部変数の領域は、読み書き可能メモリ内のスタ
ック上において動的に確保され使用はれる。すなわち、
実行時にモジュールの先頭で前記スタックLK該モジュ
ール内で使用される変数領域が確保さ几、該モジュール
の実行終了時に解放される。この変数の参照は、割付け
られた前記スタック上の変数領域の先頭からの相対位置
といつ形で行われる。前記スタックーヒにおけるモジュ
ールの変数用領域の先頭アドレスは、割付けられたとき
にレジスタにセットされており、このレジスタの値と、
前述の相対位置とにより変数参照に使用するアドレスが
求められる。
Within a module, transfer of control is self-relative and can be performed by setting the module to any address in memory. Furthermore, an area for internal variables used within the module is dynamically allocated and used on the stack in the readable/writable memory. That is,
The variable area of the stack LK used within the module is secured at the beginning of the module during execution, and is released when the execution of the module ends. This variable is referenced based on its relative position and form from the top of the allocated variable area on the stack. The start address of the module variable area in the stack is set in a register when it is allocated, and the value of this register and
The address used for variable reference can be found based on the above-mentioned relative position.

このような形式にすると、スタック鎖酸がメモリ内のど
の位f’fに確保されていても、プログラム中の変数参
照命令を変更する必要がない。従って、1つのモジュー
ル内での制御の移動、モジュール内の変数の参照は、該
モジュールがセットされるメモリ内のアドレスに依存せ
ず、任意の場所に実装して実行することができる。
With this format, there is no need to change the variable reference instruction in the program, no matter how far the stack chain acid is secured at f'f in the memory. Therefore, the transfer of control within one module and the reference of variables within a module do not depend on the address in memory where the module is set, and can be implemented and executed at any location.

しかしながら、異なるモジュール間での制御の移動や共
用変数の参照は、前述のアセンブラあるいはコンパイラ
と呼ばれる変換プログラムによる変換時には、結合先の
アドレスが決まっていないために、被#照モジュールの
参照命令からの相対番地や共用変数鎖酸の先頭からの相
対番地が決められない。リンケージ・エディタによ#)
複数のモジュールを結合することにょシそnらのアドレ
スが決まり、前記相対番地を求めることができるので、
結合芒几たプログラム全体に、任意の番地に実装して実
行することができる。
However, when transferring control between different modules or referencing a shared variable, the destination address is not determined during conversion by the above-mentioned conversion program called an assembler or compiler. A relative address or a relative address from the beginning of a shared variable chain cannot be determined. Linkage editor #)
The respective addresses are determined by combining multiple modules, and the relative address can be found, so
It can be implemented and executed at any address in the entire program with the combination awn.

プログラムを読出し専用メモリに格納して、これを任意
のシステムで使用できるようにするためには、まず、プ
ログラムを任意のアドレスに実装して実行できることが
必要条件の1つである。ところが、従来の計算機プログ
ラムは、前述の如く、結合されたプログラム全体は任意
の番地に実装して実行することはできるが、モジュール
単位ではこれを任意の番地に実装して実行することはで
きなかった。
In order to store a program in a read-only memory so that it can be used in any system, one of the requirements is that the program can be installed and executed at any address. However, in conventional computer programs, as mentioned above, although the entire combined program can be implemented and executed at any address, it is not possible to implement and execute each module at any address. Ta.

以下、この点について図面を用いて詳細に説明する。This point will be explained in detail below using the drawings.

第1図は従来の計算機におけるメモリに記憶されたプロ
グラム間の結合方式と結合用命令の形式の一例を示すも
ので、読出し専用メモIJMEMIに記憶されているプ
ログラムを重複して使用する場合、モジュール形式にし
て実行の先頭アドレスPGIをプログラム・コール(C
all )する命令の演算項3に記憶しておくか、アド
レス定数4をLとして読出し専用メモリMEM’2 中
に記憶しておき、前記読出し専用メモIJ M E M
 1における先頭アドレスPG2をレジスタに取出して
該レジスタの値(REG)5でプログラム・コールを行
9結合方式等を採っていた。
FIG. 1 shows an example of a method for linking programs stored in memory in a conventional computer and a format of a linking instruction. The program call (C
all) in the operand 3 of the instruction to do the above, or store it in the read-only memory MEM'2 with the address constant 4 as L, and read the read-only memory IJ MEM'2.
The starting address PG2 in 1 is taken out to a register, and the program is called with the value (REG) 5 of the register by combining rows 9 and the like.

しかしながら、これらの方式による場合には、共用する
プログラムの先頭アドレスが変ったとき、プログラム・
コールする命令の前記演算項3hるいは前記アドレス定
数4の値を変更する必要が生じて、前記読出し専用メモ
lJMEM’2に格納されているプログラムあるいはデ
ータの変更が必要になる。筐た、前記読出し専用メモリ
MEMI中に記憶さ扛ている1つまたは複数の共用され
るプログラムの実行先頭アドレスを記憶しておかなけれ
ばならないという問題もあった。
However, with these methods, when the start address of a shared program changes, the program
It becomes necessary to change the value of the operand 3h or the address constant 4 of the called instruction, and it becomes necessary to change the program or data stored in the read-only memory lJMEM'2. Another problem is that it is necessary to store the execution start address of one or more shared programs stored in the read-only memory MEMI.

また、第2図に示す如く、読出し専用メモリ中に記憶さ
れているプログラム間で変数用領域8を共用する場合に
は、その変数を定義しているプログラムと参照している
プログラムで、その変数のメモリを参照するのに変数用
領域8のアドレスVAR1を参照命令の演算項に記憶し
ておくか、アドレス定数9をVとして読出し専用メモリ
MEM’7に記憶しておき、前記読出し専用メモIJ 
M E M 6における変数用領域アドレスVAR,2
をレジスタに取出して、該レジスタの値(R,EG)で
変数用領域VAR2を参照する方式等を採っていた。
Furthermore, as shown in FIG. 2, when the variable area 8 is shared between programs stored in read-only memory, the program that defines the variable and the program that references the variable To refer to the memory of , the address VAR1 of the variable area 8 is stored in the operand of the reference instruction, or the address constant 9 is stored as V in the read-only memory MEM'7, and the address constant 9 is stored as V in the read-only memory MEM'7.
Variable area address VAR, 2 in MEM6
A method has been adopted in which the value (R, EG) of the register is taken out and the variable area VAR2 is referenced by the value (R, EG) of the register.

しかしながら、これらの方式も変数用領域のアドレスが
変ったとき、変数参照命令の前記演算項や前記アドレス
定数9の値を変更する必要が生じて読出し車用メモリM
EM’7に格納されているプログラムあるいはデータの
f更が必要となる等の問題があった。
However, in these methods, when the address of the variable area changes, it is necessary to change the operand of the variable reference instruction and the value of the address constant 9, and the readout memory M
There were problems such as the need to update the programs or data stored in EM'7.

〔発明の目的〕[Purpose of the invention]

本発明は上記事情に鑑みてなされたもので、その目的と
するところは、従来のデータ処理方式における上述の如
き問題を解消し、読出し車用メモリに格納されたプログ
ラムをモジュール単位で共用化するとともに、該共用す
るプログラム間で使用する変数用領域をも共用化するよ
うにしたデータ処理方式を提供することにある。
The present invention has been made in view of the above circumstances, and its purpose is to solve the above-mentioned problems in conventional data processing methods and to share programs stored in the readout vehicle memory on a module-by-module basis. Another object of the present invention is to provide a data processing method in which a variable area used between shared programs is also shared.

〔発明の概要〕[Summary of the invention]

本発明の要点は、複数の読出し専用メモリに格納された
プログラムを共用化するとともに、該共用するプログラ
ム間で使用する変数用領域を共用するデータ処デ方式に
おいて、前記プログラムを格納している読出し専用メモ
リには、該プログラムの機能を実行する命令の他に該プ
ログラムを他と結合するに必要な情報をも格納しておき
、結合を行う際には読み曹き可能なメモリ上に前記読出
し専用メモリごとに用意した結合用テーブルを使用して
行うように、また、前記プログラム間で共用する変数も
同様の方式で領域を割付は参罷できるようにした点にあ
る。
The gist of the present invention is to share a program stored in a plurality of read-only memories and to share a variable area used among the shared programs. In addition to instructions for executing the functions of the program, the dedicated memory also stores information necessary to combine the program with other programs, and when performing the combination, the readout is performed on a readable memory. The point is that area allocation and reference can be made using a connection table prepared for each dedicated memory, and in a similar manner for variables shared between the programs.

〔発明の実施例〕[Embodiments of the invention]

以下、本発明の実施例を図面に基づいて詳細に説明する
Embodiments of the present invention will be described in detail below with reference to the drawings.

第3図は本発明の適用対象である制御、事務処理あるい
は技術計算等に利用される小型計算機システムを示すも
ので、演算処理装置11、メモリ装置12、入出力制御
装置13等で構成されている。メモリ装置12は読出し
専用メモリ12Aと読み■き可能メモI712 Bとか
ら構成されてお楓前者はプログラムの命令や定数データ
を記憶しておくために、また、後者はプログラム実行時
に定数データ用として使用される。
FIG. 3 shows a small computer system used for control, office processing, technical calculations, etc. to which the present invention is applied, and is composed of an arithmetic processing unit 11, a memory device 12, an input/output control device 13, etc. There is. The memory device 12 consists of a read-only memory 12A and a readable memo I712B.The former is used to store program instructions and constant data, and the latter is used to store constant data during program execution. used.

上述の計算機システムの機能は、読、出し専用メモ1J
12Aに記憶されたプログラムの機能に依存しており、
読出し専用メモリ12Aを変換することにより異なった
機能を有する計算機システムとすることが可能である。
The functions of the computer system mentioned above are read-only memo 1J.
It depends on the function of the program stored in 12A,
By converting the read-only memory 12A, it is possible to create a computer system with different functions.

読出し専用メモリ12Aを実装するメモリボード16は
、第4図にその一例を示した如く、読出し専用メモリ・
チップ17をセットするだめの複数のソケット18が設
けられたもので、該ソケット18上の読出し専用メモリ
・チップ17を交換することによりプログラムを変える
ことができるものである。
The memory board 16 on which the read-only memory 12A is mounted, as shown in FIG.
A plurality of sockets 18 are provided for setting chips 17, and the program can be changed by replacing the read-only memory chips 17 on the sockets 18.

本発明の要点は、上記読出し専用メモリ・チップ中にモ
ジュール群を記憶させると同時に、これらのモジュール
を結合させるための情報をも記憶させることにより、上
述の如き読出し専用メモリ・チップの交換によるプログ
ラムの変更を行った場合でも、変更後のプログラムを自
由に結合して実行可能とした点にある。
The gist of the present invention is to store a group of modules in the read-only memory chip, and at the same time to store information for combining these modules, thereby making it possible to perform a program by replacing the read-only memory chip as described above. The point is that even if changes are made, the changed programs can be freely combined and executed.

前記ソケット18に上述の如き内容を記憶している読出
し専用メモリ・チップ17を装着する。
A read-only memory chip 17 storing the contents as described above is attached to the socket 18.

計算機システムの実行開始に先立って、例えば電源スィ
ッチをONにしたとき等に、読出し専用メモ1J12A
を調べて前記結合用情報を見つけ出す。
Before starting execution of the computer system, for example when turning on the power switch, the read-only memo 1J12A
, and find the combination information.

該情報は読み薔き可能なメモIJ 12 Bの一部をプ
ログラム群の結合用テーブルとして確保しここに記憶さ
せる。この結合処理は一度だけ行えば良く、例えば、上
述の如く電源スィッチをONにしたとき、パワーオン・
リセット回路14(第3図参照)により演算処理装置1
1に割込み信号を与えて結合用の命令を実行したり、読
出し専用メモリ中に記憶された結合用プログラムを実行
したシすることによって行う。この結合処理が終了すれ
ば、プログラムの実行開始アドレスに制御を渡して計算
機システムを使用することが可能となる。
This information is stored in a part of the readable memo IJ12B, which is secured as a table for connecting the program group. This connection process only needs to be performed once; for example, when the power switch is turned on as described above,
The arithmetic processing unit 1 is reset by the reset circuit 14 (see FIG. 3).
This is done by giving an interrupt signal to the CPU 1 and executing a linking instruction, or by executing a linking program stored in a read-only memory. When this connection process is completed, it becomes possible to use the computer system by passing control to the execution start address of the program.

以下これについてよシ詳細に説明する。This will be explained in detail below.

(1)共用されるモジュールの構造 第5図にモジュールの一例としての手続きPのプログラ
ム構造を示した。モジュール内の制御の移動は、第5図
に示される如く、移動命令から移動先命令への相対アド
レスと移動命令のおるアドレスとから計算した自己相対
アトレッジフグ方式によって行う。また、モジュール内
で使用する定数はモジュールの命令列と分離して読出し
専用メモリ17中に格納しておく。定数の参照は参闇命
令のアドレスと定数格納領域までの相対アドレスとから
計算した自己相対アドレッシング方式によって行う。
(1) Structure of shared module FIG. 5 shows the program structure of procedure P as an example of a module. As shown in FIG. 5, the movement of control within a module is performed by the self-relative attrition method calculated from the relative address from the movement instruction to the movement destination instruction and the address where the movement instruction is located. Further, constants used within the module are stored in the read-only memory 17 separately from the instruction string of the module. Constants are referenced using a self-relative addressing method calculated from the address of the reference instruction and the relative address to the constant storage area.

(1)@令■CMOVE  t、(At)、])+)の
説明手続@Pの内部変数の先頭から相対値t、の距離の
データをデータレジスタD】にセットする命令である。
(1) @Instruction ■CMOVE t, (At), ]) +) Explanation procedure This is an instruction to set data at a distance of relative value t from the beginning of the internal variable of @P to the data register D].

Alは後述する手続きPのスタック上に確保された内部
変数領域の先頭アドレスがセットされているアドレスレ
ジスタを示しテイル。A1 (At)HレジスタAiの
値(手続きPの内部変数領域の先頭アドレス)とtlを
加えた値を命令の参照メモリアドレスとすることを意味
する。
Al indicates an address register in which the start address of an internal variable area secured on the stack of procedure P, which will be described later, is set. A1 (At) H This means that the value obtained by adding the value of register Ai (the starting address of the internal variable area of procedure P) and tl is the reference memory address of the instruction.

(11)命令■CJump 4 (P C) ) (D
説明この命令の存在するメモリアドレスから相対値でA
2のメモリアドレスに分岐することを示している。A2
(pc)iq、この命令の存在するメモリアドレスすな
わちプログラム力ランタにA2をカロえた1直を命令の
参照アドレスとすることを示している(自己相対アドレ
ッシング)。
(11) Instruction ■CJump 4 (P C) ) (D
Description A relative value from the memory address where this instruction exists
This shows that the program branches to memory address No. 2. A2
(pc) iq indicates that the memory address where this instruction exists, that is, the first shift with A2 incremented to the program input address, is to be used as the reference address for the instruction (self-relative addressing).

シング方式で分岐する。Branch using the sing method.

スから相対値でA3のメモリアドレスの値をデータレジ
スタDJにセットすることを示している。定数の参照は
自己相対アドレッシング方式で参照する。
This indicates that the value of the memory address of A3 is to be set in the data register DJ as a relative value from the source. Constants are referenced using self-relative addressing.

第6図に前記手続きPの内部変数領域を有するスタック
の構造を示した。モジュール内で使用する内部変数の領
域は第6図に示す如く、読み書き可?rUメモ1712
B’内のスタック上に動的に確保され使用さニルる。す
なわち、実行時にモジニールの実行に先立って内部領域
が確保され、モジュールを抜は出るときに解放される。
FIG. 6 shows the structure of the stack having the internal variable area of the procedure P. Is the internal variable area used within the module readable and writable as shown in Figure 6? rU memo 1712
It is dynamically allocated and used on the stack in B'. That is, at the time of execution, an internal area is secured prior to execution of the module, and is released when the module is extracted and exited.

内部変数の参照は割付けられた前記スタック領域の先頭
からの相対位置という形式で行われ、変数領域の先頭ア
ドレスは割付けら扛ンtときにレジスタにセットされる
。変数領域はこのレジスタとモジュールの変数領域の先
頭からの相対値を用いて参照する。
References to internal variables are made in the form of relative positions from the top of the allocated stack area, and the top address of the variable area is set in a register when the variable area is allocated. The variable area is referenced using this register and the relative value from the beginning of the variable area of the module.

捷だ、外部モジュール同志の結合の戻りは、スタックあ
るいはレジスタに参照後の戻りアドレスをセットしてそ
れを使用して行う。
The trick is to return the combination between external modules by setting the return address after reference in the stack or register and using it.

(2)読出し専用メモリ・チップに格納されたモジュー
ルの結合方式 第7図は3つの読出し専用メモリ・チップ17□17、
および17.に格納されたモジュールとその参照関係を
示すものである。19は読み書き可能なメモ’J 12
 B上に設けられたモジュール結合用テーブルである。
(2) Combination method of modules stored in read-only memory chips FIG. 7 shows three read-only memory chips 17□17,
and 17. This shows the modules stored in , and their reference relationships. 19 is a read/write memo'J 12
This is a module combination table provided on B.

読出し専用メモリ・チップ(以下、[0Mチップ」とい
う)17.には、C:でモジュールCが定義されており
、そのモジュール中に他のROMチップで定義されたモ
ジュー)′vAおよびモジュールBを参照することを示
し7ている。同様に、ROMチップ172はモジュール
BおよびモジュールDを、それぞれB:、D:で定義し
ており、異なったROMチップで定義されたモジュール
CおよびモジュールAを参照することを示している。ま
た、ROMチップ17.はモジュール八を定義しておシ
、他のROMチップで定義されたモジュールC,モジュ
ールDおよびモジュールBを参照している。
Read-only memory chip (hereinafter referred to as "0M chip")17. In this example, module C is defined in C:, and module )'vA and module B defined in other ROM chips are referenced in this module. Similarly, the ROM chip 172 defines module B and module D as B: and D:, respectively, indicating that module C and module A defined in different ROM chips are referred to. Also, ROM chip 17. defines module 8 and references module C, module D, and module B defined in other ROM chips.

上述の3つのROMチップ1’l、、17□および17
3内のモジュール定義と参照を結合するために、各RO
Mチップごとに、結合用テーブルを、  用意する。R
OMチップ171はモジュールAおよびモジュールBを
参照しているので、2つのニレトリを持つ結合テーブル
191を、ROMチップ172はモジュールCおよびモ
ジュールA用に2つのエントリを持つ結合テーブル19
.を、まi、n、0Mチップ173はモジュールC,モ
ジュールDおよびモジュールB用に3つのエントリを持
つ結合用テーブル19.を用意する。上記各結合用テー
ブル198,192,198は読み書き可能なメモリ上
に確保され、プログラムの実行開始前等にモジュールの
定義側の実行開始アドレスをセットする。モジュール参
照命令は、結合用テーブルの対応するエンl−1,1を
参照して定義側に結合する。結合用テーブルのエントリ
とモジュール名の対応づけは、参照モジュール名の出現
順とする。ROMチツ7’17mはモジュールA、モジ
ュールBの順で参照されるため、該ROMチップ17、
用の結合用テーブル19.の最初のエントリがモジュー
ルA用、2番目のエントリがモジュールB用として対応
づけられる。
The three ROM chips 1'l, , 17□ and 17 mentioned above
To combine module definitions and references in each RO
Prepare a join table for each M chip. R
OM chip 171 references module A and module B, so it creates a join table 191 with two entries, and ROM chip 172 creates a join table 19 with two entries for module C and module A.
.. The i,n,0M chip 173 has a combination table 19. with three entries for module C, module D, and module B. Prepare. Each of the above-mentioned coupling tables 198, 192, and 198 is secured on a readable and writable memory, and the execution start address of the definition side of the module is set before starting execution of the program. The module reference instruction refers to the corresponding en l-1,1 of the connection table and connects it to the definition side. Entries in the binding table are associated with module names in the order in which the reference module names appear. Since the ROM chip 7'17m is referenced in the order of module A and module B, the ROM chip 17,
Join table for 19. The first entry is associated with module A, and the second entry is associated with module B.

(33ROMチップと結合用テーブルとの対応づけ前述
の如<、ROMチップごとに他R,OMチップで定義さ
れたモジュール参照のための結合用テーブルを用意する
。結合用テーブルが読み書き可能なメモリ七のどこに用
意されているかの情報を得る必要がある。任意のROM
チップ用の結合テーブルの先頭アドレスがわかれば、モ
ジュール参照命令は結合用テーブルの先頭からの相対位
置がわかっているので結合用テーブルを参照できる。
(Associating the 33ROM chip with the connection table As described above, a connection table is prepared for each ROM chip to refer to modules defined in other R and OM chips.The connection table can be read and written from memory It is necessary to obtain information on where the ROM is prepared.Any ROM
If the start address of the chip connection table is known, the module reference instruction can refer to the connection table since the relative position from the start of the connection table is known.

そこで、ROMチップごとに用意された前記結合用テー
ブルの先頭アドレスをセットしたアドレステーブルを用
意する。第8図(B)は上記アドレステーブルの例を示
すものでアシ、この例でに、3つのROMチップ17t
 、17?!および17゜用に、3つのエントリを持つ
アドレステーブル20を用意し、それぞれの結合用テー
ブルの先頭アドレスをプログラムの実行開始時等にセッ
トしたものである。このアドレステーブル20の先頭ア
ドレスは、レジスタ等にセットしておき参照可n目とす
る。
Therefore, an address table is prepared in which the leading address of the combination table prepared for each ROM chip is set. FIG. 8(B) shows an example of the above address table. In this example, three ROM chips 17t
, 17? ! An address table 20 having three entries is prepared for 17° and 17°, and the start address of each coupling table is set at the start of program execution. The first address of this address table 20 is set in a register or the like and can be referenced as the nth address.

前記ROMチップ171,172および17゜とアドレ
ステーブル20のエントリとの対応づけは、例えば、第
9図に示す如<、ROMチップの実装されているアドレ
スと関係づけることによって行う。すなわち、ROMチ
ップのサイズをある単位、例えば、2のベキ乗単位に決
めると、そのサイズごとにメモリアドレスを区分けして
、メモリの最初のブロックはアドレステーブルのエント
リの1%メモリの次のブロックはアドレステーブルのエ
ントリの2という如く対応づけられるというものである
。第9図の例では、メモリ空間(A)をROMチップサ
イズの21バイトずつのブロックに区切り、最初のメモ
リ・ブロックはアドレステーブルの最初のエントリと対
応づける。そこで実装されたROMチップは、ブロック
番号に対応するアドレステーブル上のエントリと関連づ
けられる。この方式によれば、複数のROMチップを1
つのブロックとしてアドレステーブルを1つ対応づけて
も良く、逆に、1つのROMチップを複数のブロックに
区分けして各々のブロック用にアドレステーブルの1つ
のエントリを対応づけることも可能である。
The ROM chips 171, 172, and 17° are associated with the entries in the address table 20, for example, by associating them with the addresses at which the ROM chips are mounted, as shown in FIG. In other words, if the size of the ROM chip is determined in a certain unit, for example, a power of 2 unit, then the memory addresses are divided according to the size, and the first block of memory is the next block of 1% memory of the address table entry. is associated with entry 2 in the address table. In the example of FIG. 9, the memory space (A) is divided into blocks of 21 bytes each having the size of a ROM chip, and the first memory block is associated with the first entry in the address table. The ROM chip mounted there is associated with an entry on the address table corresponding to the block number. According to this method, multiple ROM chips can be combined into one
One block may be associated with one address table, or conversely, one ROM chip may be divided into a plurality of blocks and one entry of the address table may be associated with each block.

(4)アドレス、結合用テーブルの参照方法モジュール
の参照と定義を結合する方式は、ROMチップごとに用
意された結合用テーブルと該結合用テーブルの先頭アド
レスを格納したアドレステーブルを用いて行うことを述
べた。この結合テーブルを参照して結合する手順を第1
0図に示す。任意のROMチップを実行中に他のROM
チップで定義されたモジュールの参照命令があられれた
場合、まず、その命令の所在アドレスを示すプログラム
力クンタから、ROMチップの実装アドレスを求める。
(4) How to refer to addresses and connection tables The method of combining module references and definitions must be performed using a connection table prepared for each ROM chip and an address table that stores the start address of the connection table. said. The first step is to refer to this join table and join.
Shown in Figure 0. While any ROM chip is running other ROM
When an instruction to refer to a module defined in a chip is issued, first, the mounting address of the ROM chip is obtained from the program input address indicating the location address of the instruction.

これによシ、アドレスチープールのエントリとの対応づ
けを行うことができる。
This allows for association with entries in the address pool.

例えば、ROMチップのサイズを2のi乗で示されるバ
イト数とすれば、プログラムカクンタをiだけ右にシフ
トしてエントリとアドレステーブル先頭アドレスとから
対応する結合テーブルの先頭アドレスを求めることがで
きる。そして、結合テーブルの先頭アドレスとROMチ
ップ内のモジュール参照順から求めた結合テーブルのエ
ン計り番号から、参照するモジュールの定義アドレスを
求めることができる。
For example, if the size of a ROM chip is the number of bytes represented by 2 to the power of i, it is possible to shift the program kakunta to the right by i and find the start address of the corresponding combination table from the entry and the start address of the address table. can. Then, the definition address of the module to be referenced can be obtained from the start address of the connection table and the counting number of the connection table determined from the module reference order in the ROM chip.

第10図の参照手j−のうち、ステップ(1)からステ
ップ(4)マではハードウェア化することができる。
Of the reference steps in FIG. 10, steps (1) to (4) can be implemented in hardware.

モジュール参照命令があられれたら結合用テーブルのア
ドレスまで求めてそのアドレスを間接参照するようにハ
ードワエアで命令を実現するものである。
When a module reference instruction is issued, the instruction is realized in hardware so as to obtain the address of the connection table and indirectly reference that address.

(5ン  モジュール結合用の情報 1’tOMチップに格納されたモジュールを結合するた
め、R,0Mチップごとの結合用テーブルと該結合用テ
ーブルの先頭アドレスを格納したアドレステーブルを使
用することは先に述べた。このテーブルを作成するため
に必要な情報は次の通υである。
(Information for module combination 1'In order to combine the modules stored in the tOM chip, it is necessary to use the combination table for each R, 0M chip and the address table that stores the start address of the combination table. The information required to create this table is as follows.

(a)  ROMチップ中で定義しているモジュール名
とモジュールの実行開始アドレス (bJ  他のROMチップ中で定義されたモジュール
の参照に関する情報 これらの結合用情報としてモジュール名で行う場合を具
体的に説明する。
(a) Module name defined in the ROM chip and execution start address of the module (bJ Information regarding references to modules defined in other ROM chips) Specifically, when using the module name as information for combining these explain.

第11図はROMに格納されたモジュールの定義を示す
情報の例を示すものである。モジュールの定義を示すパ
ターン11111111の2進数値で始まシ、その直後
にモジュール名の文字数を示す数値(この場合″4”)
とモジュール名全示す文字列(この場合”PRGI”)
が続く。文字列の直後が、モジュールの実行開始アドレ
スである。
FIG. 11 shows an example of information indicating module definitions stored in the ROM. It starts with the binary value of the pattern 11111111 that indicates the module definition, followed immediately by a number that indicates the number of characters in the module name (in this case "4")
and a string indicating the entire module name (in this case “PRGI”)
continues. Immediately after the string is the module execution start address.

第12図は同じ<ROMに格納されたモジュール参照用
の情報の例を示すものである。モジュール参照用の情報
の始まりを示すパターン11111110で示される2
進数値で始tb、モジュール名の文字数2名前の文字列
が参照順に続く。同じ名前が複数回参照される場合には
、最初に現われたときの1回だけ用意される。情報の終
シは名前の文字数が0であることから識別する。この情
報1l−t、ROMチップごとにまとまったところに用
意する。例えば、ROMチップの後部から領域を確保し
て格納する等の方法を用いる。
FIG. 12 shows an example of module reference information stored in the same ROM. 2 indicated by pattern 11111110 indicating the beginning of information for module reference
The string starts with the hexadecimal value tb, the number of characters of the module name is 2, and the name string follows in reference order. If the same name is referenced multiple times, it is provided only once, the first time it appears. The end of the information is identified because the number of characters in the name is 0. This information 1l-t is prepared in one place for each ROM chip. For example, a method such as securing an area from the rear of the ROM chip for storage is used.

第13図は定数格納領域の例を示すものである。FIG. 13 shows an example of a constant storage area.

定数格納領域の始まりを示すパターン11111100
と領域サイズを示す数値(この場合m)から構成される
情報が定数領域の先頭に設けられている。
Pattern 11111100 indicating the start of constant storage area
and a numerical value (m in this case) indicating the area size is provided at the beginning of the constant area.

(6)  モジュール結合用の情報からのテーブルの作
成 前記アドレステーブル20および結合用テーブル19は
次のようにして作成する。読み書き可能メモ’J 12
 B上に、第14図に示す如く、アドレステーブル20
の領域と結合用テーブル19の領域を決定する。ROM
チップを最初から調べて行き、モジュール参照用情報か
ら結合用テーブル19に必要な領域を確保する。そして
、結合用テーブル19の先頭アドレスをアドレステーブ
ル20にセットする。これが終了したら、次のROMチ
ップケ調べて同様の処理を行い、111次全ROMチッ
プについて四殊の処理を行う。これで、アドレステーブ
ル20と結合用テーブル19の確保とそれらの関・1系
づ(・すができたことになる。これらの処理はプログラ
ムの実行開始((先立って行わnる。
(6) Creation of a table from module combination information The address table 20 and the combination table 19 are created as follows. Read/write memo'J 12
On B, as shown in FIG. 14, the address table 20
, and the area of the join table 19 are determined. ROM
The chip is examined from the beginning, and the necessary area is secured in the connection table 19 from the module reference information. Then, the start address of the combination table 19 is set in the address table 20. When this is completed, the next ROM chip is checked and the same process is performed, and the fourth process is performed for all the 111th ROM chips. This means that the address table 20 and the join table 19 have been secured and their connections have been completed. These processes are performed prior to the start of program execution.

(7)結合用テーブルへのモジュール定義アドレスのセ
ット 原理的にはROfxチップを調べてモジュール定義情報
を探し定義アドレスを求め、その定義モジュールを参照
しているROMチップを再び最初から探して対応する結
合テーブルのエントリに格納すれば艮い。したし1から
、この方法では、 ROMチップを河匿も(実際には゛
定義モジュール名の数+1″回)最初から探すことにな
り能率が悪い。
(7) Setting the module definition address in the binding table In principle, check the ROfx chip, search for module definition information, find the definition address, and then search again from the beginning for the ROM chip that references that definition module. Just store it in the join table entry. However, from 1, this method requires searching for the ROM chip from the beginning (actually, ``number of defined module names + 1'' times), which is inefficient.

そこで、(6)に述べた結合用テーブル19とアドレス
チーフル20を作成するとき、同じモジュールの参照に
ついては、結合用テーブル19上でチェーンで結合して
おき、モジュール定義が現われたら、前記チェーンをた
どって定義アドレスをセットするようにする。モジュー
ル定義がROMチップ上に出現したら、上記処理を行い
、以後同じ名前に対して定義アドレスを求められるよう
な新たなテーブルを作成して探索回数を減らすことも可
能である。この処理は前記(6Jの処理と同様にプログ
ラムの実行開始に先立って行う。
Therefore, when creating the combination table 19 and address file 20 described in (6), references to the same module are connected by a chain on the combination table 19, and when a module definition appears, the to set the definition address. When a module definition appears on a ROM chip, it is also possible to perform the above processing and create a new table from which definition addresses can be found for the same name in the future, thereby reducing the number of searches. This process is performed prior to the start of program execution, similar to the process of (6J) above.

(8〕  モジュール間で共用する変数の参照方式R,
OMチップ間で参照するモジュールの間で共用する変数
の参將万式を第15図により説明する。
(8) Reference method R for variables shared between modules,
The universal expression of variables shared between modules referenced between OM chips will be explained with reference to FIG.

第15図にROMチップ17、訃よび17□に格納さ几
たモジュールAおよびモジュールBでXという共用変数
を参照し−Cいる例を示すものである。
FIG. 15 shows an example in which the shared variable X is referenced by the ROM chip 17, the module A and the module B stored in the memory 17□.

読み書きOT能能メモリ上共用便数領域21に、変数用
軸域を確保し、ヤのアドレスをROMチップごとに用意
した結合用テーブル19′の対応するエリア(19,’
 、 19?、’ )にセットして参照するという、モ
ジュール結合方式と同様の方式であり、異なるところは
、結合用テーブル19′の内容がモジュールの定義アド
レスの代シに共通変数領域の害H寸はアドレスがセット
されることである。
An axis area for variables is secured in the shared number area 21 on the read/write OT function memory, and the corresponding area (19,'
, 19? , ' ) and refer to it, which is similar to the module binding method.The difference is that the contents of the binding table 19' are used instead of the definition address of the module, and the length of the common variable area is set to the address. is set.

(9)共用変数領域割付は用情報 共用変数領域を割付けるための情報は、変数を定義して
いるモジュールが格納されているR OMチップ側に用
意する。その形式は第16図に示す如く、共用変数領域
割付は情報の始まりを示すパターン111111100
2進数値表現の後に、変数名の文字数、変数名の文字列
、割付はメモリサイズが必要な数だけ続く。この例では
変数名ttX”に1゛0のメモリサイズを割付けたこと
が示されている。情報の終9は文字数がOということで
識別する。なお、第12図、第16図を比較すれば明ら
かな如く、共用変数参照情報はモジュール参照用情報と
同じ形式を有しており、同一場所に用意される。従って
、結合用テーブルのエントリは共用変数参照とモジュー
ル参照とを含めて決めることになる。
(9) Information for allocating the shared variable area Information for allocating the shared variable area is prepared on the ROM chip side in which the module that defines the variable is stored. The format is shown in Figure 16, where the shared variable area allocation is a pattern 111111100 indicating the beginning of information.
After the binary value representation, the number of characters for the variable name, the character string for the variable name, and the allocation continue as many times as the memory size requires. This example shows that a memory size of 1゛0 has been allocated to the variable name tt As is clear, the shared variable reference information has the same format as the module reference information and is prepared in the same location.Therefore, the entries in the join table should be determined by including the shared variable references and module references. become.

(10)  共用変数領域の割付けと結合用テーブルへ
の割付はアドレスセット アドレステーブルと結合用テーブルとの確保および関係
づけについては(6)で述べた通りである。
(10) The allocation of the shared variable area and the allocation to the binding table are as described in (6) regarding the address set and the securing and relationship between the address table and the binding table.

共通変数領域の割付けl−1:ROMチップを調べて行
き、割付は用情報を見つけたならば、共通変数領域に必
要なメモリサイズを割付ける。次に、その変数参照情報
をROMテップJ:を探して児つけ、対応する結合用テ
ーブルのエントリに割付けた変数領域をセットする。
Allocation of common variable area 1-1: Examine the ROM chip, and if allocation information is found, allocate the necessary memory size to the common variable area. Next, the variable reference information is searched for in the ROM step J:, and the allocated variable area is set in the entry of the corresponding join table.

上述の如く構成された結合用テーブルおよびアドレステ
ーブルを用いることによシ、モジュール名を使ってモジ
ュールを互いに参照し合うこと、およびモジュール間で
共用変数を参照し合うことが可能となる。
By using the connection table and address table configured as described above, it becomes possible to mutually refer to modules using module names and to refer to shared variables between modules.

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

以上述べた如く、本発明によれば、複数の読出し専用メ
モリに格納されたプログラムを共用化するとともに、該
共用するプログラム間で使用する変数用領域を共用する
データ処理方式において、前記プログラムを格納してい
る読出し専用メモリには、該プログラムの機能を実行す
る命令の他に該プログラムを他と結合するに必要な情報
をも格納しておき、結合を行う際には読み書き可能なメ
モリ上に前記読出し専用メモリごとに用意した結合用テ
ーブルを使用して行うように、また前記プログラム間で
共用する変数も同様の方式で領域を割付は参照できるよ
うにしたので、前記読出し専用メモリ中の各プログラム
を、いわば部品として利用することが可能となる。また
、これらのプログラム群を組合わせてシステムを構築す
ることも容易にできるようになり、その一部を修正する
場合にも、対応するプログラムを格納しているメモリ・
チップを交換するだけで済むという如く、きわめて実用
的な効果を奏するものである。
As described above, according to the present invention, in a data processing method in which a program stored in a plurality of read-only memories is shared and a variable area used among the shared programs is shared, the program is stored. In addition to the instructions that execute the program's functions, the read-only memory stored therein also stores the information necessary to combine the program with other programs. By using a join table prepared for each read-only memory, and by using the same method for variables shared between the programs, the area can be allocated and referenced. It becomes possible to use the program as a component, so to speak. In addition, it has become easier to build a system by combining these programs, and even when modifying a part of it, the memory that stores the corresponding program can be saved.
This has extremely practical effects, as all you need to do is replace the chip.

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

第1図、第2図は従来のデータ処理方式を示す図、第3
図は本発明の適用対象である小型計算機システムを示す
図、第4図はそのメモリボードを示す図、第5図はプロ
グラムモジュールを示す図、第6図はプログラムモジュ
ールの内部変数が割付けられるスタックを示す図、第7
図は本発明の一実施例であるプログラム結合方式に用い
る結合テーブルと対応するR、0Mチップとの関係を示
す図、第8図はROMチップごとに用意された結合用テ
ーブルとチップとの関係づけを行うためのアドレステー
ブルとの関係を示す図、第9図アドレステーブルとチッ
プとの対応づけ方式を示す図、第10図はモジュール参
照命令とモジュールとを結合させる処理手順を示す図、
第11図はROM中のモジュール定義情報を示す図、第
12図はROM中のモジュール参照情報を示す図、第1
3図はROM中の定義領域を示す図、第14図は読み書
き可能なメモリに結合用テーブルとアドレステーブル領
域を確保する形式を示す図、第15図は異なるR OM
チップに格納されたモジュール間で共用する変数を参照
するための方式を示す図、第16図はROMチップ上の
共用変数割付は情報を示す図である。 11・・・演算処理装置、12・・・メモリ装置、12
人・・・ROM、12B・・・読み書き可能メモリ、1
3・・・入出力装置、14・・・パワーオンリセット回
路、17.171・・・ROMチップ、18・・・ソケ
ット、19・・・結合用テーブル、20・・・アドレス
テーブル、第 1 圀 第 2 図 巣 8 図 ” )                     (
T3)                    re
)Y9 図 IA)                   (B)
頂/θ 区 第 11  図 第 IZ  図 ’A I3  圀 χ 14 図 e?       a
Figures 1 and 2 are diagrams showing conventional data processing methods, and Figure 3 is a diagram showing the conventional data processing method.
The figure shows a small computer system to which the present invention is applied, Fig. 4 shows its memory board, Fig. 5 shows a program module, and Fig. 6 shows a stack to which internal variables of the program module are allocated. Figure 7 showing
The figure shows the relationship between the combination table used in the program combination method, which is an embodiment of the present invention, and the corresponding R and 0M chips. Figure 8 shows the relationship between the combination table prepared for each ROM chip and the chip. FIG. 9 is a diagram showing a method for associating address tables and chips; FIG. 10 is a diagram showing a processing procedure for linking a module reference instruction and a module;
FIG. 11 is a diagram showing module definition information in ROM, FIG. 12 is a diagram showing module reference information in ROM,
Figure 3 shows the definition area in the ROM, Figure 14 shows the format for securing the join table and address table area in the readable/writable memory, and Figure 15 shows the definition area in the ROM.
FIG. 16 is a diagram showing a method for referencing variables shared between modules stored in a chip. FIG. 16 is a diagram showing information on shared variable allocation on a ROM chip. 11... Arithmetic processing device, 12... Memory device, 12
Person: ROM, 12B: Readable/writable memory, 1
3... Input/output device, 14... Power-on reset circuit, 17.171... ROM chip, 18... Socket, 19... Connection table, 20... Address table, 1st field Figure 2 Nest Figure 8” ) (
T3) re
)Y9 Figure IA) (B)
Top/θ Ward No. 11 Fig. IZ Fig.'A I3 Area χ 14 Fig. e? a

Claims (1)

【特許請求の範囲】[Claims] 複数の胱出し専用メモリに格納されたプログラムを共用
化するとともに、該共用するプログラム間で使用する変
数用領域を共用するデータ処理方式において、読み書き
可能なメモリ巾に、前記共用するプログラムの結合用テ
ーブルおよび共用する変数の領域を参照するテーブルを
、前記複数の読出し専用メモリごとに設けて、前記プロ
グラム結合用テーブルに前記複数の読出し専用メモリ中
の谷プログラムの実行開始アドレスをセットし、該プロ
グラム結合用テーブルを使用して被参照プログラムと参
照命令とを結合するとともに、前記共用する変数の領域
を参照するテーブルに前記読出し専用メモリ中の各変数
の割付は先アトL/スをセットし、該変数用領域参照テ
ーブルを使用してう“ログラム間で変数を共用すること
を特徴とするデータ処理方式。
In a data processing method in which programs stored in a plurality of memories dedicated to bladder evacuation are shared, and a variable area used among the shared programs is shared, a readable/writable memory width is used for combining the shared programs. A table that refers to a table and a shared variable area is provided for each of the plurality of read-only memories, and the execution start address of the valley program in the plurality of read-only memories is set in the program combination table, and the program combining the referenced program and the referenced instruction using a combination table, and setting a destination L/s for each variable in the read-only memory in the table that refers to the shared variable area; A data processing method characterized in that variables are shared between programs using the variable area reference table.
JP19751582A 1982-11-12 1982-11-12 Data processing system Pending JPS5987550A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP19751582A JPS5987550A (en) 1982-11-12 1982-11-12 Data processing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP19751582A JPS5987550A (en) 1982-11-12 1982-11-12 Data processing system

Publications (1)

Publication Number Publication Date
JPS5987550A true JPS5987550A (en) 1984-05-21

Family

ID=16375742

Family Applications (1)

Application Number Title Priority Date Filing Date
JP19751582A Pending JPS5987550A (en) 1982-11-12 1982-11-12 Data processing system

Country Status (1)

Country Link
JP (1) JPS5987550A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61206038A (en) * 1985-03-11 1986-09-12 Sony Corp Programming executing method for computer
JPS61164301U (en) * 1985-03-29 1986-10-11

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61206038A (en) * 1985-03-11 1986-09-12 Sony Corp Programming executing method for computer
JPS61164301U (en) * 1985-03-29 1986-10-11
JPH0419041Y2 (en) * 1985-03-29 1992-04-28

Similar Documents

Publication Publication Date Title
US4780819A (en) Emulator system utilizing a program counter and a latch coupled to an emulator memory for reducing fletch line of instructions stored in the emulator memory
JPH01154267A (en) Incorporating system for input/output device control program of operating system
JPH1011289A (en) Instruction number expansion method in parallel processor, and parallel processors
US3651473A (en) Expandable interlock exchange for multiprocessing systems
JPS5987550A (en) Data processing system
JPS5822464A (en) Control system for multiprocessor
JPS5864552A (en) Data processing system
JP2611394B2 (en) Programmable controller
US7213127B2 (en) System for producing addresses for a digital signal processor
JPH0267632A (en) Method for constituting branch instruction in electronic computer
JPS58158759A (en) Information processing device
JPS62107339A (en) Instruction constituting method for microcomputer
JP2560693B2 (en) Program link system for data flow type computer
JPS5918787B2 (en) TLB partition method
JPH0237425A (en) Digital signal processor
JP2621898B2 (en) Dynamic resolution processing method of external reference type address constant
JPS58217052A (en) Linking method of program
JPH0740227B2 (en) Data overlay segment allocation method
JPH01258029A (en) Data processor
JPS63253458A (en) Address converting circuit
Khalaf et al. Identification of a program segment from memory dump
JPS5870357A (en) Microprogrammed processor and operation thereof
JP2000056969A (en) Register file
JPS63298463A (en) System bus system
JPH02118727A (en) System for calling system sub-routine