JPH0410026A - Command processor for terminal equipment - Google Patents

Command processor for terminal equipment

Info

Publication number
JPH0410026A
JPH0410026A JP2110448A JP11044890A JPH0410026A JP H0410026 A JPH0410026 A JP H0410026A JP 2110448 A JP2110448 A JP 2110448A JP 11044890 A JP11044890 A JP 11044890A JP H0410026 A JPH0410026 A JP H0410026A
Authority
JP
Japan
Prior art keywords
processing
command
identifier
code
data
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
JP2110448A
Other languages
Japanese (ja)
Inventor
Keiji Izumi
恵治 泉
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.)
Olympus Corp
Original Assignee
Olympus Optical 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 Olympus Optical Co Ltd filed Critical Olympus Optical Co Ltd
Priority to JP2110448A priority Critical patent/JPH0410026A/en
Publication of JPH0410026A publication Critical patent/JPH0410026A/en
Pending legal-status Critical Current

Links

Landscapes

  • Computer And Data Communications (AREA)

Abstract

PURPOSE:To identify and extract a command given from a host device with a simple means and in a small table capacity by storing the same processing identifier tables of other stages via a processing identifier table of each stage in correspondence with plural single-unit codes. CONSTITUTION:A processing identifier table 3 stores plural identifiers including an identifier showing one of plural processing means 1 and the identifiers showing the tables 3 of other stages in correspondence with the single-unit codes. Plural stages of such tables 3 are stored in a table storage means 4 according to the command length. In addition, the identifiers showing the same tables 3 of other stages are stored in the table 3 of each stage in correspondence with plural single-unit codes. Thus the table capacity can be reduced and a command given from a host device can be identified and extracted with a simple means and in a small table capacity. Then the data can be processed at a high speed.

Description

