JPS6375836A - Program forming device - Google Patents
Program forming deviceInfo
- Publication number
- JPS6375836A JPS6375836A JP21807386A JP21807386A JPS6375836A JP S6375836 A JPS6375836 A JP S6375836A JP 21807386 A JP21807386 A JP 21807386A JP 21807386 A JP21807386 A JP 21807386A JP S6375836 A JPS6375836 A JP S6375836A
- Authority
- JP
- Japan
- Prior art keywords
- section
- program
- address
- input
- module
- 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
Links
- 238000000034 method Methods 0.000 description 7
- 238000010586 diagram Methods 0.000 description 4
Abstract
Description
【発明の詳細な説明】
[産業上の利用分野]
本発明は、プログラム作成装置に関し、特にマイクロコ
ンピュータに適用する機械語プログラム作成を支援する
ためのプログラム作成装置に関するものである。DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a program creation device, and particularly to a program creation device for supporting creation of a machine language program applied to a microcomputer.
[従来の技術]
第8図は従来装置によるプログラム作成手順の一例を示
す。[Prior Art] FIG. 8 shows an example of a program creation procedure using a conventional device.
従来、例えばアセンブリ言語で記述されたソースプログ
ラムをアセンブルすると、データセクションおよびテキ
ストセクション共に同じファイルとしてオブジェクトフ
ァイルが作成される。そしてこれらのリンク時にデータ
セクションおよびテキストセクションのそれぞれにオリ
ジンアドレスを与えてオブジェクトのアドレスを決定し
ていた。この際、同図に示すようにひとつのプログラム
がn個のモジュール(モジュール1〜モジユールn)か
ら構成されているならば、各モジュールのデータセクシ
ョン(datal 〜datan)同志、テキストセク
ション(textlNtextn)同志は併合されて、
リンクを行った後にはそれぞれ1個のデータセクション
、1個のテキストセクションを有するオブジェクトプロ
グラムOB’が作成される。Conventionally, when a source program written in, for example, assembly language is assembled, an object file is created in which both the data section and the text section are the same file. When these links are made, an origin address is given to each of the data section and text section to determine the address of the object. In this case, if one program is composed of n modules (module 1 to module n) as shown in the figure, the data section (datal to datan) of each module and the text section (textlNtextn) of each module are has been merged,
After linking, object programs OB' each having one data section and one text section are created.
[発明が解決しようとする問題点]
このため、従来装置では、各セクションごとの任意なオ
リジンアドレスを設定することができず、従ってシステ
ムに合せたきめ細かな対応を施すことが困難であった。[Problems to be Solved by the Invention] For this reason, in the conventional device, it is not possible to set an arbitrary origin address for each section, and it is therefore difficult to take detailed measures tailored to the system.
[問題点が解決するための手段]
本発明は、かかる問題点を解決し、ひとつのソースプロ
グラムが複数個のモジュールから構成されている場合に
おいて、各セクション(データセクションおよびテキス
トセクション)毎に各別にオリジンアドレスを設定でき
るようにし、セクションごとのメモリへの任意な配置を
可能とすることを目的とする。[Means for solving the problem] The present invention solves the problem, and when one source program is composed of a plurality of modules, each section (data section and text section) is The purpose is to enable separate origin addresses to be set and arbitrary allocation of each section to memory.
そのために、本発明は、第1図に示すように、複数のモ
ジュールから成るソースプログラムSPに対し、モジュ
ール毎にオリジンアドレスを設定可能な設定手段100
と、ソースプログラムSPのアセンブルを行うアセンブ
ル手段110Aを有し、設定に従ったセクションに分け
た状態で、アセンブルされたオブジェクトプログラムO
Pを作成する作成手段110と、セクション間の相互参
照を検定し、アドレス調整を行う調整手段120とを具
えたことを特徴とする。To this end, the present invention provides a setting means 100 that can set an origin address for each module for a source program SP consisting of a plurality of modules, as shown in FIG.
and an assembling means 110A for assembling the source program SP, and the assembled object program O is divided into sections according to settings.
It is characterized by comprising a creation means 110 for creating P, and an adjustment means 120 for verifying mutual references between sections and adjusting addresses.
[作用]
すなわち、本発明によれば、複数のモジュールを含むソ
ースプログラムに対し、セクション毎のオブジェクトプ
ログラムの任意の配置が可能となるとともに、セクショ
ン間に相互参照がある場合にもこれが誤りなく解決され
たオブジェクトプログラムを得ることができる。[Operation] That is, according to the present invention, it is possible to arbitrarily arrange object programs for each section in a source program including a plurality of modules, and even if there are mutual references between sections, this can be resolved without error. You can obtain a converted object program.
[実施例] 以下、図面を参照して本発明の詳細な説明する。[Example] Hereinafter, the present invention will be described in detail with reference to the drawings.
第2図は本発明プログラム作成装置の構成の一例を示す
。ここで、21はマイクロプロセッサ形態のCPU 、
22はRAMであり、後述の外部記号表を展開するため
の領域やプログラムないしその作成用の作業用領域(ワ
ークエリア)を有する。23はROMであり、アセンブ
ラを含め、第3図につき後述するプログラム作成手順を
格納する。FIG. 2 shows an example of the configuration of the program creation device of the present invention. Here, 21 is a CPU in the form of a microprocessor,
22 is a RAM, which has an area for developing an external symbol table, which will be described later, and a work area for creating a program or the like. 23 is a ROM which stores a program creation procedure, which will be described later with reference to FIG. 3, including an assembler.
24は例えば、フロッピディスクFD等外部記憶装置を
有する入出力装置であり、フロッピディスクFDからの
ソースプログラム入力用、およびフロッピディスクFD
へのオブジェクトプログラム出力用ないし作成手順上で
形成される中間のプログラムの一時保存用に用いる。ま
た、25は後述の処理の指示を与えるためのコマンド入
力用の入力手段としてのキーボードである。24 is an input/output device having an external storage device such as a floppy disk FD;
It is used for outputting object programs to or temporarily storing intermediate programs formed in the creation procedure. Further, 25 is a keyboard as an input means for inputting commands for giving instructions for processing to be described later.
第3図は第1図示の実施例によるプログラム作成手順の
一例を示すフローチャート、第4図〜第7図は第3図示
の各手順における処理の態様を説明するための説明図で
あり、これら図を用いて本実施例によるプログラム作成
処理を説明する。FIG. 3 is a flowchart showing an example of the program creation procedure according to the embodiment shown in FIG. 1, and FIGS. The program creation process according to this embodiment will be explained using the following.
まず、ステップS31にてキーボード25よりアセンブ
ル実行コマンドが入力されると、入出力装置24のフロ
ッピディスクFD上の記憶エリアに展開されたソースプ
ログラムを読出し、第4図に示すようにアセンブラを起
動してモジュールの翻訳を行う、この結果、テキストセ
クションのオブジェクトファイルとデータセクションの
オブジェクトファイルとが別れて入出力装置24のフロ
ッピディスクfD上の記憶エリアに作成される。ここで
、ソースモジュールがn個あったならば、この段階でオ
ブジェクトファイルが2n個作成されることになる。First, in step S31, when an assemble execution command is input from the keyboard 25, the source program developed in the storage area on the floppy disk FD of the input/output device 24 is read out, and the assembler is started as shown in FIG. As a result, object files for the text section and object files for the data section are created separately in the storage area on the floppy disk fD of the input/output device 24. Here, if there are n source modules, 2n object files will be created at this stage.
次にキーボード25より操作者が適宜指定したオリジン
アドレスを含むアドレス設定コマンドが入力されるとス
テップ532が実行され、第5図に示すように、フロッ
ピディスクFDの記憶エリアに各オブジェクトファイル
に対してコマンドで指定されたオリジンアドレスが得ら
れるように再配置処理を施す。この結果、入出力装置2
4のフロッピディスクFD上の記憶エリアには21個の
アドレス設定済セクションが作成される。Next, when an address setting command including an origin address appropriately designated by the operator is input from the keyboard 25, step 532 is executed, and as shown in FIG. 5, each object file is stored in the storage area of the floppy disk FD. Performs relocation processing to obtain the origin address specified by the command. As a result, input/output device 2
Twenty-one addressed sections are created in the storage area on the fourth floppy disk FD.
次いで、キーボード25より外部記号表作成コマンドが
人力され、ステップS33が実行され、第6図に示すよ
うに、各アドレス設定済セクションで定義されている外
部記号名とその外部記号の値とを該アドレス設定済セク
ションより抽出してその対応をテーブル化し、外部記号
表テーブルとしてRAM22のテーブル領域に展開する
。Next, an external symbol table creation command is entered manually from the keyboard 25, step S33 is executed, and as shown in FIG. 6, the external symbol name defined in each address setting section and the value of that external symbol are The addresses are extracted from the section where addresses have been set, the correspondence is made into a table, and the data is developed in the table area of the RAM 22 as an external symbol table.
ここで、具体的には、外部記号名とは、あるモジュール
で他のモジュールに属するプログラムのブロックを参照
するとき、例えばジャンプやコールを行うとき、その飛
び先のブロックに付された名称(ラベル)であり、外部
記号の値とはそのアドレスである。Here, specifically, an external symbolic name is a name (label ), and the value of an external symbol is its address.
次に、キーボード25より外部記号参照解決コマンドが
入力されると、ステップS34が実行され、第7図に示
すように、各アドレス設定済セクションでの外部記号参
照をRAM22に展開された外部記号表テーブルによっ
て解決してアドレスデータに置換し、当該外部記号が解
決されたセクションを入出力装置24のフロッピディス
クFD上の記憶エリアに作成する。このとき、外部記号
解決法セクションはセクション単位に構成され、かつ操
作者所望のオリジンアドレスに設定されたオブジェクト
ファイルであり、かくの如くしてアセンブリ言語で記述
されたソースプログラムから機械語のオブジェクトプロ
グラムを得る。Next, when an external symbol reference resolution command is input from the keyboard 25, step S34 is executed, and as shown in FIG. The external symbol is resolved using a table and replaced with address data, and a section in which the external symbol is resolved is created in a storage area on the floppy disk FD of the input/output device 24. At this time, the external symbol solution section is an object file that is configured in section units and set to the origin address desired by the operator, and in this way, the source program written in assembly language can be converted into a machine language object program. get.
[発明の効果]
以上説明したように、本発明によれば、プログラムを構
成するモジュールの中のセクションごとにオリジンアド
レスが任意に設定できるので、プログラムのセクション
ごとの自由なメモリへの配置が可能となる。すなわち、
例えば実行回数の多いテキストセクションやアクセス回
数の多いデータセクションはSRAMへ配置し、その他
のセクションはDRAMへ配置するというきめ細かなプ
ログラム作成を行うことができ、従ってシステムの最適
な設計への効用ははなはだ大である。[Effects of the Invention] As explained above, according to the present invention, since the origin address can be set arbitrarily for each section in the modules that make up the program, it is possible to freely arrange each section of the program in memory. becomes. That is,
For example, it is possible to create detailed programs such as locating frequently executed text sections and frequently accessed data sections in SRAM, and locating other sections in DRAM, which is extremely useful for optimizing system design. It's large.
第1図は本発明の全体構成図、
第2図は本発明の一実施例を示すブロック図、
第3図は第2図示の実施例に係るプログラム作成手順の
一例を示すフローチャート、
第4図ないし第7図は、第3図示の各ステップにおける
処理の態様を説明するための説明図、第8図は従来装置
によるプログラム作成処理を説明するための説明図であ
る。
21・・・CPU 。
22・・−RAM 。
23・・−ROM 。
24・・・入出力装置、
25・・・キーボード。
第3図
第4図
第5図
第6図
第7図FIG. 1 is an overall configuration diagram of the present invention, FIG. 2 is a block diagram showing an embodiment of the present invention, FIG. 3 is a flowchart showing an example of a program creation procedure according to the embodiment shown in FIG. 4, and FIG. 7 to 7 are explanatory diagrams for explaining the processing aspects in each step shown in FIG. 3, and FIG. 8 is an explanatory diagram for explaining the program creation process by the conventional apparatus. 21...CPU. 22...-RAM. 23...-ROM. 24...I/O device, 25...Keyboard. Figure 3 Figure 4 Figure 5 Figure 6 Figure 7
Claims (1)
記モジュール毎にオリジンアドレスを設定可能な設定手
段と、 ソースプログラムのアセンブルを行うアセンブル手段を
有し、前記設定に従ったセクションに分けた状態で、ア
センブルされたオブジェクトプログラムを作成する作成
手段と、 前記セクション間の相互参照を検定し、アドレス調整を
行う調整手段とを具えたことを特徴とするプログラム作
成装置。[Scope of Claims] A source program consisting of a plurality of modules has a setting means that can set an origin address for each module, and an assembler that assembles the source program, and divides the source program into sections according to the settings. 1. A program creation device comprising: creation means for creating an assembled object program in a state in which the object program is assembled; and adjustment means for verifying mutual references between the sections and adjusting addresses.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP21807386A JPS6375836A (en) | 1986-09-18 | 1986-09-18 | Program forming device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP21807386A JPS6375836A (en) | 1986-09-18 | 1986-09-18 | Program forming device |
Publications (1)
Publication Number | Publication Date |
---|---|
JPS6375836A true JPS6375836A (en) | 1988-04-06 |
Family
ID=16714218
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP21807386A Pending JPS6375836A (en) | 1986-09-18 | 1986-09-18 | Program forming device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPS6375836A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0484321A (en) * | 1990-07-27 | 1992-03-17 | Hitachi Ltd | Program preparing device |
JP2005050196A (en) * | 2003-07-30 | 2005-02-24 | Matsushita Electric Ind Co Ltd | Encryption program execution method and its device |
-
1986
- 1986-09-18 JP JP21807386A patent/JPS6375836A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0484321A (en) * | 1990-07-27 | 1992-03-17 | Hitachi Ltd | Program preparing device |
JP2005050196A (en) * | 2003-07-30 | 2005-02-24 | Matsushita Electric Ind Co Ltd | Encryption program execution method and its device |
JP4557516B2 (en) * | 2003-07-30 | 2010-10-06 | パナソニック株式会社 | ENCRYPTED PROGRAM GENERATION DEVICE AND ENCRYPTED PROGRAM GENERATION METHOD |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US4595981A (en) | Method of testing interfaces between computer program modules | |
JPS6375836A (en) | Program forming device | |
JPH06348766A (en) | Method and device for incorporating tool | |
JPH01193944A (en) | System for automatically selecting test item | |
JPH06110733A (en) | Test case generating device of program | |
JPH0528088A (en) | Method for automatically generating hardware constitution information | |
JPS6022373B2 (en) | Program conversion mechanism for programmable control equipment | |
US20050080608A1 (en) | Simulator for request/response systems | |
JP2885957B2 (en) | Sequence program programming method and apparatus | |
JPH04116721A (en) | System definition directive analysis system | |
JP2811804B2 (en) | Variable output range specification method | |
JP3996114B2 (en) | How to place the program | |
JP2982725B2 (en) | Automatic program generator | |
EP1061461A1 (en) | Database system | |
JPS5960677A (en) | Simulation system for enterprise model | |
JPH06236259A (en) | Automatic program generator | |
JPH0219925A (en) | Document production system | |
JPH0581004A (en) | Automatic document generation system | |
JPH0484323A (en) | Program preparing device | |
JPH0371229A (en) | Program controller | |
JPH02264333A (en) | Intermediate language development processing system | |
JPH11184680A (en) | File editing method, method and device for developing program using the same, and storage medium | |
JP2000259399A (en) | Source code structure of computer program and machine device wherein object code generated therefrom is built in as control procedure | |
JPH05143568A (en) | Knowledge verification supporting device | |
JPH0250730A (en) | Language converting system based upon common machine word |