【発明の詳細な説明】 [産業上の利用分野コ 本発明は、ホストコンピュータ等の上位装置より転送さ
れるコード化された印字情報を受取って印字出力し、ま
た上位装置より転送された制御コード及びエスケープシ
ーケンス等によるホストコマンドによって印字のだめの
環境条件等が変更可能なプリンタ等の端末機に係り、特
に、そのような端末機におけるホストデータからホスト
コマンドやパラメータを識別・抽出するコマンド処理装
置に関する。
[Detailed Description of the Invention] [Industrial Application Field] The present invention receives coded print information transferred from a host computer or other host device and prints it out, and also prints out a control code transferred from the host computer. The present invention relates to terminal devices such as printers in which the environmental conditions of the printing reservoir can be changed by host commands using escape sequences, etc., and particularly relates to command processing devices for identifying and extracting host commands and parameters from host data in such terminal devices. .

[従来の技術] 近年、ホストコンピュータ等により作成されたデータを
高速且つ大量に印字出力するためのプリンタとして、ペ
ージプリンタが用いられるようになってきている。この
ページプリンタには、ホストコンピュータより転送され
た制御コード及びエスケープシーケンス等によるホスト
コマンドによって印字のための環境条件等か変更可能な
ものかある。
[Prior Art] In recent years, page printers have come to be used as printers for printing out large quantities of data created by host computers and the like at high speed. Some page printers are capable of changing environmental conditions for printing by host commands such as control codes and escape sequences transferred from the host computer.

このような環境条件等か変更可能なページプリンタに対
してホストコンピュータより転送されるASCIIコー
ドで表現される印字情報は、実際に印字される通常文字
コート(21h〜7Eh)と、CR,LF等の1ハイド
の制御コド(00h〜20 h、  7 F h)とに
大別される。
Print information expressed in ASCII codes transferred from the host computer to page printers that can change environmental conditions, etc. is the normal character code (21h to 7Eh) that is actually printed, CR, LF, etc. It is roughly divided into 1 Hyde control code (00h to 20h, 7Fh).

トコ口がASCI Iコード等の1バイトによる情報た
けでは、プリンタ諸条件の変更等の複雑な制御ができな
いため、前記制御コードの中のESCコード(IBh)
をコマンドヘッダとして複数バイトで構成されたコマン
ド群(以降ESCシーケンスと呼ぶ)を用意し、印字に
おける文字間隔や、行間隔の設定、マージンオフセット
等の1ページ内の印字位置制御等、印字を実行するため
の環境条件の制御を行っている。
Since complicated control such as changing printer conditions cannot be performed with only one byte information such as ASCI I code, ESC code (IBh) in the control code
Prepare a command group consisting of multiple bytes (hereinafter referred to as an ESC sequence) with the command header as a command header, and execute printing such as character spacing, line spacing settings, and printing position control within one page such as margin offset. Environmental conditions are controlled to ensure that

ところが上記のESCシーケンス(コマンド)は複雑な
コード体系を成しており、その識別・抽出はプリンタコ
ントローラにとって非常に複雑な処理を必要とする。
However, the ESC sequence (command) described above has a complicated code system, and its identification and extraction requires very complicated processing for the printer controller.

例えば、ホストコンピュータからrくesc>&a5V
JのようなESCシーケンスを転送されたとする。ここ
で、[<esc>J、r&J。
For example, from the host computer r esc>&a5V
Suppose that an ESC sequence such as J is transferred. Here, [<esc>J, r&J.

rag、rVJは、ESCシーケンスを識別するのに用
いられ、また「5」は、このESCシーケンスが意味す
るコマンドに渡されるパラメータである。ESCシーケ
ンスにおいて、この「5」が位置するところは数値フィ
ールドと呼ばれ、文字列r5J、r5.Oj、r05.
OOJ等は全て数値「5」として認歳されるようになっ
ている。
rag, rVJ are used to identify the ESC sequence, and "5" is a parameter passed to the command meant by this ESC sequence. In the ESC sequence, the area where this "5" is located is called a numeric field, and the character strings r5J, r5 . Oj, r05.
All OOJ etc. are recognized as age ``5''.

ページプリンタ内のプリンタコントローラは、ホストコ
ンピュータから「<esc> (IBh)Jを入力され
ると、ESCシーケンス抽出処理へ制御を移行する。こ
のESCシーケンス抽出処理においては、プリンタコン
トローラは、r<esc>J以後のデータについて、以
下に示すような判断処理を順に行なわなければならず、
処理が複雑で、処理時間も大きなものであった。
When the printer controller in the page printer receives "<esc>(IBh)J" from the host computer, it transfers control to ESC sequence extraction processing. In this ESC sequence extraction processing, the printer controller > Regarding the data after J, the following judgment processing must be performed in order,
The processing was complicated and took a long time.

即ち上記判断処理としては、(1)r<esc>Jに続
く2データ(即ちr&J 、raJ )かESCシーケ
ンスとして適切なものであるかどうかの判断、(2)数
値フィールドにおける数値表記か適正であるかどうかの
判断(r++5J、r5.、OJ等は不正である)、及
び(3)数値フィールドの入力が終了したかどうか、及
びESCシーケンスの終了を示すデータ(rVJ )が
ESCシーケンスとして適切なものであるかどうかの判
断、等かある。しかも、各判断に於いては、入力された
ブタを予め記憶されている複数のデータと順次に比較す
ることにより行なわなければならないため、一つの判断
であっても非常に多大な時間を要していた。
That is, the above judgment process includes (1) judgment whether the two data following r<esc>J (i.e. r&J, raJ) are appropriate as an ESC sequence, and (2) judgment whether the numerical representation in the numerical field is appropriate. (r++5J, r5., OJ, etc. are invalid), and (3) whether the input of the numerical field is completed and the data (rVJ) indicating the end of the ESC sequence is appropriate as an ESC sequence. There is such a thing as determining whether something is a thing or not. Moreover, each judgment must be made by sequentially comparing the input data with multiple pieces of data stored in advance, so even one judgment requires an extremely large amount of time. was.

さらに、ESCシーケンスが、上5己したような形量外
に、例えば[<esc>−Jとか「<esc> (8U
J  (ここで、「8」はコマンドパラメータ)等も有
効である場合など、プリンタコントローラのESCシー
ケンス抽出処理は非常に複雑になり、処理に必要な時間
も増大する。
Furthermore, the ESC sequence may be changed to other forms such as [<esc>-J or "<esc> (8U
J (here, "8" is a command parameter), etc., is also valid, the ESC sequence extraction process of the printer controller becomes extremely complicated, and the time required for the process increases.

[発明か解決しようとする課題] そこで、各コード(データ)毎に行なうべき処理の識別
子(アドレス)を記述したテーブルを用意し、これを参
照して処理するようにすることにより、判断処理を減ら
すことが考えられている。
[Invention or problem to be solved] Therefore, by preparing a table that describes the identifier (address) of the process to be performed for each code (data) and performing the process by referring to this table, the judgment process can be performed. It is thought that it can be reduced.

しかしながら、そのようにした場合、処理に必要な時間
は削減できるか、そのために必要となるテーブルの量は
膨大なものとなってしまう。
However, in such a case, the time required for processing can be reduced, or the amount of tables required for this purpose becomes enormous.

そこで本発明は上記の点に鑑みて成されたもので、上位
装置より転送されるコマンドを、簡単な手段で且つ少な
いテーブル量で識別・抽出することを可能とする端末機
のコマンド処理装置を提供することを目的とする。
The present invention has been made in view of the above points, and provides a command processing device for a terminal device that allows commands transferred from a host device to be identified and extracted by simple means and with a small amount of tables. The purpose is to provide.

さらに本発明は、ESCシーケンスの形の変更や、解析
手順の変更を容易に達成することが可能な端末機のコマ
ンド処理装置を提供することを目的とする。
A further object of the present invention is to provide a command processing device for a terminal that can easily change the form of an ESC sequence and the analysis procedure.

[課題を解決するための手段] 本発明の端末機のコマンド処理装置は、それぞれ上位装
置からの特定のコマンドに従った処理を行なう複数の処
理手段1(第1図の機能ブロック図を参照、以下同じ)
と、 上位装置からの1単位または複数単位のコードで構成さ
れるコマンドを、1単位のコート毎に取り込むコマンド
入力手段2と、 前記複数の処理手段1の1つを示す識別子及び他殺の処
理識別子テーブル3を示す識別子を含む複数の識別子を
1単位のコードに対応させて格納した処理識別子テーブ
ル3を、コマンド長に応して複数段格納したテーブル記
憶手段4と、前記コマンド入力手段2により取り込まれ
た1単位のコードに応じて前記処理識別子テーブル3か
ら処理識別子を得、該識別子により前記複数の処理手段
1の一つを動作させ、もしくは他殺の処理識別子テーブ
ル3のいずれかを次の1単位のコードのための処理識別
子テーブル3として選択する処理選択手段5とを備えて
いる。
[Means for Solving the Problems] A command processing device for a terminal according to the present invention includes a plurality of processing means 1 (see the functional block diagram of FIG. 1, same as below)
, a command input means 2 that takes in a command consisting of one unit or a plurality of codes from a host device for each unit of code, and an identifier indicating one of the plurality of processing means 1 and a murder processing identifier. A processing identifier table 3 in which a plurality of identifiers including an identifier indicating table 3 are stored in correspondence with one unit of code is taken in by the table storage means 4 storing multiple stages according to the command length and the command input means 2. A processing identifier is obtained from the processing identifier table 3 according to the one unit code received, and one of the plurality of processing means 1 is operated using the identifier, or one of the processing identifiers table 3 for murder is activated as follows. A processing selection means 5 is provided for selecting a processing identifier table 3 for a unit code.

しかもこの場合、各段の理識別子テーブル3が、同一の
他殺の処理識別子テーブル3を示す識別子を複数の前記
1単位のコードに対応させて格納している。
Moreover, in this case, each stage of the processing identifier table 3 stores identifiers indicating the same murder processing identifier table 3 in association with a plurality of one-unit codes.

特に、本発明の端末機のコマンド処理装置では、前記テ
ーブル記憶手段4に格納された複数段の処理識別子テー
ブル3の内、前記処理選択手段5によって最初に用いら
れる一段目の処理識別子テーブルには、1バイトの文字
コードと制御コードに対応する識別子及びエスケープシ
ーケンスコードに対応して次に用いられるべき二段目の
処理識別子テーブルを示す識別子を格納し、 前記二段目の処理識別子テーブルには、印字のための環
境条件を示す識別子及び三段目の処理識別子テーブルを
示す識別子を格納し、 前記二段目の処理識別子テーブルか、同一の三段目の処
理識別子テーブルを示す識別子を前記1単位のコードの
複数に対応させて複数格納している。
Particularly, in the terminal command processing device of the present invention, among the plurality of processing identifier tables 3 stored in the table storage means 4, the first processing identifier table used first by the processing selection means 5 is , an identifier corresponding to a 1-byte character code and a control code, and an identifier indicating a second-stage processing identifier table to be used next in correspondence with an escape sequence code, and the second-stage processing identifier table includes: , stores an identifier indicating environmental conditions for printing and an identifier indicating a third stage processing identifier table, and stores an identifier indicating the second stage processing identifier table or the same third stage processing identifier table as the first stage. Multiple units are stored corresponding to multiple unit codes.

[作用] 本発明の端末機のコマンド処理装置では、テーブル記憶
手段4に、複数の処理手段1の1つを示す識別子及び他
殺の処理識別子テーブル3を示す識別子を含む複数の識
別子を1単位のコードに対応させて格納した処理識別子
テーブル3を、コマンド長に応じて複数段格納しておき
、しかも、各段の理識別子テーブル3が、同一の他殺の
処理識別子テーブル3を示す識別子を複数の1単位のコ
ードに対応させて格納しているため、テーブルの量が少
なくて済み、このように少ない量の処理識別子テーブル
3を参照して、処理選択手段5がコマンド入力手段2に
より取り込まれた1単位のコードに応して処理手段1を
選択的に動作せしめるので、上位装置からのコマンドを
簡単な手段で且つ少ないテーブル量で識別・抽出するこ
とがてき、処理を高速に実行することか可能となる。
[Operation] In the terminal command processing device of the present invention, a plurality of identifiers including an identifier indicating one of the plurality of processing means 1 and an identifier indicating the murder processing identifier table 3 are stored in the table storage means 4 in one unit. The processing identifier table 3 stored in correspondence with the code is stored in multiple stages according to the command length, and each stage of the processing identifier table 3 stores multiple identifiers indicating the same murder processing identifier table 3. Since the table is stored in correspondence with one unit of code, the amount of tables is small, and the process selection means 5 refers to the small amount of process identifier table 3, and the process selection means 5 is inputted by the command input means 2. Since the processing means 1 is selectively operated in accordance with one unit of code, commands from the host device can be identified and extracted by simple means and with a small amount of tables, and processing can be executed at high speed. It becomes possible.

[実施例コ 以下、本発明の一実施例について図面を参照して説明す
る。
[Embodiment] Hereinafter, an embodiment of the present invention will be described with reference to the drawings.

端末機としてのプリンタ10は、第2図に示すように、
上位装置としてのホストコンピュータ100に接続され
たプリンタコントローラ12と、該プリンタコントロー
ラ12によって制御される実際の印字動作を行なうプリ
ンタエンジン14とで構成されている。
The printer 10 as a terminal device, as shown in FIG.
It is comprised of a printer controller 12 connected to a host computer 100 as a host device, and a printer engine 14 that performs actual printing operations controlled by the printer controller 12.

プリンタコントローラ12は、印字制御を主査するため
のCPU16を有している。このCPU16には、バス
18を介して、上記CPU16で実行される制御プログ
ラムを格納した読み出し専用のプログラムメモリ20、
各種制御情報の書き込み/読み出し時に使用するワーク
メモリ22、上記ホストコンピュータ100よりバス2
4を介して印字情報を読み込むためのホストI/F26
、画像を形成するための補助プロセッサとしてのラスタ
プロセッサ28、DMAコントローラ30、上記プリン
タエンジン14に対して印字開始等の命令を送信したり
、プリンタエンジン14の状態等の情報を受信するため
の制御情報用エンジン17F32が接続されている。
The printer controller 12 includes a CPU 16 for controlling printing. This CPU 16 is connected via a bus 18 to a read-only program memory 20 that stores a control program to be executed by the CPU 16;
Work memory 22 used for writing/reading various control information, bus 2 from the host computer 100
Host I/F 26 for reading print information via 4
, a raster processor 28 as an auxiliary processor for forming an image, a DMA controller 30, and control for sending commands such as starting printing to the printer engine 14 and receiving information such as the status of the printer engine 14. An information engine 17F32 is connected.

上記ラスタプロセッサ28には、バス34を介して、各
種フォントの形状をビットマツプで格納するフォントメ
モリ36と、上記ホストコンピュータ100より転送さ
れた文字コード等の印字情報に従って上記フォントメモ
リ36のデータを配列した画像情報や、ホストコンピュ
ータ100より転送されたビットイメージデータを格納
し、その後、上記プリンタエンジン14にラスタスキャ
ンデータを転送するためのイメージメモリ38が接続さ
れている。また、上記プリンタエンジン14にラスタス
キャンデータを転送するための画像情報用エンジンI/
F40も、上記バス34を介して上記ラスタプロセッサ
28に接続されている。
The raster processor 28 includes a font memory 36 that stores the shapes of various fonts in the form of bitmaps via a bus 34, and data in the font memory 36 that is arranged in accordance with printing information such as character codes transferred from the host computer 100. An image memory 38 is connected to store image information and bit image data transferred from the host computer 100, and then to transfer raster scan data to the printer engine 14. Also, an image information engine I/I for transferring raster scan data to the printer engine 14 is provided.
F40 is also connected to the raster processor 28 via the bus 34.

なお、第2図中の参照番号42は、後述するコマンド識
別・抽出処理で参照される処理テーブルが記憶されたテ
ーブルメモリである。また、参照番号44は、上記ホス
トコンピュータ100によらない所定のコマンドを入力
するためのキースイッチ(図示せず)を有した操作パネ
ルである。
Note that reference number 42 in FIG. 2 is a table memory in which a processing table referred to in command identification/extraction processing to be described later is stored. Further, reference number 44 is an operation panel having a key switch (not shown) for inputting a predetermined command not based on the host computer 100.

このような構成のプリンタ10では、CPU16は、ホ
ストコンピュータ100より転送された印字情報をホス
トI/F26より読み込み、その読み込んだ文字コード
に対応するフォントメモリ36のアドレスと、ワークメ
モリ22のカーソルレジスタ46に格納された現在のカ
ーソル位置情報に対応するイメージメモリ38のアドレ
ス等の情報より、ラスタプロセッサ28用の内部コマン
ド(以降、ラスクコマントと称す)を生成して、ラスタ
プロセッサ28に転送する。ラスタプロセッサ28は、
このラスクコマントを受けて、フォントメモリ36のデ
ータをイメージメモリ38上に配列し、後のCPU16
からの指令によりプリンタエンジン14にラスタスキャ
ンデータを送出する。
In the printer 10 having such a configuration, the CPU 16 reads the print information transferred from the host computer 100 from the host I/F 26, and stores the address of the font memory 36 corresponding to the read character code and the cursor register of the work memory 22. Based on information such as the address of the image memory 38 corresponding to the current cursor position information stored in the cursor 46, an internal command for the raster processor 28 (hereinafter referred to as a rask command) is generated and transferred to the raster processor 28. The raster processor 28 is
In response to this rask command, the data in the font memory 36 is arranged on the image memory 38, and the data in the font memory 36 is arranged on the image memory 38, and then
Raster scan data is sent to the printer engine 14 according to a command from the printer engine 14.

なお、本実施例では、フォントメモリ36のデータをイ
メージメモリ38に転送する際に、上記の構成でラスタ
プロセッサ28を使用することで処理速度を上げている
が、フォントメモリ36及びイメージメモリ38をCP
U16のバス18に配置し、CPU16が直接フォント
メモリ36のデータをイメージメモリ38に書き込む構
成としてもよい。
In this embodiment, when transferring the data in the font memory 36 to the image memory 38, the processing speed is increased by using the raster processor 28 with the above configuration. C.P.
It may be arranged on the bus 18 of the U 16 and the CPU 16 directly writes data in the font memory 36 to the image memory 38.

続いて実際の動作の説明に先だって、本実施例において
使用する各種制御情報を、第3図も共に参照して説明す
る。
Next, before explaining the actual operation, various control information used in this embodiment will be explained with reference to FIG. 3 as well.

まず、ホストコンピュータ100より転送された印字情
報を格納するだめのバッファとして、ワークメモリ22
のホストコマンドバッファ(以降、HCBと称す)48
に、「a」ワードの長さのHCBブロック50(第3図
)がrbJ個用意され、各HCBブロック50にそれぞ
れ「0」からr (b−1)JまでのIDが付与される
First, the work memory 22 is used as a buffer for storing print information transferred from the host computer 100.
host command buffer (hereinafter referred to as HCB) 48
rbJ HCB blocks 50 (FIG. 3) having a length of "a" words are prepared, and each HCB block 50 is assigned an ID from "0" to r (b-1)J.

各HCBブロック50は、ブロックの先頭の1ワードの
ブロック間リンク情報エリア501と、r(a−1)J
ワードの印字情報(ホストコマンド)を格納するための
エリア502とで構成される。リンク情報エリア501
には、当該HCBブロック50だけて1ページの印字情
報の格納が完結せず、別のHCBブロック50に印字情
報の格納を行うような際に、続<HCBブロック50の
IDrO〜(b−1)Jが書き込まれるようになってい
る。当該HCBブロック50で格納が完結しているとき
には、リンク情報として、「−1」が書き込まれる。
Each HCB block 50 has an inter-block link information area 501 of one word at the beginning of the block, and r(a-1)J
It consists of an area 502 for storing word print information (host command). Link information area 501
In this case, when the printing information of one page is not completely stored in the HCB block 50 and printing information is stored in another HCB block 50, the ) J is written. When storage is completed in the HCB block 50, "-1" is written as link information.

次に、上記HCB48への書き込み/読み出し/開放を
管理するために、1個の制御情報エリアとして、HCB
コントロールブロックが、ワークメモリ22のHCBコ
ントロールバッファ52に用意される。このHCBコン
トロールブロックには、特に図示はしていないが、次の
情報か書き込まれる。即ち、(1)書き込み中のHCB
ブロック50のID、(2)書き込み中のHCBCロブ
ク50先頭からのオフセット値、(3)読み出し中のH
CBブロック50のID、及び(4)読み出し中のHC
BCロブク50先頭からのオフセット値である。
Next, in order to manage writing/reading/opening to the HCB 48, the HCB is set as one control information area.
A control block is provided in the HCB control buffer 52 of the work memory 22. Although not particularly shown in the figure, the following information is written in this HCB control block. That is, (1) HCB being written
ID of block 50, (2) Offset value from the beginning of HCBC block 50 being written, (3) H being read
ID of CB block 50 and (4) HC being read
This is an offset value from the beginning of BC Robuku 50.

続いて、CPU16により生成された上記テスクプロセ
ッサ28用のラスクコマントを格納するためのバッファ
として、ワークメモリ22のラスタコマ′ンドバッファ
(以降、RCBと称す)54に、「C」ワードの長さの
RCBブロック56(第3図)がrdJ個用意され、各
RCBブロック56にそれぞれ「0」からr (d−1
)JまでのIDか付与される。各RCBブロック56は
、ブロックの先頭の1ワードのブロック間リンク情報エ
リア561と、r(c−1)Jワードのラスクコマント
を格納するためのエリア562とて構成される。リンク
情報エリア561には、当該RCBブロック56たけて
1ページのラスクコマントの格納が完結せず、別のRC
Bブロック56にラスクコマントの格納を行う際に、続
<RCBブロック56のIDrO〜(d−1)Jが書き
込まれる。また、当該RCBブロック56て格納が完結
しているときには、リンク情報として、「−1」が書き
込まれるようになっている。
Subsequently, a raster command buffer (hereinafter referred to as RCB) 54 of the work memory 22 has a length of "C" words as a buffer for storing the rask command for the task processor 28 generated by the CPU 16. rdJ RCB blocks 56 (Fig. 3) are prepared, and each RCB block 56 has a value from "0" to r (d-1
) ID up to J is given. Each RCB block 56 includes an interblock link information area 561 of one word at the beginning of the block, and an area 562 for storing r(c-1)J words of a rask command. In the link information area 561, storage of one page of Rask commands in the RCB block 56 is not completed, and another RC
When storing the rask command in the B block 56, IDrO to (d-1)J of the continuation<RCB block 56 are written. Further, when the storage in the RCB block 56 is completed, "-1" is written as the link information.

次に、上記RCB 54への書き込み/読み出し/開放
を管理するために、1個の制御情報エリアとして、RC
Bコントロールブロックが、ワークメモリ22のRCB
コントロールバッファ58に用意される。このRCBコ
ントロールブロックには、特には図示していないが、次
の情報が書き込まれる。即ち、(1)書き込み中のRC
Bブロック56のID、(2)書き込み中のRCBCロ
ブク56先頭からのオフセット値、(3)読み出し中の
RCBブロック56のID、及び(4)読み出し中のR
CBCロブク56先頭からのオフセット値である。
Next, in order to manage writing/reading/opening to the RCB 54, the RC
The B control block is the RCB of the work memory 22.
It is prepared in the control buffer 58. Although not specifically shown, the following information is written in this RCB control block. That is, (1) RC being written
ID of the B block 56, (2) offset value from the beginning of the RCBC block 56 being written, (3) ID of the RCB block 56 being read, and (4) R being read.
This is the offset value from the beginning of the CBC block 56.

次に、一連の印字動作中に一時にプリンタ10内に印字
過程中として存在し得る用紙枚数reJと、−枚の用紙
に印字し得る最大ページ数rfJ(両面印字が可能な場
合には、「2」ページ/用紙となる)との積rexfJ
に「2」を加えた数、即ち印字動作中に一時にプリンタ
内に存在する最大ページ数に「2」を加えた数の情報ブ
ロックが、ワークメモリ22の環境情報バッファ60内
に用意される。ここで、上記情報ブロックは、印字に必
要な各種の環境情報を格納するための情報ブロックであ
り、各ESCシーケンス解析・実行時に逐次環境情報を
更新するためのカレントの環境情報ブロック(以降、E
IBと称す)1個(図示せず)と、異常の発生時に前記
カレントのEIBを一時退避するエリア1個(図示せず
)、及び各ページの編集開始時にその時点の環境情報を
格納するための格納用E I B62とで構成される。
Next, the number of sheets reJ that can exist in the printer 10 at one time during a printing process during a series of printing operations, and the maximum number rfJ of pages that can be printed on − sheets of paper (if double-sided printing is possible, 2” page/paper) product rexfJ
2 plus "2", that is, the maximum number of pages existing in the printer at one time during printing operation plus "2" of information blocks are prepared in the environment information buffer 60 of the work memory 22. . Here, the above information block is an information block for storing various environmental information necessary for printing, and is a current environmental information block (hereinafter referred to as E
(referred to as IB) (not shown), one area (not shown) for temporarily saving the current EIB when an abnormality occurs, and one area (not shown) for storing the environmental information at that time when editing of each page is started. It is composed of a storage E I B62.

このE I B62の例を第4図に示す。An example of this EI B62 is shown in FIG.

次に、一連の印字動作中に一時にプリンタ内に印字過程
中として存在し得る用紙枚数reJと、−枚の用紙に印
字し得る最大ページ数「f」 (両面印字が可能な場合
は「2」ベージ/用紙となる)との積「exf」、即ち
印字動作中に一時にプリンタ内に存在する最大ページ数
と同じ数の情報ブロックが、ワークメモリ22のページ
情報バッファ64に用意される。この情報ブロックを、
ページ情報ブロック(以降、PIBと称す)66(第3
図)と呼ぶ。
Next, the number of sheets of paper that can exist in the printer at one time during the printing process during a series of printing operations "f" and the maximum number of pages that can be printed on - sheets of paper "f" The page information buffer 64 of the work memory 22 has the same number of information blocks as the product "exf", that is, the maximum number of pages existing in the printer at one time during a printing operation. This information block
Page information block (hereinafter referred to as PIB) 66 (third
Figure).

このP I B66には、次の下位制御情報が従属する
。即ち、当該ページと対応する上記HCBブロック50
の情報、つまりホストコンピュータ100より転送され
た当該ページを構成する印字情報が格納されたHCB4
8中のワークメモリ22上のアドレスを示すための情報
と、当該ページと対応する上記RCBブロック56の情
報、つまり生成されたテスクプロセッサ28用のラスク
コマンドか格納されたRCB54中のワークメモリ22
上のアドレスを示すための情報と、当該ページと対応す
る上記格納用E I B62の情報、つまり当該ページ
の編集開始時の各種環境情報を当該ページの印字の正常
終了まで格納するEIB62のIDを示す情報と、当該
ページに対する一連の印字のための処理が現在どういう
状態にあるかを示すためのページ状態スイッチである。
This P I B 66 is subordinated to the following lower level control information. That is, the above HCB block 50 corresponding to the page
, that is, the print information constituting the page transferred from the host computer 100 is stored in the HCB 4.
Information indicating the address on the work memory 22 in 8 and information on the RCB block 56 corresponding to the page, that is, the work memory 22 in the RCB 54 in which the generated rask command for the task processor 28 is stored.
The information to indicate the above address and the information of the storage EIB 62 corresponding to the page, that is, the ID of the EIB 62 that stores various environmental information at the start of editing of the page until the printing of the page ends normally. This is a page status switch for indicating information to be displayed and the current status of a series of printing processes for the page.

さらに詳細には、第3図に示すように、HCB開始ブロ
ックI D 66 olと、HCB開始ブロック先頭か
らのオフ−セット値66o2と、HCB終了ブロックI
D6603と、HCB終了ブロック先頭からのオフセッ
ト値66o4と、rDJ個のHCBブロック50それそ
゛れにおいて、当該ページが使用しているHCBブロッ
ク50を示すための、少なくともrbJビットの情報量
を持ったフラグ(HCB使用フラグ)66o5と、RC
B開始ブロック■D6606と、RCB開始ブロック先
頭からのオフセット値66o7と、RCB終了ブロック
ID66o8と、RCB終了ブロック先頭からのオフセ
ント値66o9と、rDJ個のRCBブロック56それ
ぞれにおいて、当該ページか使用しているRCBブロッ
ク56を示すための、少なくともrcfJビットの情報
量を持ったフラグ(RCB使用フラグ)66、。と、対
応E I B62のID6611と、及びページ状態ス
イッチ56.2である。
More specifically, as shown in FIG.
D6603, an offset value 66o4 from the beginning of the HCB end block, and a flag (HCB Use flag) 66o5 and RC
B start block D6606, offset value 66o7 from the beginning of the RCB start block, RCB end block ID 66o8, offset value 66o9 from the beginning of the RCB end block, and rDJ RCB blocks 56, respectively, indicate whether the page is used or not. A flag (RCB use flag) 66, which has an amount of information of at least rcfJ bits, for indicating the RCB block 56 that is present. , the ID 6611 of the corresponding E I B 62, and the page status switch 56.2.

このページ状態スイッチ66j2は、その内容により以
下の状態を示す。即ち、rFREEJて開放状態を示し
、rEDITJで編集中を示し、rEDENDJで編集
終了を示し、rD S P TJでイメージ形成中を示
し、rDSENDJてイメージ形成終了を示し、l”R
TOEJでプリンタエンジン14へのラスタデータ転送
中を示し、rWA I TJで用紙の排出待ちを示す。
This page status switch 66j2 indicates the following status depending on its contents. That is, rFREEJ indicates the open state, rEDITJ indicates editing, rEDENDJ indicates the end of editing, rD S P TJ indicates image formation in progress, rDSENDJ indicates completion of image formation, and l"R
TOEJ indicates that raster data is being transferred to the printer engine 14, and rWAITJ indicates that paper is waiting to be ejected.

さらに、ワークメモリ22のシート情報バッファ68に
、一連の印字動作中に一時にブリンダ内に印字過程中と
して存在し得る用紙枚数reJと同じ数のシート情報ブ
ロック(以降、SIBと称す)70(第3図)が用意さ
れる。
Furthermore, sheet information blocks (hereinafter referred to as SIBs) 70 (hereinafter referred to as SIBs) are stored in the sheet information buffer 68 of the work memory 22 as many sheets as the number of sheets reJ that can exist in the blinder at one time during a series of printing operations. Figure 3) is prepared.

このS I B2Oには、以下の下位制御情報が従属す
る。即ち、当該ページと対応するP I B66の情報
、つまり当該シートに印字される複数のページのIDと
、各IDを付与されたページのシート上の印字位置、つ
まり両面印字の際にはシートの第1面に印字するか第2
面に印字するかを示す情報として、印字形態に応じて各
ページのシート上の印字位置を管理するための情報と、
当該シート及び5IB70か現在どういう状態にあるか
を示すためのシート状態スイッチである。
The following subordinate control information is subordinate to this S I B2O. In other words, the information on the PIB66 corresponding to the page, that is, the IDs of the multiple pages printed on the sheet, and the printing position on the sheet of the page to which each ID is assigned, that is, the position of the sheet in case of double-sided printing. Print on the first side or the second side
As information indicating whether to print on the surface, information for managing the printing position on the sheet of each page according to the printing format,
This is a seat status switch for indicating the current status of the seat and 5IB70.

さらに詳細には、第3図に示すように、当該シートを構
成するPIB66の数(片面印字−1/両面印字−2)
701oと、第1プリントのPIB66のID7021
と、第1プリントのシート上の位置情報703、と、第
2プリントのPIB66のより7022と、第2プリン
トのシート上の位置情報7032と、シート状態スイッ
チ704oである。
More specifically, as shown in FIG.
701o and ID7021 of PIB66 of the first print
, position information on the sheet of the first print 703, position information 7022 of the PIB 66 of the second print, position information on the sheet of the second print 7032, and a sheet status switch 704o.

このシート状態スイッチ704oは、その内容により以
下の状態を示す。即ち、rFREEJで開放状態を示し
、rEDITJで編集中を示し、rEDENDJ で編
’JP、了を示L、rWA I TJで用紙の排出待ち
を示す。
This seat state switch 704o indicates the following states depending on its contents. That is, rFREEJ indicates an open state, rEDITJ indicates editing, rEDENDJ indicates editing, L indicates completion, and rWA I TJ indicates waiting for paper ejection.

これら5IB70、P I B66、HCBブロック5
0、RCBブロック56、EIB62は、第3図に示す
ような体系で管理される。
These 5IB70, P I B66, HCB block 5
0, RCB block 56, and EIB 62 are managed in a system as shown in FIG.

さらに、上記ワークメモリ22のシートシーケンスキュ
ーバッファ72に、上記5IB70の数reJと同じ長
さを有するFIFO構成のデータブロックとしてシート
シーケンスキュー(以降、SSQと称す)か用意される
。このSSQは、各シートの印字順序を制御するために
使用されるデータブロックであり、各シート毎の編集が
終了すると当該シートのID、即ちS I B2OのI
Dが順次書き込まれる。
Furthermore, a sheet sequence queue (hereinafter referred to as SSQ) is prepared in the sheet sequence queue buffer 72 of the work memory 22 as a FIFO-structured data block having the same length as the number reJ of the 5IBs 70. This SSQ is a data block used to control the printing order of each sheet, and when editing for each sheet is completed, the ID of the sheet, that is, the I of S I B2O
D is written sequentially.

さらに、制御を実行するにあたり、上記テーブルメモリ
42に、8ビツトの文字コードそれぞれに対応した各処
理モジュールのアドレスを格納するのに充分な長さを有
するデータブロックを1単位として、このデータブロッ
クを、文字フードのそれぞれの処理モジュールのアドレ
スを格納するために文字コード順に256個連結した下
記の処理アドレステーブルが複数個格納されている。
Furthermore, in executing the control, data blocks each having a length sufficient to store the addresses of each processing module corresponding to each 8-bit character code are stored in the table memory 42 as one unit. , a plurality of processing address tables shown below are stored in which 256 processing address tables are connected in the order of character codes in order to store the addresses of processing modules for each of the character hoods.

即ち、上記テーブルメモリ42に格納された処理アドレ
ステーブルとしては、第5図に示すように、ホストコン
ピュータ100より最初に入力された文字コード別の処
理モジュールのアドレスを格納するベーシック処理アド
レステーブル(tblbas)と、コマンドヘッダであ
るESC:I−ドか入力された後に、サポートするES
Cシーケンス体系に基づいて、コマンドヘッダのESC
コードに続く文字コード別にそれぞれの下位処理モジュ
ールに移行するための、前記同様に文字コード順に25
6個連結された第1ESC処理アドレステーブル(tb
lescl)と、引き続く文字コード別に、各処理モジ
ュールに移行するための第2ESC処理アドレステーブ
ル(tblesc2)と、引き続く文字コード別に、各
処理モジュールに移行するための第3ESC処理アドレ
ステーブル(tb+esc3)とが、文字コードに対応
して格納されている。
That is, as shown in FIG. 5, the processing address table stored in the table memory 42 includes a basic processing address table (tblbas) that stores the addresses of processing modules for each character code that are first input from the host computer 100. ) and the command header ESC:I-code are input, then the supporting ES
ESC of command header based on C sequence system
In order to move to each lower processing module according to the character code following the code, 25
The first ESC processing address table (tb
lescl), a second ESC processing address table (tblesc2) for moving to each processing module for each successive character code, and a third ESC processing address table (tb+esc3) for moving to each processing module for each successive character code. , are stored corresponding to character codes.

また、ホストデータの解析/識別、制御の移行等を制御
するために、ワークメモリ22のポインタレジスタ74
に、以下の情報エリアが用意される。即ち、現在使用中
の処理アドレステーブルを示すための処理アドレステー
ブルポインタ(curtbl)と、コマンド解析部から
、コマンドを実行スる処理モジュールへコマンドパラメ
ータを渡すためのパラメータレジスタ(cmdprm)
と、コマンドを識別するためのコマンドIDレジスタ(
cmdid)である。
In addition, the pointer register 74 of the work memory 22 is used to control analysis/identification of host data, transfer of control, etc.
The following information areas are provided. That is, a processing address table pointer (curtbl) to indicate the processing address table currently in use, and a parameter register (cmdprm) to pass command parameters from the command analysis section to the processing module that executes the command.
and a command ID register (
cmdid).

次に、印字が正常に終了するまでの処理を、第6図の全
体の流れを示すフローチャート及び第7図のホストコマ
ンド別処理フローチャートを参照して説明する。
Next, the processing up to the normal completion of printing will be explained with reference to the flowchart showing the overall flow in FIG. 6 and the host command-specific processing flowchart in FIG. 7.

まず、ホストコンピュータ100よりデータバス24に
データが出力されると、ホストI/F26は、同期信号
STBによりそのデータを内部のフリップフロップ(図
示せず)にラッチする。
First, when data is output from the host computer 100 to the data bus 24, the host I/F 26 latches the data into an internal flip-flop (not shown) using a synchronization signal STB.

CPU16は、このラッチされたデータを読み込み(ス
テップ5601.5701) 、内部に取り込んでホス
トコマンド解析部に処理を移行する。
The CPU 16 reads this latched data (steps 5601 and 5701), imports it internally, and transfers the processing to the host command analysis section.

ホストコマンド解析部は、ホストからのデータを解析し
て(ステップ5702)、コマンド/パラメータを抽出
し、文字印字処理、制御コード(CR,LF、FF等)
コマンド処理、ESCシーケンスによる各種コマンド処
理等へ制御を移行させる。
The host command analysis unit analyzes data from the host (step 5702), extracts commands/parameters, performs character printing processing, control codes (CR, LF, FF, etc.)
Control is transferred to command processing, various command processing by ESC sequence, etc.

ここで、例えば、ホストコンピューター00から rabc<esc>−def<esc>&a5v3.4
Hghi<cr>J のようなデータを受信した場合を例に取って、第8図の
遷移表を参照して、コマンド解析部の処理について説明
する。但しここで、r<esc>Jはエスケープコード
を示すものとし、r<cr>Jはキャリッジリターンコ
ードを示すものとする。
Here, for example, from the host computer 00, rabc<esc>-def<esc>&a5v3.4
Taking as an example the case where data such as Hghi<cr>J is received, the processing of the command analysis section will be explained with reference to the transition table of FIG. However, here, r<esc>J indicates an escape code, and r<cr>J indicates a carriage return code.

上記データが示すコマンドを先ず説明する。First, the commands indicated by the above data will be explained.

即ち、rag、rbJ、rcJはそれぞれ、文字印字コ
マンドであり、rabcJと印字することを指示する。
That is, rag, rbJ, and rcJ are each character print commands, and instruct to print rabcJ.

r<esc>−Jは、エスケープシーケンスと半行改行
コマンドである。「d」。
r<esc>-J is an escape sequence and a half line feed command. "d"

red、rfJも、上記rag、rbJ、rcJと同様
に文字印字コマンドである。r<esc>&a5v3.
4HJは、以下に示す2個のESCシーケンスが連結さ
れたものである。即ち、「< e s c >&a 5
VJで、カーソルのY位置移動コマンド(パラメーター
5)を表わし、r<esc>&a3.4HJで、カーソ
ルのX位置移動コマンド(パラメーター3.4)を表わ
す。
red and rfJ are also character print commands like the above-mentioned rag, rbJ, and rcJ. r<esc>&a5v3.
4HJ is a concatenation of two ESC sequences shown below. In other words, “< e sc >&a 5
VJ represents the cursor Y position movement command (parameter 5), and r<esc>&a3.4HJ represents the cursor X position movement command (parameter 3.4).

rgJ、rhj、riJもまた文字印字コマンドである
。「<cr>Jは、行先頭位置へカーソルを移動させる
コマンドである。
rgJ, rhj, and riJ are also character print commands. "<cr>J is a command that moves the cursor to the beginning of the line.

初期状態で、ポインタレジスタ74の処理アドレステー
ブルポインタ(curtbl)は、テーブルメモリ42
の複数の処理アドレステーブルの内、ベーシック処理ア
ドレステーブル(tblbas)を指している。
In the initial state, the processing address table pointer (curtbl) of the pointer register 74 is stored in the table memory 42.
It refers to the basic processing address table (tblbas) among the plurality of processing address tables.

コマンド解析部へ最初のデータraJが入力されると、
そのコード(61h)によって、処理アドレステーブル
ポインタ(Curtbl)が示すベーシツク処理アドレ
ステーブル(tblbas)を参照して、rbasch
rJという処理モジュールへ制御を移行する。このrb
aschrJは、通常の文字の印字のための処理であり
、コードに対応するフォントのイメージデータをイメー
ジメモリ38上に展開する処理を行なう。また、このr
baschrJでは、処理アドレステーブルポインタ(
curtbl)を書き換えない。
When the first data raJ is input to the command analysis section,
The code (61h) refers to the basic processing address table (tblbas) indicated by the processing address table pointer (Curtbl) and executes rbasch.
Control is transferred to a processing module called rJ. This rb
aschrJ is a process for printing ordinary characters, and performs a process of developing image data of a font corresponding to a code on the image memory 38. Also, this r
In baschrJ, the processing address table pointer (
curtbl).

続くデータ「bJ、rcJも、上記データraJと同様
に処理される。
The following data "bJ, rcJ" are also processed in the same way as the above data raJ.

次に、データ「<esc>Jが入力されると、そのコー
ド(IBh)によって、処理アドレステーブルポインタ
(curtbl)か示すベーシック処理アドレステーブ
ル(tblbas)を参照して、rpmescJという
処理モジュールへ制御を移行する。このrpmescJ
は、ESCシーケンス解析のための初期化処理を行なう
。即ち、ESCシーケンスによるコマンドを実行する処
FJ−E−ジュールへコマンドパラメータを渡すための
ポインタレジスタ74のパラメータレジスタ(cmdp
rm)の初期化、並びにコマンドを識別するためのポイ
ンタレジスタ74のコマンドIDレジスタ(cmdid
 )の初期化を行う。また、このrpmescJは、テ
ーブルメモリ42の複数の処理テーブルの内の第1Es
c処理アドレステーブル(tblescl )を示すよ
うに、処理アドレステーブルポインタ(curtbl)
を書き換える。
Next, when the data "<esc>J" is input, the code (IBh) refers to the basic processing address table (tblbas) indicated by the processing address table pointer (curtbl) and controls the processing module called rpmescJ. Migrate.This rpmescJ
performs initialization processing for ESC sequence analysis. That is, the parameter register (cmdp
rm) and the command ID register (cmdid) of the pointer register 74 for identifying commands.
) is initialized. Moreover, this rpmescJ is the first Es of the plurality of processing tables in the table memory 42.
The processing address table pointer (curtbl) indicates the c processing address table (tblescl).
Rewrite.

上記r< e s c >Jに続くデータ「=」が入力
されると、そのコート(3Dh)によって、処理アドレ
ステーブルポインタ(curtbl)か示す第1ESC
処理アドレステーブル(tblescl)を参照して、
rpm2ceJという処理モジュールへ制御を移行する
。このrpm2ceJは、「<esc>XJ  (但し
、rXJのコードは、30h≦X≦7Ehである)のよ
うに2キヤラクタからなるESCシーケンスによるコマ
ンドを実行する処理へ制御を移行する処理を行なう。
When the data "=" following the above r
Referring to the processing address table (tblescl),
Control is transferred to a processing module called rpm2ceJ. This rpm2ceJ performs a process of transferring control to a process of executing a command according to an ESC sequence consisting of two characters such as "<esc>XJ (the code of rXJ is 30h≦X≦7Eh).

今の場合、rXJにあたるデータ「−」(コード:3D
h)によって、ここでは説明しない2キヤラクタESC
シーケンスコマンド処理アドレステーブル(図示せず)
を参照し、そのアドレスの処理(半行改行の処理)に制
御を移行する。2キヤラクタESCンーケンスは、「X
」 (この場合、「=」)によって終了する。また、こ
のrpm2ceJは、ヘーン・ツク処理テーブル(tb
lbas)を示すように、処理アドレステーブルポイン
タ(curtbl)を戻す。
In this case, the data corresponding to rXJ is "-" (code: 3D
h), two-character ESC not explained here.
Sequence command processing address table (not shown)
, and transfers control to the processing of that address (half line break processing). The 2-character ESC sequence is
” (in this case, “=”). Also, this rpm2ceJ is
1. Returns the processing address table pointer (curtbl) to indicate the address (curtbl).

次に、データ「d」か人力されると、そのコード(64
h)によって、処理アドレステーブルポインタ(cur
tbl)か示すベーシック処理アドレステーブル(tb
lbas)を参照して、rbaschrJという処理モ
ジュールへ制御を移行する。このrbaschrJは、
前述したように通常の文字の印字のだめの処理であり、
コートに対応するフォントのイメージデータをイメージ
メモリ38上に展開する。また、この「baschrj
ては、処理アドレステーブルポインタ(curtbl)
を書き換えない。
Next, when the data “d” is input manually, the code (64
h), the processing address table pointer (cur
Basic processing address table (tb
lbas) and transfers control to a processing module called rbaschrJ. This rbaschrJ is
As mentioned above, this is a process for printing ordinary characters,
The image data of the font corresponding to the coat is developed on the image memory 38. Also, this “baschrj
is the processing address table pointer (curtbl)
cannot be rewritten.

続くデータred、rfJも、上記データ「d」と同様
に処理される。
The subsequent data red and rfJ are also processed in the same manner as the data "d".

次に、データr<esc>Jが入力されると、前述した
ようにして「pme s cJという処理モジュールへ
制御を移行する。
Next, when data r<esc>J is input, control is transferred to a processing module called ``pmescJ'' as described above.

そして、[<esc>Jに続くデータ「&」か入力され
ると、そのコード(26h)によって、処理アドレステ
ーブルポインタ(curtbl)が示す第1ESC処理
アドレステーブル(tblescl)を参照して、rp
mpeJという処理モジュールへ制御を移行する。この
rpmpeJは、現在処理中のESCシーケンスか、「
<esc>Ab# c  # c 2 # c 3・・
#C」という形であることを決定し、テーブルメモリ4
2の複数の処理アドレステーブルの内の第2ESC処理
アドレステーブル(tblesc2)を示すように、処
理アドレステーブルポインタ(curtbl)を書き換
える。ここで、rAJのコードは21h≦A≦2Fhで
あり、rbJのコードは60h≦b≦7Ehてあり、「
#」は数値フィールド、つまりrOJ〜「9」。
When the data "&" following [<esc>J is input, the code (26h) refers to the first ESC processing address table (tblescl) indicated by the processing address table pointer (curtbl), and rp
Control is transferred to a processing module called mpeJ. This rpmpeJ is the ESC sequence currently being processed or
<esc>Ab # c # c 2 # c 3...
#C", and table memory 4
The processing address table pointer (curtbl) is rewritten to indicate the second ESC processing address table (tblesc2) of the plurality of processing address tables of 2. Here, the code of rAJ is 21h≦A≦2Fh, the code of rbJ is 60h≦b≦7Eh, and “
#” is a numerical field, i.e. rOJ~“9”.

r+J、r−J、r、Jを示している。また、rc  
J、rc2J−、・−・のコードは、60h≦■ c1≦7Ehであり、このデータ「ci」の前の数値フ
ィールドに示された値が、rAbc、JなるESCシー
ケンスによって識別されるESCシーケンスコマンドに
対するパラメータであることを示す。さら1ここれは、
ESCシーケンスが弓き続き連結されていることも示し
ている。また、rcJのコードは40h≦C≦5Ehで
あり、このデータ「C」の前の数値フィールドに示され
た値が、「< e s c >AbCJなるESCシー
ケンスによって識別されるエスケープコマンドに対する
パラメータであることを示す。このデータによりESC
シーケンスは終了する。そして、このrpmpeJは、
コマンドを識別するためのコマンドIDレジスタ(cm
did)の第1バイト目に、入力データ「&」を書き込
む。
r+J, r-J, r, J are shown. Also, rc
The code of J, rc2J-, ... is 60h≦■ c1≦7Eh, and the value shown in the numerical field before this data "ci" is an ESC sequence identified by the ESC sequence rAbc, J. Indicates a parameter for a command. Furthermore, this is
It also shows that the ESC sequences are concatenated in a series. Also, the code of rcJ is 40h≦C≦5Eh, and the value shown in the numerical field before this data “C” is a parameter for the escape command identified by the ESC sequence “< e sc >AbCJ”. This data shows that ESC
The sequence ends. And this rpmpeJ is
Command ID register (cm
Input data "&" is written in the first byte of "did".

次に、データraJが入力されると、そのコード(61
h)によって、処理アドレステーブルポインタ(cur
tbl)が示す第2ESC処理アドレステーブル(tb
lesc2)を参照して、rpmpgJという処理モジ
ュールへ制御を移行する。このrpmpgjは、コマン
ドを忠別するためのコマンドIDレジスタ(cIlld
jd)の第2バイト目に、入力データraJを書き込む
。また、続くデータ(数値フィールドあるいはrc、J
、rCJ)を処理するために、テーブルメモリ42の複
数の処理アドレステーブルの内の第3ESC処理アドレ
ステーブル(tblesc3)を示すように、処理アド
レステーブルポインタ(cuttbl)を書き換える。
Next, when data raJ is input, its code (61
h), the processing address table pointer (cur
tbl) indicated by the second ESC processing address table (tb
lesc2) and transfers control to a processing module called rpmpgJ. This rpmpgj has a command ID register (cIlld) for distinguishing commands.
Input data raJ is written into the second byte of jd). Also, the following data (numeric field or rc, J
, rCJ), the processing address table pointer (cuttbl) is rewritten to indicate the third ESC processing address table (tblesc3) among the plurality of processing address tables in the table memory 42.

次に、データ「5」が入力されると、そのコード(35
h)によって、処理アドレステーブルポインタ(cur
tbl)が示す第3ESC処理アドレステーブル(Lb
lesc3)を参照して、rpmv5Jという処理モジ
ュールへ制御を移行する。このI: p m v 5 
Jは、数値フィールドにおける処理であり、文字データ
である「5(コード:35h)jを数値「5」としてパ
ラメータレジスタ(cmdprm)に格納する。このr
pmv5Jは、処理アドレステーブルポインタ(cur
tbl)を書き換えない。
Next, when the data "5" is input, the code (35
h), the processing address table pointer (cur
tbl) indicated by the third ESC processing address table (Lb
lesc3) and transfers control to the processing module rpmv5J. This I: p m v 5
J is a process in a numerical field, and character data "5 (code: 35h)j" is stored as a numerical value "5" in the parameter register (cmdprm). This r
pmv5J uses the processing address table pointer (cur
tbl) is not rewritten.

続けてデータrvJが入力されると、そのコー)’(7
6h)によって、処理アドレステーブルポインク(cu
rtbl)が示す第3ESC処理アト、レステーブル(
tblesc3)を参照して、rpmpp」という処理
モジュールへ制御を移行する。このrpmppjは、連
結ESCシーケンスにおいて一つのESCシーケンスが
完結したときの処理を行なう。このrpmppJは、入
力されたデータrvJを正規化して、rV (コード:
 56h)JをコマンドIDレジスタ(cndid)の
第3バイト目に書き込む。こうして、コマンドIDレジ
スタ(condid )にr&aV (266156h
)Jが格納され、これによって、ここでは説明しないE
SCシーケンスコマンド処理アドレステーブル(図示せ
ず)を参照し、そのアドレスの処理(カーソルのY位置
移動処理)にコマンドパラメータ(cmdprll)の
内容(数値「5」)を渡し、制御を移行する。そして、
ESCシーケンスによるコマンドを実行する処理モジュ
ールへコマンドパラメータを渡すためのパラメータレジ
スタ(elldpra+)の初期化を行なう。このrp
mppJは、続く連結ESCシーケンスを処理するため
、処理アドレステーブルポインタ(curtbl)を書
き換えない。
When data rvJ is input continuously, the code)'(7
6h), the processing address table point (cu
rtbl) indicates the third ESC processing at, the rest table (
tblesc3) and transfers control to a processing module named "rpmpp". This rpmppj performs processing when one ESC sequence is completed in a concatenated ESC sequence. This rpmppJ normalizes the input data rvJ and rV (code:
56h) Write J to the third byte of the command ID register (cndid). In this way, the command ID register (condid) is set to r&aV (266156h
) J is stored, which causes E
Refers to the SC sequence command processing address table (not shown), passes the contents of the command parameter (cmdprll) (numerical value "5") to the processing at that address (cursor Y position movement processing), and transfers control. and,
A parameter register (elldpra+) for passing command parameters to a processing module that executes a command according to an ESC sequence is initialized. This rp
mppJ does not rewrite the processing address table pointer (curtbl) in order to process the subsequent concatenated ESC sequence.

次に、データ「3」が入力されると、そのコード(33
h)によって、処理アドレステーブルポインタ(cur
Lbl)が示す第3ESC処理アドレステーブル(tb
lesc3)を参照して、rpmv 3Jという処理モ
ジュールへ制御を移行する。このrpmv3Jは、数値
フィールドにおける処理であり、文字データである「3
(コード:33h)Jを数値「3」として、パラメータ
レジスタ(cidprm)に格納する。このrpmv3
Jは、処理アドレステーブルポインタ(curtbl)
を書き換えない。
Next, when data "3" is input, the code (33
h), the processing address table pointer (cur
Lbl) indicates the third ESC processing address table (tb
lesc3) and transfers control to a processing module called rpmv3J. This rpmv3J is a process in a numeric field, and is character data "3".
(Code: 33h) Store J in the parameter register (cidprm) with the value "3". This rpmv3
J is the processing address table pointer (curtbl)
cannot be rewritten.

データ「、」が人力されると、そのコード(2E h)
によって、処理アドレステーブルポインタ(curtb
l)が示す第3ESC処理アドレステーブル(tble
sc3)を参照して、rpmpntJという処理モジュ
ールへ制御を移行する。このrpmpntJは数値フィ
ールドにおける処理であり、文字データである「、(コ
ード:2Eh)Jを数値表現子である小数点としてパラ
メータレジスタ(cmdprm)に格納する。このrp
mpn tJは、処理アドレステーブルポインタ(cu
rtbl)を書き換えない。
When the data "," is input manually, its code (2E h)
The processing address table pointer (curtb
The third ESC processing address table (tble
sc3), control is transferred to a processing module called rpmpntJ. This rpmpntJ is a process in a numerical field, and stores the character data ", (code: 2Eh)J in the parameter register (cmdprm) as a decimal point, which is a numerical expression.
mpn tJ is the processing address table pointer (cu
rtbl) is not rewritten.

次に、データ「4」か入力されると、そのコード(34
h)によって、処理アドレステーブルポインタ(eur
tbl)か示す第3ESC処理アドレステーブル(tb
lesc3)を参照して、r p m v 4 Jとい
う処理モジュールへ制御を、移行する。この「pmv4
jは、数値フィールドにおける処理であり、文字データ
である「4(コード・’34h)Jを数値としてパラメ
ータレジスタ(cmdprm)に格納する。こ、れによ
り、現在のパラメータレジスタ(c’md’prm)の
内容は、r3.4jという数値となる。この「pmv4
Jは、処理アドレステーブルポインタ(curtbl)
を書き換えない。
Next, when the data "4" is input, that code (34
h), the processing address table pointer (eur
tbl) or the third ESC processing address table (tb
lesc3), control is transferred to a processing module named r p m v 4 J. This “pmv4
j is a process in the numerical field, and the character data "4 (code/'34h) J" is stored as a numerical value in the parameter register (cmdprm).This causes the current parameter register (c'md'prm ) is the numerical value r3.4j.This “pmv4
J is the processing address table pointer (curtbl)
cannot be rewritten.

続けてデータrHJか入力されると、そのコード(48
h)によって、処理アドレステーブルポインタ(cur
tbl)が示す第3ESC処理アドレステーブル(tb
lesc3)を参照 してrpmp tJという処理モ
ジュールへ制御を移行する。このr p m p t 
Jは、ESCシーケン・スカく終了したときの処理を行
なう。即ち、データrH(コード+48h)Jをコマン
ドIDレジスタ(cmdirJ)の第3ハイド目に書き
込む。こうしてコマンドIDレジスタ(cmdid)に
r&aH(266]、48h)Jか格納され、これによ
って、ここでは説明しないESCシーケンスコマンド処
理アドレステーブルを参照し、そのアドレスの処理(カ
ーソルのX位置移動処理)にコマンドパラメータ(cf
fldprm)の内容(数値r3.4J)を渡し、制御
を移行する。また、このrpmptJは、ESCシーケ
ンスの終了により、ベーシック処理アドレステーブル(
tblbas)を示すように、処理アドレステーブルポ
インタ(curtbl)を戻す。
If the data rHJ is input next, that code (48
h), the processing address table pointer (cur
tbl) indicated by the third ESC processing address table (tb
lesc3) and transfers control to the processing module called rpmptJ. This r p m p t
J performs processing when the ESC sequence is successfully completed. That is, data rH (code+48h)J is written to the third hide of the command ID register (cmdirJ). In this way, r&aH(266], 48h)J is stored in the command ID register (cmdid), and by this, the ESC sequence command processing address table, which will not be explained here, is referenced and the processing of that address (cursor X position movement processing) is performed. Command parameters (cf
fldprm) (number r3.4J) and transfers control. In addition, this rpmptJ also changes the basic processing address table (
tblbas), returns the processing address table pointer (curtbl).

次に、データ「g」が入力されると、そのコード(67
h)によって、処理アドレステーブルポインタ(cur
tbl)か示すベーシック処理アドレステーブル(tb
lbas)を参照して、rbaschrJという処理モ
ジュールへ制御を移行する。この「baschrJは、
通常の文字の印字のための処理であり、コードに対応す
るフォントのイメージデータをイメージメモリ38上に
展開する。このrbaschrJては、処理アドレステ
ーブルポインタ(curtbl)を書き換えない。
Next, when data "g" is input, the code (67
h), the processing address table pointer (cur
Basic processing address table (tb
lbas) and transfers control to a processing module called rbaschrJ. This "baschrJ"
This is a process for printing ordinary characters, and image data of a font corresponding to the code is developed on the image memory 38. This rbaschrJ does not rewrite the processing address table pointer (curtbl).

続くデータrho、riJも、上記データrgJと同様
に処理される。
The subsequent data rho and riJ are also processed in the same manner as the data rgJ.

そして、データr<cr>Jが入力されると、そのコー
ド(ODh’)によって、処理アドレステーブルポイン
タ(curtbl)が示すヘーシ・ツク処理アドレステ
ーブル(tbl’bas)を参照して、rbascrJ
という処理モジュールへ制御を移行する。この「bas
crJは、カーソルレジスタ46に格納されたカーソル
位置情報を、行の先頭位置を示す情報に書き換える処理
を行なう。また、この「bascrJては、処理アドレ
ステーブルポインタ(curtbl)を書き換えない。
Then, when data r<cr>J is input, the code (ODh') refers to the hesi-tsuk processing address table (tbl'bas) indicated by the processing address table pointer (curtbl), and rbascrJ
control is transferred to a processing module called This “bas”
crJ performs a process of rewriting the cursor position information stored in the cursor register 46 to information indicating the starting position of the line. Furthermore, this "bascrJ" does not rewrite the processing address table pointer (curtbl).

以上のようにして、ホストコマンド解析部は、ホストコ
ンピュータ100からのデータを、]キャラクタ(lb
yte)毎の処理テーブルの遷移によってコマンド/パ
ラメータを識別し、文字印字処理、制御コードコマンド
処理、ESCシーケンスによる各種コマンド処理等へ制
御を移行させる。
In the above manner, the host command analysis unit converts data from the host computer 100 into characters (lb
The command/parameter is identified by the transition of the processing table for each yte), and control is transferred to character printing processing, control code command processing, various command processing using the ESC sequence, etc.

各々のコマンド処理モジュールは、当該コマンドがカレ
ントのカーソル位置に変更を生じるコードであれば、ペ
ージ/シート獲得処理(ステップ8703)へ更に移る
。また、当該コマンドが文字間隔の設定等のカレントの
カーソル位置に変更を生じないコードであれば、カレン
トのEIBの対応する情報を更新した後(ステップ57
04)、ページ/シート獲得処理をスキップし、ホスト
コマンドの格納の処理に移行する。このホストコマンド
の格納処理は、後述する。
Each command processing module further moves to page/sheet acquisition processing (step 8703) if the command is a code that causes a change in the current cursor position. In addition, if the command is a code that does not cause a change in the current cursor position, such as setting character spacing, the corresponding information in the current EIB is updated (step 57).
04), the page/sheet acquisition process is skipped and the process shifts to the host command storage process. This host command storage process will be described later.

次に、上記ステップ8703に於けるページ/シート獲
得処理について、第9図のフローチャートをも同時に参
照して説明する。
Next, the page/sheet acquisition process in step 8703 will be described with reference to the flowchart of FIG. 9 at the same time.

即ち、CPU16は、現在編集状態中のページがあるか
どうか、即ちページ状態スイッチ6612がr’EDI
TJであるページ情報プロック(PIB)66かあるか
どうかを調べる(ステップ5602 ; 5901)。
That is, the CPU 16 determines whether there is a page currently being edited, that is, if the page status switch 6612 is set to r'EDI.
It is checked whether there is a page information block (PIB) 66 that is TJ (step 5602; 5901).

EDIT中のページがあれば、ページ、HCB、RCB
、シートの獲得処理は行わない。
If there is a page being edited, the page, HCB, RCB
, no sheet acquisition processing is performed.

EDIT中のページかない場合、CPU16はます、ペ
ージ状態スイッチ6612かrF RE ElであるP
IB66を探し、当該PIB66を獲得する(ステップ
S 902)。
If there is no page being edited, the CPU 16 then switches the page status switch 6612 or rFREEl to P.
The IB 66 is searched and the PIB 66 is acquired (step S 902).

次にCPU16は、獲得したPIB66の初期化処理と
して、以下の作業を行う。即ち、当該PIB66のペー
ジ状態スイッチ66□2をrEDITJにする(ステッ
プ8903)。次に、HCBコントロールバッファ52
のHCBコントロールブロックより、現在のホストコマ
ンドバッファ(HCB)ブロック50の書き込み場所を
読み出し、当該P I B66のHCB開始ブロックI
D66o、及び開始オフセット66o2を設定する。ま
た、当該P I B66のHCB終了ブロックID66
o3及びオフセット66o4をクリアし、HCB使用フ
ラグ66o5の中の、書き込み用に獲得したHCBブロ
ック50のIDに対応するビットをセットする。次に、
RCBコントロールバッファ58のRCBコントロール
ブロックより現在のラスクコマントバッファ(RCB)
ブロック56の書き込み場所を読み出し、当該PIB6
6のRCB開始ブロックI D 66 oe及び開始オ
フセット66o7を設定する。また、当該PIB66の
RCB終了ブロックID6608及びオフセット66o
9をクリアし、RCB使用フラグ66、。の中の、書き
込み用に獲得したRCBブロック56のIDに対応する
ビットをセットする。
Next, the CPU 16 performs the following operations as initialization processing of the acquired PIB 66. That is, the page state switch 66□2 of the PIB 66 is set to rEDITJ (step 8903). Next, the HCB control buffer 52
Reads the write location of the current host command buffer (HCB) block 50 from the HCB control block of
D66o and start offset 66o2. In addition, the HCB end block ID66 of the P I B66
o3 and offset 66o4 are cleared, and a bit corresponding to the ID of the HCB block 50 acquired for writing in the HCB use flag 66o5 is set. next,
The current Rask command buffer (RCB) from the RCB control block of the RCB control buffer 58
Read the writing location of block 56 and write the corresponding PIB6.
Set the RCB start block ID of 666oe and start offset 66o7. Also, the RCB end block ID 6608 and offset 66o of the PIB66
9 is cleared, RCB use flag 66,. , the bit corresponding to the ID of the RCB block 56 acquired for writing is set.

そして、P I B66、HCB48、RCB54が獲
得されると(ステップ8603 ; 5904)、現在
編集状態中のシートがあるかどうが、即ちシート状態ス
イッチ704oがrEDITJであるシート情報ブロッ
ク(SIB)70かあるかどうかを調べる(ステップ5
604S905)。
Then, when the P I B 66, HCB 48, and RCB 54 are acquired (step 8603; 5904), it is determined whether there is a sheet currently being edited, that is, whether the sheet information block (SIB) 70 whose sheet status switch 704o is rEDITJ is checked. Check if there is one (Step 5)
604S905).

EDIT中のシートがなければ、CPU16は続いて、
シートの獲得のために次の処理を行う。
If there is no sheet being edited, the CPU 16 continues,
The following process is performed to acquire the seat.

即ち、シート状態スイッチ704oかrFREEJであ
る5IB70を探し、当該S I B2Oを獲得する(
ステップ5906)  次に、当該5IB70のシート
状態スイッチ704oをrEDITJにする(ステップ
390.7 )  そして、現在のモード(片面印字/
両面印字)に応して、当該シートを構成するPIB66
の数、即ち当該シート1枚に印字する情報のページ単位
の数(片面印字−1/両而印字−2)を、エリア70、
。に設定する。
That is, search for 5IB70, which is the seat state switch 704o or rFREEJ, and acquire the relevant S I B2O (
Step 5906) Next, set the sheet status switch 704o of the 5IB70 to rEDITJ (Step 390.7) and set the current mode (single-sided printing/
(double-sided printing), the PIB66 that constitutes the sheet
, that is, the number of pages of information to be printed on one sheet (single-sided printing - 1 / double-sided printing - 2) in the area 70,
. Set to .

続いて、獲得された5IB70の対応する場所に、つま
りエリア70.7022に当該シートに従属するPIB
66のID、及びエリア703□。
Subsequently, the PIB subordinate to the sheet is placed in the corresponding location of the acquired 5IB70, that is, in area 70.7022.
66 ID, and area 703□.

7032に当該ページの当該シート上の印字位置情報(
当実施例では表面印字か、裏面印字かを示す情報)を書
き込む(ステップ5908)。
7032, print position information on the sheet of the page (
In this embodiment, information indicating whether printing is on the front or back side is written (step 5908).

jHl:CPU16は、開放されている格納用E I 
B62の1つにカレントのEIBの情報を全て格納し、
上記PIB66内のエリア6611に、この格納用E 
I B62のIDをセットする(ステップ5909)。
jHl: The CPU 16 uses the open storage E I
Store all the current EIB information in one of the B62s,
This storage E
The ID of the IB62 is set (step 5909).

このカレントEIBの情報を格納用E I B62に格
納する処理において、カレン)EIBの情報をそのまま
格納用EIB62に格納してもよいし、カレントEIB
の情報を圧縮した形式で格納用EIB62に格納しても
よい。
In the process of storing the current EIB information in the storage EIB 62, the current EIB information may be stored as is in the storage EIB 62, or the current EIB information may be stored as is in the storage EIB 62.
The information may be stored in the storage EIB 62 in a compressed format.

以上の動作でページ、HCB、RCB、シートが獲得さ
れる(ステップ5605)。
Through the above operations, the page, HCB, RCB, and sheet are acquired (step 5605).

上記の処理に続いて、人力されたホストコマンド別に、
次の処理か行われる(第7図参照)。
Following the above process, for each human-powered host command,
The following processing is performed (see Figure 7).

即ち、入力されたデータか、通常の印字文字コード(2
1H〜7EH)である場合には、CPU16は、当該文
字コードに対応したフォントの形状データを前記イメー
ジメモリ38にビットブロック転送(BITBLT)す
るために、前記のラスタプロセッサ28用のラスクコマ
ントを生成する(ステップ5705)。1つのラスクコ
マントは下記の情報より構成される。即ち、転送される
データ(ソースデータ)の格納光アドレスと、ソースデ
ータの幅と、ソースデータの長さと、転送されたソース
データのイメージメモリ38上の格納先アドレスである
That is, the input data or the normal printing character code (2
1H to 7EH), the CPU 16 generates a rask command for the raster processor 28 in order to transfer (BITBLT) the font shape data corresponding to the character code to the image memory 38. (Step 5705). One rask command consists of the following information. That is, the storage optical address of the data to be transferred (source data), the width of the source data, the length of the source data, and the storage destination address on the image memory 38 of the transferred source data.

CPU16は、現在使用中のフォントセットのIDと、
人力された文字コードより、当明細書では詳細は記述し
ない各文字コードごとの情報テーブル(図示せず)を参
照し、当該文字コードに対応したフォントの格納光アド
レス、当該文字コードに対応したフォントの幅・長さの
情報を得る。
The CPU 16 stores the ID of the font set currently in use,
From the manually entered character code, refer to an information table (not shown) for each character code, the details of which are not described in this specification, and find the storage optical address of the font corresponding to the character code, and the font corresponding to the character code. Obtain information on the width and length of.

更に前記カレントEIBに登録されたX方向(通常、プ
リンタエンジン14にラスクイメージデータを転送する
際の主走査方向)と、これに直交するY方向それぞれの
カーソル値より、イメージメモリ38上の格納先アドレ
ス(当該文字の印字位りを求める。これらの情報より、
CPU16は、当該文字コードに対応する前記ラスタプ
ロセッサ28用のラスクコマントを生成する。
Furthermore, the storage location on the image memory 38 is determined based on the cursor values in the X direction (usually the main scanning direction when transferring rask image data to the printer engine 14) and the Y direction perpendicular to the X direction registered in the current EIB. Address (find the printing position of the character in question. From this information,
The CPU 16 generates a rask command for the raster processor 28 corresponding to the character code.

CPU16は、RCBコントロールバッファ58のRC
Bコントロールブロックより、書き込み用のRCBブロ
ックID、RCBプロ・ツクオフセットを読み出す。次
にこれら両ポインタで示される場所に上記ラスクコマン
トを書き込み、RCBブロックオフセット値に「1」を
加える。
The CPU 16 controls the RC of the RCB control buffer 58.
Read the RCB block ID and RCB block offset for writing from the B control block. Next, write the Rask command at the location indicated by both pointers, and add "1" to the RCB block offset value.

続いて、更新されたオフセ・ノド値をチエ・ツクし、こ
の値が1個のRCBブロック56の長さを越えていると
、CPU16は下記の手順で新たなRCBブロック56
の獲得処理を行う。
Next, the updated offset value is checked, and if this value exceeds the length of one RCB block 56, the CPU 16 creates a new RCB block 56 using the following procedure.
Acquisition processing is performed.

即ち、CPU16は、全てのPIB66のRCB使用フ
ラグ66、。の論理和を求め、現在開放されているRC
Bブロック56のIDを求める。
That is, the CPU 16 sets the RCB use flags 66 of all PIBs 66. Find the logical sum of the currently open RC
Find the ID of the B block 56.

このIDを現在書き込み中のRCBプロ・ツク56先頭
の、RCBブロックリンク情報エリア561に書き込む
ことで、これまで書き込んでいたRCBブロック56の
連結光を明らかにする。次に、RCBコントロールブロ
ックのRCBプロ・ツクID及びオフセット値を、新た
に獲得したRCBブロック56に基づき更新する。更に
現在編集中のページのPIB66内のRCB使用フラグ
66、。を更新する。
By writing this ID in the RCB block link information area 561 at the beginning of the RCB block 56 currently being written, the connected light of the RCB block 56 that has been written so far is revealed. Next, the RCB program ID and offset value of the RCB control block are updated based on the newly acquired RCB block 56. Furthermore, an RCB use flag 66 in the PIB 66 of the page currently being edited. Update.

以上の手順で、入力された文字コードに対応するラスク
コマントの生成を行った後、次の文字の印字開始位置を
前記カレントEIB内のカーソル値に設定する(ステッ
プ5706)。
After generating the rask command corresponding to the input character code using the above procedure, the print start position of the next character is set to the cursor value in the current EIB (step 5706).

ま、た、入力されたデータがESCコード以外の制御コ
ードである場合、例えば当該制御コードがLF(改行)
コードの時は、前記カレントEIBに登録されたY方向
のカーソル値に、カレントEIBに登録された行間隔の
値を加えるといった、フォントデータの展開等の処理は
行わず、環境情報を更新する処理のみを実行する(ステ
ップ5707)。
Also, if the input data is a control code other than the ESC code, for example, if the control code is LF (line feed)
When using code, processing to update the environment information without performing processing such as expanding font data, such as adding the line spacing value registered in the current EIB to the Y-direction cursor value registered in the current EIB. (step 5707).

人力されたデータがESCシーケンスの場合、各ESC
シーケンス別に環境情報の更新等の処理を実行する(ス
テップ5708)。
If the manually entered data is an ESC sequence, each ESC
Processing such as updating of environmental information is executed for each sequence (step 5708).

上記のホストコマンド別のそれぞれの処理を行った後、
次のホストコマンドの格納処理を行う(ステップ560
6)。
After performing each process for each host command above,
Performs storage processing for the next host command (step 560)
6).

即ち、CPU16は、現在ページが獲得されているかど
うかを調べる(ステップ5709)。獲得されていない
場合は、入力されたホストコマンドはカレントのカーソ
ル位置に変更を生じないコマンドであり、前項の各コマ
ンド別処理において前記カレントのEIB内の各種環境
情報を更新するだけで当該ホストコマンドに対する処理
を終了する。
That is, the CPU 16 checks whether a page is currently acquired (step 5709). If it has not been acquired, the input host command is a command that does not change the current cursor position, and the host command can only be updated by updating various environmental information in the current EIB in each command processing described in the previous section. Finish processing for.

ページが獲得されていると、続いて、以下のホストコマ
ンドの格納処理を行う(ステップ5710)。
If the page has been acquired, then the following host command storage process is performed (step 5710).

即ち、CPU16は、HCBコントロールバッフ752
のHCBコントロールブロックより、書き込み用のHC
BブロックID%HCBブロックオフセットを読み出す
。次にこれら両ポインタで示される場所に、ホストコン
ピュータ100から受は取った印字情報を書き込み、H
CBブロックオフセット値に「1」を加える。続いて、
更新されたオフセット値をチエツクし、この値が1個の
HCBブロック50の長さを越えていると、CPU16
は下記の手順で新たなHCBブロック50の獲得処理を
行う。
That is, the CPU 16 uses the HCB control buffer 752
HC for writing from the HCB control block of
Read B block ID%HCB block offset. Next, the print information received from the host computer 100 is written in the location indicated by these two pointers, and the H
Add "1" to the CB block offset value. continue,
The updated offset value is checked, and if this value exceeds the length of one HCB block 50, the CPU 16
performs acquisition processing of a new HCB block 50 using the following procedure.

即ち、CPU16は、全てのPIB66のHCB使用フ
ラグ66o5の論理和を求め、現在開放されているHC
Bブロック50のIDを求める。
That is, the CPU 16 calculates the logical sum of the HCB use flags 66o5 of all PIBs 66, and calculates the logical sum of the HCB use flags 66o5 of all PIBs 66,
Find the ID of the B block 50.

二のLDを現在書き込み中のHCBプロ・ツク50先頭
の、HCBブロックリンク情報エリア501に書き込む
二とて、これまで書き込んでいたHCBブロック50の
連結光を明らかにする。次にHCBコントロールブロッ
クのHCBブロックID及びオフセット値を、新たに獲
得したHCBブロック50に基づき更新する。更に現在
編集中のページのPIB66内のHCB使用フラグ66
o5を更新する。
When writing the second LD to the HCB block link information area 501 at the beginning of the HCB block 50 currently being written, the connected light of the HCB block 50 that has been written so far is revealed. Next, the HCB block ID and offset value of the HCB control block are updated based on the newly acquired HCB block 50. Furthermore, HCB use flag 66 in PIB 66 of the page currently being edited
Update o5.

CPU16は、ホストコンピュータ100より、改ペー
ジコマンド(F F)が転送されるか、改行コマンド(
L F)により1ページの許容行数を越えるまで(ステ
ップ5607) 、ここまでの処理を繰り返す。そして
、ページか終了したならば、下記の手順で当該ページの
終了処理を行う(ステップ5608)。即ち、当該ペー
ジのPIB66のページ状態スイッチ6612をrED
ENDJにする。次に、当該ページのPIBのHCB終
了ブロック■D66o3及びHCB終了ブロックオフセ
ット66o4を書き込む。そして、RCB終了ブロック
ID66o8及びRCB終了ブロックオフセット66o
9を書き込む。
The CPU 16 receives a page feed command (F F) from the host computer 100 or receives a line feed command (
The process up to this point is repeated until the allowable number of lines for one page is exceeded (step 5607). When the page is finished, the page is finished using the following procedure (step 5608). That is, the page state switch 6612 of the PIB 66 of the page is set to rED.
Make it ENDJ. Next, the HCB end block D66o3 and HCB end block offset 66o4 of the PIB of the page are written. Then, RCB end block ID 66o8 and RCB end block offset 66o
Write 9.

本実施例では、片面印字のモードであるため、つまり当
該シート終了であるため(ステップ5609)、続いて
下記の手順で当該シートの終了処理を行う(ステップ5
610)。即ち、当該シートのS I B2OのIDを
SSQバッファ72のSSQに登録する。そして、当該
シートのS I B2Oのシート状態スイッチ704゜
を[EDENDJにする。
In this embodiment, since the mode is single-sided printing, that is, the sheet is finished (step 5609), the sheet is finished in the following steps (step 5).
610). That is, the S I B2O ID of the sheet is registered in the SSQ of the SSQ buffer 72 . Then, set the seat state switch 704° of the S I B2O of the seat to [EDENDJ].

CPU16は、前のページのイメージ転送等のためのイ
メージメモリ38の専有が終了し、イメージメモリ38
か開放されると、イメージデータの形成及び転送処理を
行なう。即ち、CPU16は、上記S I B2O内の
ページ位置情報7021を参照し、当該シートの第1面
に印字すべきページのIDを検出する。続いて、検出さ
れたページのP I B66のページ状態スイッチ66
12をrD S P TJにセットし、上記DMAコン
トローラ30を用いて、RCB54に格納されたラスク
コマントを、1ブロツクづつ上記タスクプロセッサ28
にD M A転送し、イメージメモリ38上にフォント
イメージ等の展開を行う。全てのデータの展開処理が終
了すると、続いてCPU16は、対応するページのPI
B66のページ状態スイッチ6612をrDSENDJ
にセットし、プリンタエンジン14からの要求に基づい
て形成したタスクイメージデータをプリンタエンジン1
4に転送する。
The CPU 16 completes exclusive use of the image memory 38 for image transfer of the previous page, etc.
When the file is released, image data formation and transfer processing is performed. That is, the CPU 16 refers to the page position information 7021 in the S I B2O and detects the ID of the page to be printed on the first side of the sheet. Subsequently, the page state switch 66 of the P I B 66 of the detected page is
12 in rD S P TJ, and uses the DMA controller 30 to send the rask commands stored in the RCB 54 one block at a time to the task processor 28.
The font image and the like are developed on the image memory 38. When all the data has been expanded, the CPU 16 then updates the PI of the corresponding page.
Set page state switch 6612 of B66 to rDSENDJ
, and the task image data formed based on the request from the printer engine 14 is sent to the printer engine 1.
Transfer to 4.

1画面分のタスクイメージデータの転送か終了すると、
続いてCPU16は、対応するシート及びページの各状
態スイッチ70 66  を40°   12 rWAITJにセットし、プリンタエンジン14からの
用紙の正常排出を待つ。
When the transfer of one screen worth of task image data is completed,
Subsequently, the CPU 16 sets each status switch 70 66 of the corresponding sheet and page to 40° 12 rWAITJ and waits for the paper to be normally ejected from the printer engine 14 .

実際には、イメージメモリ38が開放されていると、あ
るページに対するホストコマンドを受けてイメージ展開
用のラスクコマントを生成する処理と、生成された当該
ページのラスクコマントをタスクプロセッサ28に転送
しイメージメモリ38上にフォントイメージを形成する
処理が、マルチタスク処理として時分割で行われている
。また、プリンタエンジン14に対するタスクイメージ
データの転送中にも、次のページに対するイメージ展開
用のラスクコマントを生成する処理が、時分割で行われ
ている。
In reality, when the image memory 38 is free, the process of receiving a host command for a certain page and generating a rask command for image expansion, and transferring the generated rask command of the page to the task processor 28 to create an image. The process of forming a font image on the memory 38 is performed in a time-sharing manner as a multitasking process. Also, while the task image data is being transferred to the printer engine 14, the process of generating a rask command for image development for the next page is performed in a time-sharing manner.

プリンタエンジン14内の用紙への画像形成か終了し、
用紙が正常に排出されると、CPU16は、下記の手順
でシート、ページ、HCB48の開放処理を行う。即ち
、SSQバッファ72のSSQよりデータを取り出し、
排出されたシートの5IB70のIDを検出する。そし
て、当該シートの5IB70のシート状態スイッチ70
4゜を「FREEJにセットする。そして、当該シート
のS I B2OのPIB情報より、従属する全てのペ
ージに対し下記の手順でページの開放処理を行う。
The image formation on the paper in the printer engine 14 is completed,
When the paper is normally ejected, the CPU 16 performs a sheet, page, and HCB 48 release process according to the following procedure. That is, data is extracted from the SSQ of the SSQ buffer 72,
The ID of 5IB70 of the ejected sheet is detected. Then, the seat status switch 70 of 5IB70 of the seat concerned
4° is set to "FREEJ." Then, based on the PIB information of S I B2O of the sheet, page release processing is performed for all dependent pages according to the following procedure.

即ち、当該ページのPIB66のページ状態スイッチ6
612をrFREEJにセットする。そして、対応する
HCB使用フラグ66o5をリセットし、さらに対応す
るRCB使用フラグ66、oをすセットする。
That is, the page state switch 6 of the PIB 66 of the page
Set 612 to rFREEJ. Then, the corresponding HCB use flag 66o5 is reset, and the corresponding RCB use flag 66, o is also set.

以上の手順でプリントモードとして片面印字が選択され
、ホストコンピュータ100より入力された印字情報の
、用紙への印字が正常終了する。
With the above procedure, single-sided printing is selected as the print mode, and printing of the print information input from the host computer 100 onto the paper is normally completed.

このように、ホストデータからホストコマンドヤハラメ
ータを識別・抽出する処理に於いて、ホストデータに対
応して処理アドレステーブル間を遷移するだけで、ホス
トコマンドやパラメータを識別・抽出することができる
ので、比較・判断を行なう操作はほとんど必要なく、処
理を高速に実行することが可能となる。
In this way, in the process of identifying and extracting host command Yahara meters from host data, host commands and parameters can be identified and extracted simply by transitioning between processing address tables in response to host data. , there is almost no need for operations to perform comparisons and judgments, and processing can be executed at high speed.

しかも、複数段構成された処理アドレステーブルは、同
一の他段の処理アドレステーブルを示す処理モジュール
を複数のコードに対応させて格納しているため、つまり
各コード毎にテーブルを用意するのではなくて、兼用す
るようにしているため、全てのコードについて処理アド
レステーブルを参照しているにも関わらず、テーブルの
種類が少なくて済み、なお高速で実行することができる
Moreover, a multi-stage processing address table stores processing modules that indicate the same processing address table of other stages in correspondence with multiple codes, in other words, rather than preparing a table for each code. Since the processing address table is used for both purposes, even though all codes refer to the processing address table, the number of types of tables is small, and high-speed execution is possible.

なお、前述の実施例では、上位装置をホストコンビコー
タとした端末機として、プリンタを例に取って説明した
か、本発明はこれに限定されるものではなく、種々の上
位装置からのコマンドを処理する種々のコマンド処理装
置に適用可能である。
In the above-mentioned embodiments, a printer was used as an example of a terminal device with a host combi coater as a host device, but the present invention is not limited to this, and can accept commands from various host devices. It is applicable to various command processing devices.

[発明の効果] 以上詳述したように本発明によれば、上位装置より転送
されるコマンドを、簡単な手段で且つ少ないテーブル量
で識別・抽出することを可能とする端末機のコマンド処
理装置を提供することができる。
[Effects of the Invention] As described in detail above, according to the present invention, there is provided a command processing device for a terminal device that can identify and extract commands transferred from a host device by simple means and with a small amount of tables. can be provided.

さらに本発明によれば、ESCシーケンスの形の変更や
、解析手順の変更を容品に達成することが可能な端末機
のコマンド処理装置を提供することができる。
Further, according to the present invention, it is possible to provide a command processing device for a terminal that can easily change the form of an ESC sequence and the analysis procedure.

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

第1図は本発明の端末機のコマンド処理装置の機能ブロ
ック図、第2図は実施例の構成を示す図、第3図はシー
ト/ページ/バッファの管理体系を示す図、第4図は環
境情報ブロックの記憶内容を示す因、第5図は各処理ア
ドレステーブルをコードに対応させて示す図、第6図は
全体の処理の流れを示すフローチャート、第7図はホス
トコマンド別処理フローチャート、第8図は処理アドレ
ステーブル及び制御の遷移表、第9図はページ/シート
獲得処理フローチャートである。 1・・・処理手段、2・・・コマンド入力手段、3・・
・処理識別子テーブル、4・・・テーブル記憶手段、5
・・・処理選択手段。
FIG. 1 is a functional block diagram of a command processing device of a terminal according to the present invention, FIG. 2 is a diagram showing the configuration of an embodiment, FIG. 3 is a diagram showing a sheet/page/buffer management system, and FIG. 4 is a diagram showing a sheet/page/buffer management system. Figure 5 is a diagram showing the storage contents of the environment information block, Figure 5 is a diagram showing each processing address table in correspondence with the code, Figure 6 is a flowchart showing the overall processing flow, Figure 7 is a processing flowchart for each host command, FIG. 8 is a processing address table and a control transition table, and FIG. 9 is a page/sheet acquisition processing flowchart. 1... Processing means, 2... Command input means, 3...
- Processing identifier table, 4...Table storage means, 5
...processing selection means.

Claims (2)

【特許請求の範囲】[Claims] (1)上位装置からのコマンドに従って処理を実行する
端末機において、 それぞれ上位装置からの特定のコマンドに従った処理を
行なう複数の処理手段と、 上位装置からの1単位または複数単位のコードで構成さ
れるコマンドを、1単位のコード毎に取り込むコマンド
入力手段と、 前記複数の処理手段の1つを示す識別子及び他段の処理
識別子テーブルを示す識別子を含む複数の識別子を1単
位のコードに対応させて格納した処理識別子テーブルを
、コマンド長に応じて複数段格納したテーブル記憶手段
と、 前記コマンド入力手段により取り込まれた1単位のコー
ドに応じて前記処理識別子テーブルから処理識別子を得
、該識別子により前記複数の処理手段の一つを動作させ
、もしくは他段の処理識別子テーブルのいずれかを次の
1単位のコードのための処理識別子テーブルとして選択
する処理選択手段とを具備し、 各段の処理識別子テーブルが、同一の他段の処理識別子
テーブルを示す識別子を複数の前記1単位のコードに対
応させて格納していることを特徴とする端末機のコマン
ド処理装置。
(1) In a terminal device that executes processing according to commands from a host device, it consists of multiple processing means each performing processing according to a specific command from the host device, and one unit or multiple units of code from the host device. a command input means for inputting a command to be executed for each unit of code; and a plurality of identifiers, including an identifier indicating one of the plurality of processing means and an identifier indicating a processing identifier table of another stage, corresponding to one unit of code. a table storage means for storing a process identifier table stored in multiple stages according to the command length; processing selection means for operating one of the plurality of processing means or for selecting one of the processing identifier tables of the other stages as the processing identifier table for the next unit of code; A command processing device for a terminal, characterized in that the processing identifier table stores identifiers indicating processing identifier tables of the same other stages in association with a plurality of the one-unit codes.
(2)前記テーブル記憶手段に格納された複数段の処理
識別子テーブルの内、前記処理選択手段によって最初に
用いられる一段目の処理識別子テーブルには、1バイト
の文字コードと制御コードに対応する識別子及びエスケ
ープシーケンスコードに対応して次に用いられるべき二
段目の処理識別子テーブルを示す識別子を格納し、 前記二段目の処理識別子テーブルには、印字のための環
境条件を示す識別子及び三段目の処理識別子テーブルを
示す識別子を格納し、 前記二段目の処理識別子テーブルが、同一の三段目の処
理識別子テーブルを示す識別子を前記1単位のコードの
複数に対応させて複数格納していることを特徴とする請
求項1に記載の端末機のコマンド処理装置。
(2) Among the plurality of processing identifier tables stored in the table storage means, the first processing identifier table used first by the processing selection means contains identifiers corresponding to 1-byte character codes and control codes. and an identifier indicating a second-stage processing identifier table to be used next in correspondence with the escape sequence code, and the second-stage processing identifier table stores an identifier indicating environmental conditions for printing and a third-stage processing identifier table. an identifier indicating a second processing identifier table, and the second processing identifier table stores a plurality of identifiers indicating the same third processing identifier table in correspondence with the plurality of codes of one unit. 2. The command processing device for a terminal according to claim 1, further comprising: a command processing device for a terminal.
JP2110448A 1990-04-27 1990-04-27 Command processor for terminal equipment Pending JPH0410026A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2110448A JPH0410026A (en) 1990-04-27 1990-04-27 Command processor for terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2110448A JPH0410026A (en) 1990-04-27 1990-04-27 Command processor for terminal equipment

Publications (1)

Publication Number Publication Date
JPH0410026A true JPH0410026A (en) 1992-01-14

Family

ID=14535976

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2110448A Pending JPH0410026A (en) 1990-04-27 1990-04-27 Command processor for terminal equipment

Country Status (1)

Country Link
JP (1) JPH0410026A (en)

Similar Documents

Publication Publication Date Title
JP2993276B2 (en) Printer
US7589861B2 (en) Image forming apparatus and printing system
JPH0410026A (en) Command processor for terminal equipment
JPH048570A (en) Command processing device of terminal equipment
JPH02287611A (en) Printer controller
JP2000272179A (en) Printer system, and host device and printer used therefor
JPH06171160A (en) Printing information processor
KR100594782B1 (en) Processing system and method of pattern bitmap data for printer
JP2001216110A (en) Method for controlling cache, printing controller using the method, character processor, and its method
JP3411350B2 (en) Outline character expansion device
JPH04174022A (en) Printer controller
JPH03114856A (en) Printer data management system
JPH0796639A (en) Printer
JPH05208526A (en) Printer
JPH08194460A (en) Character processing device
JPH04327966A (en) Image forming device
JP2011002977A (en) Image forming apparatus
JPH02286381A (en) Printer controller
JPH0511944A (en) Printing system
JPH02286384A (en) Printer controller
JPH1058769A (en) Character processing device
JPS62257867A (en) Printer
JPH05274311A (en) Device and method for preparing document
JPH06328793A (en) Printing data processing method
JPH08282019A (en) Image forming method and device