JPH048570A - Command processing device of terminal equipment - Google Patents

Command processing device of terminal equipment

Info

Publication number
JPH048570A
JPH048570A JP2110447A JP11044790A JPH048570A JP H048570 A JPH048570 A JP H048570A JP 2110447 A JP2110447 A JP 2110447A JP 11044790 A JP11044790 A JP 11044790A JP H048570 A JPH048570 A JP H048570A
Authority
JP
Japan
Prior art keywords
processing
command
code
block
identifier
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
JP2110447A
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 JP2110447A priority Critical patent/JPH048570A/en
Publication of JPH048570A publication Critical patent/JPH048570A/en
Pending legal-status Critical Current

Links

Landscapes

  • Accessory Devices And Overall Control Thereof (AREA)

Abstract

PURPOSE:To identify and extract a command transmitted from a host device by a simple means by providing a control means which appropriately rewrites a table assigning means after the execution of the processing in a processing means and shifts the processing to a processing selection means. CONSTITUTION:A table assigning means 4 for selecting one of a plurality of processing identifier tables 3 is provided. In a processing selection means 5, a processing identifier is obtained from the processing identifier table 3 assigned by the table assigning means 4 in accordance with a code for one unit received from a command input means 2. One of a plurality of processing means 1 indicated by the identifier is actuated. After the execution of the processing in the processing means 1, the table assigning means 4 is accordingly rewritten by a control means 6. The processing is shifted to the processing selection means 5. A command from a host device can be identified and extracted only by shifting the processing identifier table 3 corresponding to a one-unit code. Thus, a high-speed processing can be conducted.

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. A command processing device that identifies and extracts host commands and parameters from host data in such terminals, particularly related to terminals such as printers whose environmental conditions for printing can be changed by host commands using escape sequences, etc. Regarding.

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

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

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

[発明が解決しようとする課題] ところが上記のESCシーケンス(コマンド)は複雑な
コード体系を成しており、その識別・抽出はプリンタコ
ントローラにとって非常に複雑な処理を必要とする。
[Problems to be Solved by the Invention] 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「al、rVJは、ESC
シーケンスを識別するのに用いられ、また「5」は、こ
のESCシーケンスが意味するコマンドに渡されるパラ
メータである。ESCシーケンスにおいて、この「5」
が位置するところは数値フィールドと呼ばれ、文字列r
5J、r5.OJ、r05.OOJ等は全て数値「5」
として認識されるようになっている。
For example, from the host computer r<esc>&a5V
Suppose that an ESC sequence such as J is transferred. Here, [<esc>J, r&J "al, rVJ is ESC
It is used to identify the sequence, and "5" is a parameter passed to the command that this ESC sequence signifies. In the ESC sequence, this "5"
The area where is located is called a numeric field, and the string r
5J, r5. OJ, r05. OOJ etc. are all numerical values "5"
has come to be recognized as.

ページプリンタ内のプリンタコントローラは、ホストコ
ンピュータから「<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 process was complicated and took a long time.

即ち上記判断処理としては、(1)r<esc>Jに続
く2データ(即ちr&J、raJ)かESCシーケンス
として適切なものであるかどうかの判断、(2)数値フ
ィールドにおける数値表記が適正であるかどうかの判断
(r++5J 、r5..0」等は不正である)、及び
(3)数値フィールドの入力が終了したかどうか、及び
ESCシーケンスの終了を示すデータ(rVJ )がE
SCシーケンスとして適切なものであるかどうかの判断
、等がある。しかも、各判断に於いては、入力されたデ
ータを予め記憶されている複数のデータと順次に比較す
ることにより行なわなければならないため、一つの判断
であっても非常に多大な時間を要していた。
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..0" etc. are invalid), and (3) whether the input of the numeric field is completed and the data (rVJ) indicating the end of the ESC sequence is
There is a judgment as to whether it is appropriate as an SC sequence, etc. Moreover, each judgment must be made by sequentially comparing the input data with multiple pre-stored data, so even a single judgment requires an extremely large amount of time. was.

さらに、ESCシーケンスか、上記したような形量外に
、例えばr< e s c >=Jとかr<esc>(
8UJ  (ここで、「8」はコマンドパラメータ)等
も有効である場合など、プリンタコントローラのESC
シーケンス抽出処理は非常に複雑になり、処理に必要な
時間も増大する。
Furthermore, in addition to the ESC sequence or the above-mentioned quantities, for example, r< e sc >= J or r< esc > (
If 8UJ (here, "8" is a command parameter) is also valid, the ESC of the printer controller
The sequence extraction process becomes very complicated and the time required for the process also increases.

本発明は上記の点に鑑みて成されたもので、上位装置よ
り転送されるコマンドを、簡単な手段で識別・抽出する
ことを可能とする端末機のコマンド処理装置を提供する
ことを目的とする。
The present invention has been made in view of the above points, and an object of the present invention is to provide a command processing device for a terminal device that makes it possible to easily identify and extract commands transferred from a host device. do.

さらに本発明は、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と、 前記複数個の処理識別子テーブル3の1つを選択するテ
ーブル指示手段4と、 前記コマンド入力手段2により取り込まれた1単位のコ
ードに応じて、前記テーブル指示手段4により指定され
た処理識別子テーブル3から処理識別子を得、前記複数
の処理手段1の内の該識別子で示される処理手段1を動
作せしめる処理選択手段5と、 前記処理手段1ての処理の実行後、前記テーブル指示手
段4を適宜書き換えた後に、前記処理選択手段5に処理
を遷移させる制御手段6とを備えている。
[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. (hereinafter referred to as "interval"), 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 each indicating one of the plurality of processing means 1. 1
a plurality of processing identifier tables 3 stored in correspondence with unit codes; a table instruction means 4 for selecting one of the plurality of processing identifier tables 3; and one unit taken in by the command input means 2. a processing selection means 5 which obtains a processing identifier from the processing identifier table 3 specified by the table instruction means 4 in accordance with the code, and operates the processing means 1 indicated by the identifier among the plurality of processing means 1; , a control means 6 for causing the processing to be transferred to the processing selection means 5 after appropriately rewriting the table instruction means 4 after execution of the processing by the processing means 1.

特に、本発明の端末機のコマンド処理装置では、前記複
数個の処理識別子テーブル3の内、前記テーブル指示手
段4によって最初に指示される処理識別子テーブル3に
は、1バイトの文字コートと制御コードに対応する処理
識別子と、エスケープシーケンスコードに対応して前記
制御手段6によって書き換えられる前記テーブル指示手
段4により次に選択されるべき処理識別子テーブル3を
示す処理識別子とを格納するようにしている。
In particular, in the terminal command processing device of the present invention, among the plurality of processing identifier tables 3, the processing identifier table 3 instructed first by the table instruction means 4 includes a 1-byte character code and a control code. and a process identifier indicating the process identifier table 3 to be selected next by the table instruction means 4, which is rewritten by the control means 6 in accordance with the escape sequence code.

[作用] 本発明の端末機のコマンド処理装置では、それぞれ複数
の処理手段1の一つを示す識別子を1単位のコードに対
応させて複数格納した複数個の処理識別子テーブル3と
、これら複数個の処理識別子テーブル3の1つを選択す
るテーブル指示手段4とを用意し、処理選択手段5で、
コマンド入力手段2により取り込まれた1単位のコード
に応じて、テーブル指示手段4により指定された処理識
別子テーブル3から処理識別子を得、前記複数の処理手
段]の内の該識別子で示される処理手段]を動作せしめ
、またその処理手段1での処理の実行後、制御手段6に
より前記テーブル指示手段4を適宜書き換えた後に、前
記処理選択手段5に処理を遷移させるようにしているの
で、1単位のコードに対応して処理識別子テーブル3を
遷移するたけで、上位装置からのコマンドを鷹別・抽出
することができ、処理を高速に実行することが可能とな
る。
[Function] The command processing device for a terminal according to the present invention includes a plurality of processing identifier tables 3 storing a plurality of identifiers each indicating one of the plurality of processing means 1 in correspondence with one unit of code, and table designating means 4 for selecting one of the processing identifier tables 3, and the processing selection means 5,
In accordance with one unit of code taken in by the command input means 2, a processing identifier is obtained from the processing identifier table 3 specified by the table instruction means 4, and the processing means indicated by the identifier among the plurality of processing means] ], and after the processing by the processing means 1 is executed, the control means 6 appropriately rewrites the table instruction means 4, and then the processing is transferred to the processing selection means 5. By simply transitioning the process identifier table 3 in accordance with the code, commands from the host device can be identified and extracted, making it possible to execute processes at high speed.

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

端末機としてのプリンタ1oは、第2図に示すように、
上位装置としてのホストコンピュータ100に接続され
たプリンタコントローラ12と、該プリンタコントロー
ラ12によって制御される実際の印字動作を行なうプリ
ンタエンジン14とで構成されている。
The printer 1o 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て実行される制御プログ
ラムを格納した読み出し専用のプログラムメモリ2o、
各種制御情報の書き込み/読み出し時に使用するワーク
メモリ22、上記ホストコンピュータ100よりバス2
4を介して印字情報を読み込むためのポストI/F26
、画像を形成するための補助プロセッサとしてのラスク
プロセッサ28、DMAコントローラ30、上記プリン
タエンジン14に対して印字開始等の命令を送信したり
、プリンタエンジン14の状態等の情報を受信するため
の制御情報用エンジンI/F32が接続されている。
The printer controller 12 includes a CPU 16 for controlling printing. This CPU 16 includes, via a bus 18, a read-only program memory 2o 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
Post I/F 26 for reading print information via 4
, a rask 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 I/F 32 is connected.

上記ラスクプロセッサ28には、バス34を介して、各
種フォントの形状をビットマツプで格納するフォントメ
モリ36と、上記ポストコンピュータ100より転送さ
れた文字コード等の印字情報に従って上記フォントメモ
リ36のデータを配列した画像情報や、ホストコンピュ
ータ100より転送されたビットイメージデータを格納
し、その後、上記プリンタエンジン14にラスタスキャ
ンデータを転送するためのイメージメモリ38が接続さ
れている。また、上記プリンタエンジン14にラスタス
キャンデータを転送するための画像情報用エンジンI/
F40も、上記バス34を介して上記ラスタプロセッサ
28に接続されている。
The Rask 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 print information such as character codes transferred from the postcomputer 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 and the cursor of the work memory 22 corresponding to the read character code. An internal command for the raster processor 28 (hereinafter referred to as a rask command) is generated from information such as the address of the image memory 38 corresponding to the current cursor position information stored in the register 46, and is 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のバス]8に配置し、CPU16か直接フォント
メモリ36のデータをイメージメモリ38に書き込む構
成としてもよい。
In this embodiment, when data in the font memory 36 is transferred to the image memory 38, the processing speed is increased by using the raster processor 28 with the above configuration, or the font memory 36 and the image memory 38 are transferred to the CP
It is also possible to arrange the font memory 36 on the U16 bus] 8 and directly write data from the font memory 36 to the image memory 38 by the CPU 16 .

続いて実際の動作の説明に先だって、本実施例において
使用する各種制御情報を、第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
に、raJワードの長さの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
The HCB block 50 (FIG. 3) having a length of raJ words is a private column for rbJ, and each HCB block 50 is assigned an ID from "0" to r (b-1)J.

各HCBブロック50は、ブロックの先頭の1ワードの
ブロック間リンク情報エリア50】と、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 50 of one word at the beginning of the block, and r(a-1)J
It is configured as an area 502 for storing word print information (host command). Link information area 501
In this case, storage of one page of print information is completed only in the HCB block 50, and when storing print information in another HCB block 50, the following <IDrO of HCB block 50 ~ (b-1 ) 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.
The control block is prepared in the HCB control buffer 52 of the work memory 22. In this HCB control block, the following information, not particularly shown, is written. 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」ワードの長さのR
CBブロック56(第3図)がrdJ個用個用柱、各R
CBブロック56にそれぞれrOJからr (d−1)
JまでのIDが付与される。各RCBブロック56は、
ブロックの先頭の1ワードのブロック間リンク情報エリ
ア56□と、r(c−1)Jワードのラスクコマントを
格納するためのエリア562とで構成される。リンク情
報エリア561には、当該RCBブロック56だけで1
ページのラスクコマントの格納が完結せず、別のRCB
ブロック56にラスクコマントの格納を行う際に、続<
RCBブロック56のIDrO〜(d−1)Jが書き込
まれる。また、当該RCBブロック56て格納が完結し
ているときには、リンク情報として、「−1」が書き込
まれるようになっている。
Subsequently, a raster command buffer (
(hereinafter referred to as RCB) 54 has an R of length “C” words.
CB block 56 (Fig. 3) is an individual column for rdJ, each R
rOJ to r (d-1) in the CB block 56, respectively.
IDs up to J are assigned. Each RCB block 56 is
It is composed of an inter-block link information area 56□ of one word at the beginning of a block, and an area 562 for storing r(c-1)J words of a rask command. The link information area 561 contains only the relevant RCB block 56.
The storage of the page's rask command is not completed and another RCB
When storing the rask command in block 56, continue <
IDrO to (d-1)J of the RCB block 56 are written. Further, when the storage in the RCB block 56 is completed, "-1" is written as the link information.

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

次に、一連の印字動作中に一時にプリンタ10内に印字
過程中として存在し得る用紙枚数reJと、−枚の用紙
に印字し得る最大ページ数rfJ(両面印字か可能な場
合には、「2」ページ/用紙となる)との積rexfJ
に「2」を加えた数、即ち印字動作中に一時にプリンタ
内に存在する最大ページ数に「2」を加えた数の情報ブ
ロックが、ワークメモリ22の環境情報バッファ60内
に用意される。ここで、上記情報ブロックは、印字に必
要な各種の環境情報を格納するための情報ブロックであ
り、各ESCシーケンス解析・実行時に逐次環境情報を
更新するためのカレントの環境情報ブロック(以降、E
IBと称す)1個(図示せず)と、異常の発生時に前記
カレントのEIBを一時退避するエリア1個(図示せず
)、及び各ページの編集開始時にその時点の環境情報を
格納するための格納用EIB62とて構成される。この
EIB62の例を第4図に示す。
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 configured as a storage EIB 62. An example of this EIB62 is shown in FIG.

次に、一連の印字動作中に一時にプリンタ内に印字過程
中として存在し得る用紙枚数reJと、−枚の用紙に印
字し得る最大ページ数「f」 (両面印字が可能な場合
は「2」ベージ/用紙となる)との積「exf」、即ち
印字動作中に一時にプリンタ内に存在する最大ページ数
と同じ数の情報ブロックが、ワークメモリ22のページ
情報量・ソファ64に用意される。この情報ブロックを
、ページ情報ブロック(以降、FIBと称す)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 number of information blocks equal to the product "exf" of "page/paper", that is, the maximum number of pages existing in the printer at one time during printing operation, is prepared in the page information amount/sofa 64 of the work memory 22. Ru. This information block is called a page information block (hereinafter referred to as FIB) 66 (FIG. 3).

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

さらに詳細には、第3図に示すように、HCB開始ブロ
ックID66o1と、HCB開始ブロック先頭からのオ
フセット値66o2と、HCB終了ブロックID66o
3と、HCB終了ブロック先頭からのオフセット値66
o4と、rnJ個のHCBブロック50それぞれにおい
て、当該ページが使用しているHCBブロック50を示
すための、少なくともrbJビットの情報量を持ったフ
ラグ(HCB使用フラグ)66o5と、RCB開始ブロ
ックID66o8と、RCB開始ブロック先頭からのオ
フセット値66o7と、RCB終了ブロックID66o
8と、RCB終了ブロック先頭からのオフセット値66
o9と、rnJ個のRCBブロック56それぞれにおい
て、当該ページが使用しているRCBブロック56を示
すための、少なくともrdJ ビットの情報量を持った
フラグ(RCB使用フラグ)66□。と、対応E I 
B62のID66.1と、及びページ状態スイッチ66
□2である。
More specifically, as shown in FIG.
3 and the offset value 66 from the beginning of the HCB end block.
o4, in each of the rnJ HCB blocks 50, a flag (HCB use flag) 66o5 having an amount of information of at least rbJ bits to indicate the HCB block 50 used by the page, and an RCB start block ID 66o8. , offset value 66o7 from the beginning of the RCB start block, and RCB end block ID 66o
8 and the offset value 66 from the beginning of the RCB end block.
o9 and a flag (RCB use flag) 66□ having an amount of information of at least rdJ bits to indicate the RCB block 56 used by the page in each of the rnJ RCB blocks 56. and corresponding E I
ID66.1 of B62 and page status switch 66
□It is 2.

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

さらに、ワークメモリ22のシート情報量(・ソファ6
8に、一連の印字動作中に一時にプリンタ内に印字過程
中として存在し得る用紙枚数「e」と同じ数のシート情
報ブロック(以降、SIBと称す)70(第3図)が用
意される。
Furthermore, the amount of sheet information in the work memory 22 (sofa 6
8, the same number of sheet information blocks (hereinafter referred to as SIBs) 70 (FIG. 3) are prepared as the number of sheets of paper "e" that can exist in the printer at one time during a series of printing operations. .

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

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

このシート状態スイッチ704oは、その内容により以
下の状態を示す。即ち、rFREEJて開放状態を示し
、rEDITJで編集中を示し、rEDENDJで編集
終了を示し、rWAITJで用紙の排出待ちを示す。
This seat state switch 704o indicates the following states depending on its contents. That is, rFREEJ indicates the open state, rEDITJ indicates editing, rEDENDJ indicates the end of editing, and rWAITJ 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、即ち5IB70のIDが
順次書き込まれる。
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 ID of 5IB70, is sequentially written.

さらに、制御を実行するにあたり、上記テーブルメモリ
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. In order to store the addresses of processing modules for each character code, a plurality of 256 processing address tables shown below are stored in which 256 pieces are concatenated in the order of character codes.

即ち、上記テーブルメモリ42に格納された処理アドレ
ステーブルとしては、第5図に示すように、ホストコン
ピュータ100より最初に入力された文字コード別の処
理モジュールのアドレスを格納するベーシック処理アド
レステーブル(tblbas)と、コマンドヘッダであ
るESC]−ドが入力された後に、サポートするESC
シーケンス体系に基づいて、コマンドへ・ソダのESC
コードに続く文字コート別にそれぞれの下位処理モジュ
ールに移行するための、前記同様に文字コード順に25
6個連結された第1 ESC処理アドレステーブル(t
blescl)と、引き続く文字コード別に、各処理モ
ジュールに移行するための第2ESC処理アドレステー
ブル(tblesc2)と、引き続く文字コード別に、
各処理モジュールに移行するための第3ESC処理アド
レステーブル(tblesc3)とが、文字コードに対
応して格納されている。
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]-, the supporting ESC
Based on the sequence system, go to command/soda ESC
25 in order of character code as above to move to each lower processing module for each character code following the code.
The first ESC processing address table (t
blescl), the second ESC processing address table (tblesc2) for transitioning to each processing module for each successive character code, and the second ESC processing address table (tblesc2) for each successive character code.
A third ESC processing address table (tblesc3) for shifting to each processing module is stored in correspondence with character codes.

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

次に、印字が正常に終了するまでの処理を、第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; 5701), internalizes it, 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 < e s c > Jはエス
ケープコードを示すものとし、[<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 < e sc > J represents an escape code, and [<cr>J represents 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.

l”<esc>−Jは、エスケープシーケンスと半行改
行コマンドである。rdJreJ、rfJも、上記ra
J、fbJ、rcJと同様に文字印字コマンドである。
l"<esc>-J is an escape sequence and a half line feed command. rdJreJ and rfJ are also the above ra
Like J, fbJ, and rcJ, this is a character print command.

r<esc>&a5v3.4HJは、以下に示す2個(
7)ESCシーケンスが連結されたものである。即ち、
1”<esc>&a5VJで、カーソルのY位置移動コ
マンド(パラメータ〜5)を表わし、1”<esc>&
a3.4HJで、カーソルのX位置移動コマンド(パラ
メーター3.4)を表わす。
r<esc>&a5v3.4HJ is the following two pieces (
7) ESC sequences are concatenated. That is,
1”<esc>&a5VJ represents the cursor Y position movement command (parameter ~5), and 1”<esc>&
a3.4HJ represents the cursor X position movement command (parameter 3.4).

rgJ、rho、riJもまた文字印字コマンドである
。[<cr>Jは、行先頭位置へカーソルを移動させる
コマンドである。
rgJ, rho, 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)を参照して、「basch
rJという処理モジュールへ制御を移行する。この[b
aschrJは、通常)文字の印字のための処理であり
、コードに対応するフォントのイメージデータをイメー
ジメモリ38上に展開する処理を行なう。また、このr
baschrJでは、処理アドレステーブルポイン9 
(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
Control is transferred to a processing module called rJ. This [b
aschrJ is a process for printing characters (usually), 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, processing address table point 9
Do not rewrite (curtbl).

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

次に1データl”<esc>Jか入力されると、そのコ
ード(IBh)によって、処理アドレステーブルポイン
タ(curtbl)が示すベーシック処理アドレステー
ブル(tblbas)を参照して、[pme s cJ
という処理モジュールへ制御を移行する。このrpme
scJは、ESCSCグース解析のための初期化処理を
行なう。即ち、ESCシーケンスによるコマンドを実行
する処理モジュールへコマンドパラメータを渡すための
ポインタレジスタ74のパラメータレジスタ(cIIl
dprm)の初期化、並びにコマンドを識別するための
ポインタレジスタ74のコマンドIDレジスタ(can
did )の初期化を行う。また、このrpmescJ
は、テーブルメモリ42の複数の処理テーブルの内の第
1ESC処理アドレステーブル(tblescl )を
示すように、処理アドレステーブルポインタ(curt
bl)を書き換える。
Next, when 1 data l"<esc>J is input, the code (IBh) refers to the basic processing address table (tblbas) indicated by the processing address table pointer (curtbl) and executes [pme s cJ
control is transferred to a processing module called This rpm
scJ performs initialization processing for ESCSC goose analysis. That is, the parameter register (cIIl
dprm) and the command ID register (can
did). Also, this rpmescJ
indicates the first ESC processing address table (tblescl) among the plurality of processing tables in the table memory 42.
bl).

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

今の場合、rXJにあたるデータ「−」(コード:3D
h)によって、ここでは説明しない2キヤラクタESC
シーケンスコマンド処理アドレステーブル(図示せず)
を参照し、そのアドレスの処理(半行改行の処理)に制
御を移行する。2ギヤラクタESCシーケンスは、「X
」 (この場合、「−」)によって終了する。また、こ
の「pm2ceJは、ベーシック処理テーブル(tbl
bas)を示すように、処理アドレステーブルポインタ
(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-gear actuator ESC sequence is
” (in this case, “-”). In addition, this "pm2ceJ" is a basic processing table (tbl
bas), returns the processing address table pointer (curtbl).

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

続(データ「ed、rfJも、上記データrdJと同様
に処理される。
Continuation (The data ``ed, rfJ'' are also processed in the same way as the above data rdJ.

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

そして、r<esc>Jに続くデータ「&」が入力され
ると、そのコード(26h)によって、処理アドレステ
ーブルポインタ(curtbl)が示す第1ESC処理
アドレステーブル(tblescl )を参照して、r
pmpeJという処理モジュールへ制御を移行する。こ
のrpmp eJは、現在処理中のESCシーケンスか
、[<esc>Ab#C#C2#C3・・・#C」とい
う形であること■ を決定し、テーブルメモリ42の複数の処理アドレステ
ーブルの内の第2ESC処理アドレステーブル(tbl
esc2)を示すように、処理アドレステーブルポイン
タ(curtbl)を書き換える。ここで、rAJのコ
ードは21h≦A≦2Fhであり、rbJのコードは6
0h≦b≦7Ehであり、「#」は数値フィールド、つ
まり「0」〜「9」。
Then, when the data "&" following r<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 r
Control is transferred to a processing module called pmpeJ. This rpm eJ determines whether the ESC sequence is currently being processed or has the form [<esc>Ab#C#C2#C3...#C], and stores the multiple processing address tables in the table memory 42. The second ESC processing address table (tbl
The processing address table pointer (curtbl) is rewritten to indicate esc2). Here, the code of rAJ is 21h≦A≦2Fh, and the code of rbJ is 6
0h≦b≦7Eh, and “#” is a numerical field, that is, “0” to “9”.

r+J、r−J、r、Jを示している。また、rc  
J、rc2J、・・・のコードは、60h≦■ c1≦7Ehであり、このデータ「cl」の前の数値フ
ィールドに示された値が、rAbc、コなす るESC,シーケンスによって識別されるESCシーケ
ンスコマンドに対するパラメータであることを示す。さ
らにこれは、ESCシーケンスが引き続き連結されてい
ることも示している。また、rCJのコードは40h≦
C≦5Ehであり、このデータrCJO前の数値フィー
ルドに示された値が、「<esc>AbCJなるESC
シーケンスによって識別されるエスケープコマンドに対
するパラメータであることを示す。このデータによ))
ESCシーケンスは終了する。そして、このrpmpe
Jは、コマンドを識別するためのコマンドIDレジスタ
(cm旧d)の第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 "cl" is the ESC identified by the rAbc, ESC constituting sequence, Indicates that it is a parameter for a sequence command. Furthermore, it also shows that the ESC sequences are still concatenated. Also, the rCJ code is 40h≦
C≦5Eh, and the value shown in the numerical field before this data rCJO is “<esc>AbCJ”.
Indicates a parameter to the escape command identified by the sequence. Based on this data))
The ESC sequence ends. And this rpmpe
J writes input data "&" into the first byte of the command ID register (cm old d) for identifying the command.

次に、データraJが入力されると、そのコード(61
h)によって、処理アドレステーブルポインタ(cur
tbl)が示す第2ESC処理アドレステーブル(tb
lesc2)を参照して、rpmpgJという処理モジ
ュールへ制御を移行する。この「pmpg」は、コマン
ドを識別するためのコマンドIDレジスタ(cmcHd
)の第2バイト目に、入力データraJを書き込む。ま
た、続くデータ(数値フィールドあるいはrc IJ 
、rcJ )を処理するために、テーブルメモリ42の
複数の処理アドレステーブルの内の第3ESC処理アド
レステーブル(tblesc3)を示すように、処理ア
ドレステーブルポインタ(curtbl)を書き換える
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 “pmpg” is a command ID register (cmcHd) for identifying commands.
), input data raJ is written in the second byte of the file. Also, the following data (numeric field or rc IJ
, rcJ), the processing address table pointer (curtbl) 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処理アドレステーブル(tb
lesc3)を参照して、[pmv5Jという処理モジ
ュールへ制御を移行する。このrpmv5Jは、数値フ
ィールドにおける処理であり、文字データである「5(
コード=35h)Jを数値「5」としてパラメータレジ
スタ(ca+dprm)に格納する。このrpmv5J
は、処理アドレステーブルポインタ(curtbl)を
書き換えない。
Next, when the data "5" is input, the code (35
h), the processing address tilt pull pointer (cur
tbl) indicated by the third ESC processing address table (tb
lesc3) and transfers control to the processing module named pmv5J. This rpmv5J is a process in a numerical field, and is character data "5 (
Code=35h) Store J in the parameter register (ca+dprm) as a numerical value "5". This rpmv5J
does not rewrite the processing address table pointer (curtbl).

続けてデータrvJが入力されると、そのコード(76
h)によって、処理アドレステーブルポインタ(cur
tbl)か示す第3ESC処理アドレステーブル(tb
lesc3)を参照して、rpmppJという処理モジ
ュールへ制御を移行する。このrpmpp」は、連結E
SCシーケンスにおいて一つのESCシーケンスか完結
したときの処理を行なう。このrpmppJは、入力さ
れたデータrvJを正規化して、rV (コード:56
h)JをコマンドIDレジスタ(cmdid)の第3ハ
イド目に書き込む。こうして、コマンドIDレジスタ(
cmdid )にr&aV (266156h)Jが格
納され、これによって、ここでは説明しないESCシー
ケンスコマンド処理アドレステーブル(図示せず)を参
照し、そのアドレスの処理(カーソルのY位置移動処理
)にコマンドパラメータ(cmdprm)の内容(数値
「5」)を渡し、制御を移行する。そして、ESCシー
ケンスによるコマンドを実行する処理モジュールへコマ
ンドパラメータを渡すためのパラメータレジスタ(cn
+dprm)の初期化を行なう。このrpmppJは、
続く連結ESCシーケンスを処理するため、処理アドレ
ステーブルポインタ(curtbl)を書き換えない。
When data rvJ is input continuously, that code (76
h), the processing address table pointer (cur
tbl) or the third ESC processing address table (tb
lesc3) and transfers control to a processing module called rpmppJ. This “rpmpp” is the concatenation E
Processing is performed when one ESC sequence is completed in the SC sequence. This rpmppJ normalizes the input data rvJ and rV (code: 56
h) Write J to the third hide of the command ID register (cmdid). In this way, the command ID register (
cmdid) is stored in r&aV (266156h)J, which refers to the ESC sequence command processing address table (not shown), which will not be explained here, and applies the command parameter ( cmdprm) (number "5") and transfers control. Then, a parameter register (cn
+dprm) is initialized. This rpmppJ is
In order to process the subsequent concatenated ESC sequence, the processing address table pointer (curtbl) is not rewritten.

次に、データ「3」が入力されると、そのコード(33
h)によって、処理アドレステーブルポインタ(cur
tbl)か示す第3ESC処理アドレステーブル(tb
lesc3)を参照して、rpmv 3Jという処理モ
ジュールへ制御を移行する。このrpmv3Jは、数値
フィールドにおける処理であり、文字データである「3
(コード:33h)jを数値「3」として、パラメータ
レジスタ(cmdprm)に格納する。この「pmv3
Jは、処理アドレステーブルポインタ(curtbl)
を書き換えない。
Next, when data "3" is input, the code (33
h), the processing address table pointer (cur
tbl) or 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 as a numerical value "3" in the parameter register (cmdprm). This “pmv3
J is the processing address table pointer (curtbl)
cannot be rewritten.

データ「、」が入力されると、そのコード(2E h)
によって、処理アドレステーブルポインタ(curtb
l)が示す第3ESC処理アドレステーブル(tble
sc3)を参照して、rpmpntJという処理モジュ
ールへ制御を移行する。このrpmpntJは数値フィ
ールドにおける処理であり、文字データである「、(コ
ード:2Eh)Jを数値表現−子である小数点としてパ
ラメータレジスタ(cmdpr+n)に格納する。この
rpmpntJは、処理アドレステーブルポインタ(e
urtbl)を書き換えない。
When the data "," is input, the 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 rpmntJ is a process in a numerical field, and stores the character data ", (code: 2Eh)J as a numerical expression - child decimal point in the parameter register (cmdpr+n). This rpmntJ is a process in the processing address table pointer (e
urtbl) is not rewritten.

次に、データ「4」が入力されると、そのコド(34h
)によって、処理アドレステーブルポインタ(curt
bl)が示す第3ESC処理アドレステーブル(tb!
esc3)を参照して、rpmv4Jという処理モジュ
ールへ制御を移行する。このrpmv4Jは、数値フィ
ールドにおける処理であり、文字データである「4(コ
ート:34h)Jを数値としてパラメータレジスタ(c
mdpr+++)に格納する。これにより、現在のパラ
メータレジスタ(cmdpr+n)の内容は、r3.4
Jという数値となる。このrpmv4Jは、処理アドレ
ステーブルポインタ(curtbl)を書き換えない。
Next, when data "4" is input, that code (34h
) by the processing address table pointer (curt
bl) indicates the third ESC processing address table (tb!
esc3) and transfers control to the processing module rpmv4J. This rpmv4J is a process in the numerical field, and the character data "4 (coat: 34h) J" is used as a numerical value in the parameter register (c
mdpr+++). As a result, the contents of the current parameter register (cmdpr+n) are r3.4
The value is J. This rpmv4J does not rewrite the processing address table pointer (curtbl).

続けてデータrHJが入力されると、そのコード(48
h)によって、処理アドレステーブルポインタ(cur
tbl)か示す第3ESC処理アドレステーブル(tb
lesc3)を参照して、rpmptJという処理モジ
ュールへ制御を移行する。このrpmptjは、ESC
シーケンスが終了したときの処理を行なう。即ち、デー
タrH(コード:48h)JをコマンドIDレジスタ(
cmdid)の第3バイト目に書き込む。こうしてコマ
ンドIDレジスタ(cmdid)にr&aH(2661
48h)jか格納され、これによって、ここでは説明し
ないESCシーケンスコマンド処理アドレステーブルを
参照し、そのアドレスの処理(カーソルのX位置移動処
理)にコマンドパラメータ(cmdprm)の内容(数
値r3.4J)を渡し、制御を移行する。また、このr
pmp tJは、ESCシーケンスの終了により、ベー
シック処理アドレステーブル(tblbas)を示すよ
うに、処理アドレステーブルポインタ(curtbl)
を戻す。
When data rHJ is input continuously, that code (48
h), the processing address table pointer (cur
tbl) or the third ESC processing address table (tb
lesc3) and transfers control to a processing module called rpmptJ. This rpmptj is ESC
Perform processing when the sequence ends. That is, data rH (code: 48h) J is stored in the command ID register (
cmdid). In this way, the command ID register (cmdid) is set to r&aH (2661).
48h) j is stored, and as a result, the ESC sequence command processing address table, which is not explained here, is referenced and the contents of the command parameter (cmdprm) (number r3.4J) are used to process that address (cursor X position movement processing). to transfer control. Also, this r
pmp tJ is set to the processing address table pointer (curtbl) to point to the basic processing address table (tblbas) upon completion of the ESC sequence.
Return.

次に、データrgJが入力されると、そのコード(67
h)によって、処理アドレステーブルポインタ(cur
tbl)が示すベーシック処理アドレステーブル(tb
lbas)を参照して、rbaschrJという処理モ
ジュールへ制御を移行する。このrbaschrJは、
通常の文字の印字のための処理であり、コードに対応す
るフォントのイメージデータをイメージメモリ38上に
展開する。このrbaschrJては、処理アドレステ
ーブルポインタ(curtbl)を書き換えない。
Next, when data rgJ is input, its code (67
h), the processing address table pointer (cur
Basic processing address table (tb) indicated by
lbas) and transfers control to a processing module called rbaschrJ. This rbaschrJ is
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.

そして、データ「くCr〉」が入力されると、そのコー
ド(ODh)によって、処理アドレステーブルポインタ
(curtbl)か示すベーシック処理アドレステーブ
ル(tblbas)を参照して、「bascrJという
処理モジュールへ制御を移行する。この「bascrJ
は、カーソルレジスタ46に格納されたカーソル位置情
報を、行の先頭位置を示す情報に書き換える処理を行な
う。また、この[bascrJては、処理アドレステー
ブルポインタ(curtbl)を書き換えない。
When the data "Cr>" is input, the code (ODh) refers to the basic processing address table (tblbas) indicated by the processing address table pointer (curtbl) and sends control to the processing module called "bascrJ". Migrate.This “bascrJ
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からのデータを、1キヤラクタ(1b
y、te)毎の処理テーブルの遷移によってコマンド/
パラメータを識別し、文字印字処理、制御コードコマン
ド処理、ESCシーケンスによる各種コマンド処理等へ
制御を移行させる。
As described above, the host command analysis unit analyzes data from the host computer 100 for one character (1b
command/by transition of the processing table for each
The parameters are identified and control is transferred to character printing processing, control code command processing, various command processing using the ESC sequence, etc.

各々のコマンド処理モジュールは、当該コマンドがカレ
ントのカーソル位置に変更を生しるコードであれば、ペ
ージ/シート獲得処理(ステップ870B)へ更に移る
。また、当該コマンドか文字間隔の設定等のカレントの
カーソル位置に変更を生じないコードであれば、カレン
トのEIBの対応する情報を更新した後(ステップ57
04)、ベージ/シート獲得処理をスキップし、ホスト
コマンドの格納の処理に移行する。このホストコマンド
の格納処理は、後述する。
Each command processing module further moves to page/sheet acquisition processing (step 870B) if the command is code that causes a change to 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がrEDIT
Jであるページ情報ブロック(PIB)66があるかど
うかを調べる(ステップ5602 ; 5901)。E
DIT中のページがあれば、ページ、HCB、RCB、
シートの獲得処理は行わない。
That is, the CPU 16 checks whether there is a page currently being edited, that is, if the page status switch 6612 is set to rEDIT.
It is checked whether there is a page information block (PIB) 66 that is J (step 5602; 5901). E
If there are pages in DIT, page, HCB, RCB,
Seat acquisition processing is not performed.

EDIT中のページかない場合、CPU16はまず、ペ
ージ状態スイッチ66.2が[FREEJであるPIB
66を探し、当該P I B66を獲得する(ステップ
5902)。
If there is no page being edited, the CPU 16 first selects the PIB whose page status switch 66.2 is [FREEJ].
66 and obtains the P I B66 (step 5902).

次にCPU16は、獲得したP I B66の初期化処
理として、以下の作業を行う。即ち、当該P I B6
6のページ状態スイッチ6612をrEDITjにする
(ステップ8903)。
Next, the CPU 16 performs the following operations as initialization processing of the acquired PIB 66. That is, the P I B6
The page state switch 6612 of No. 6 is set to rEDITj (step 8903).

次に、HCBコントロールバッファ52のHCBコント
ロールブロックより、現在のホストコマンドバッファ(
HCB)ブロック50の書き込み場所を読み出し、当該
PIB66のHCB開始ブロックID66  及び開始
オフセット66o2を設定する。また、当該PIB66
のHCB終了ブロックI D66  及びオフセット6
6o4をクリアし、HCB使用フラグ66o5の中の、
書き込み用に獲得したHCBブロック50のIDに対応
するビットをセットする。次に、RCBコントロールバ
ツファ58のRCBコントロールブロックより現在のラ
スタコマンドバッファ(RCB)ブロック56の書き込
み場所を読み出し、当該PIB66のRCB開始ブロッ
クID66o6及び開始オフセット66o7を設定する
。また、当該P I B66のRCB終了ブロック■D
66o8及びオフセット66 をクリアし、RCB使用
フラグ66、。の中の、書き込み用に獲得したRCBブ
ロック56のIDに対応するビットをセットする。
Next, the current host command buffer (
HCB) Read the write location of the block 50 and set the HCB start block ID 66 and start offset 66o2 of the PIB 66. In addition, the PIB66
HCB end block ID D66 and offset 6
Clear 6o4 and set HCB use flag 66o5.
A bit corresponding to the ID of the HCB block 50 acquired for writing is set. Next, the write location of the current raster command buffer (RCB) block 56 is read from the RCB control block of the RCB control buffer 58, and the RCB start block ID 66o6 and start offset 66o7 of the PIB 66 are set. In addition, the RCB end block ■D of the P I B66
Clear 66o8 and offset 66, 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) 、現在編集
状態中のシートがあるかどうか、即ちシート状態スイッ
チ704゜か「EDITJであるシート情報ブロック(
SIB)70があるかどうかを調べる(ステップ560
4.5905)。
Thus, PIB66
, HCB48, and RCB54 are acquired (steps 8603; 5904), it is determined whether there is a sheet currently in the editing state, that is, whether the sheet state switch 704° or the sheet information block (EDITJ) is selected.
SIB) 70 (step 560)
4.5905).

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にする(ステップ
5907)  そして、現在のモード(片面印字/両面
印字)に応じて、当該シートを構成するPIB66の数
、即ち当該シート1枚に印字する情報のページ単位の数
(片面印字−1/両面印字−2)を、エリア70、。に
設定する。
That is, search for 5IB70 whose seat state switch 704o is rFREEJ and acquire the corresponding S I B2O (
Step 5906) Next, set the sheet status switch 704o of the 5IB70 to rEDITJ (Step 5907) Then, depending on the current mode (single-sided printing/double-sided printing), the number of PIBs 66 constituting the sheet, that is, the sheet 1 The area 70 indicates the number of pages of information to be printed on the sheet (single-sided printing -1/double-sided printing -2). Set to .

続いて、獲得された5IB70の対応する場所に、つま
りエリア70.7022に当該シートに従属するPIB
66のID、及びエリア703□703゜に当該ページ
の当該シート上の印字位置情報(当実施例では表面印字
か、裏面印字かを示す情報)を書き込む(ステップ89
08)。
Subsequently, the PIB subordinate to the sheet is placed in the corresponding location of the acquired 5IB70, that is, in area 70.7022.
66 and the printing position information on the sheet of the page (in this embodiment, information indicating whether it is printed on the front side or the back side) is written in the area 703□703° (Step 89
08).

最後にCPU16は、開放されている格納用E I B
62の1つにカレントのEIBの情報を全て格納し、上
記P I B66内のエリア66□1に、この格納用E
 I B62のIDをセットする(ステップS 909
)。このカレントEIBの情報を格納用EIB62に格
納する処理において、カレントEIBの情報をそのまま
格納用EIB62に格納してもよいし、カレントEIB
の情報を圧縮した形式で格納用E I B62に格納し
てもよい。
Finally, the CPU 16 stores the opened storage E I B
All the information of the current EIB is stored in one of the EIBs 62, and this storage EIB is stored in the area 66□1 in the PIB 66.
Set the ID of I B62 (step S909
). 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 in the storage EIB 62 as is.
The information may be stored in the storage E I B 62 in a compressed format.

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

上記の処理に続いて、入力されたホストコマンド別に、
次の処理が行われる(第7図参照)。
Following the above processing, depending on the host command entered,
The following processing is performed (see FIG. 7).

即ち、入力されたデータが、通常の印字文字コード(2
1H〜7EH)である場合には、CPU16は、当該文
字コードに対応したフォントの形状データを前記イメー
ジメモリ38にビットブロック転送(B I TBLT
)するために、前記のタスクプロセッサ28用のラスク
コマントを生成する(ステップS 705)。1つのラ
スクコマントは下記の情報より構成される。即ち、転送
されるデータ(ソースデータ)の格納元アドレスと、ソ
ースデータの幅と、ソースデータの長さと、転送された
ソースデータのイメージメモリ38上の格納先アドレス
である。
In other words, the input data is a normal printing character code (2
1H to 7EH), the CPU 16 transfers the shape data of the font corresponding to the character code to the image memory 38 in bit blocks (BI TBLT).
), a rask command for the task processor 28 is generated (step S705). One rask command consists of the following information. That is, the storage source address of the transferred data (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,
Based on the input character code, an information table (not shown) for each character code (details are not described in this specification) is referred to, and the storage source address of the font corresponding to the character code and the font corresponding to the character code are determined. 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 raster image data to the printer engine 14) and the Y direction perpendicular to the X direction registered in the current EIB. Find the address (print position of the relevant character). Based on this information, the CPU 16 generates a raster command for the task processor 28 that corresponds 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の長さを越えていると、C
PU16は下記の手順で新たなRCBブロック56の獲
得処理を行う。
Next, the updated offset value is checked, and if this value exceeds the length of one RCB block 56, the C
The PU 16 performs the process of acquiring a new RCB block 56 using the following procedure.

即ち、CPU16は、全てのP I B66のRCB使
用フラグ66、。の論理和を求め、現在開放されている
RCBブロック56のIDを求める。
That is, the CPU 16 sets the RCB use flag 66 of all P I Bs 66. The ID of the currently released RCB block 56 is determined by calculating the logical OR of the RCB block 56 that is currently open.

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

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

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

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

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

即ち、CPU16は、現在ページが獲得されているかど
うかを調べる(ステップS 709)。獲得されていな
い場合は、入力されたホストコマンドはカレントのカー
ソル位置に変更を生じないコマンドであり、前項の各コ
マンド別処理において前記カレントのEIB内の各種環
境情報を更新するだけで当該ホストコマンドに対する処
理を終了する。
That is, the CPU 16 checks whether a page is currently acquired (step S709). 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.

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

即ち、CPU16は、HCBコントロールバッファ52
の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 52
HC for writing from the HCB control block of
Read B block ID and 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は、全てのP I B66のHCB使
用フラグ66o5の論理和を求め、現在開放されている
HCBブロック50のIDを求める。
That is, the CPU 16 calculates the logical sum of the HCB use flags 66o5 of all the P I Bs 66, and calculates the ID of the currently released HCB block 50.

このIDを現在書き込み中のHCBブロック5゜先頭の
、HCBブロックリンク情報エリア501に書き込むこ
とで、これまで書き込んでいたHCBブロック50の連
結先を明らかにする。次にHCBコントロールブロック
のHCBブロックID及びオフセット値を、新たに獲得
したHCBブロック50に基づき更新する。更に現在編
集中のページのPIB66内のHCB使用フラグ66o
5を更新する。
By writing this ID in the HCB block link information area 501 at the beginning of the HCB block 5° currently being written, the connection destination of the HCB block 50 that has been written so far is clarified. 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 66o in PIB66 of the page currently being edited
Update 5.

CPU16は、ホストコンピュータ100より、改ペー
ジコマンド(F F)が転送されるが、改行コマンド(
L F)により1ページの許容行数を越えるまで(ステ
ップ5607) 、ここまての処理を繰り返す。そして
、ページが終了したならば、下記の手順で当該ページの
終了処理を行う(ステップ5608)。即ち、当該ペー
ジのP I B66のページ状態スイッチ6612をr
EDENDJにする。次に、当該ページのPIBのHC
B終了ブロックID66o3及びHCB終了ブロックオ
フセット66o4を書き込む。そして、RCB終了ブロ
ックID66o8及びRCB終了ブロックオフセット6
6o9を書き込む。
The CPU 16 receives the page feed command (FF) from the host computer 100, but the CPU 16 transfers the page feed command (F
The above process is repeated until the allowable number of lines for one page is exceeded (step 5607). When the page ends, the end process for the page is performed according to the following procedure (step 5608). That is, the page status switch 6612 of the PIB 66 of the page is set to r.
Make it EDEND DJ. Next, the HC of the PIB of the page
Write B end block ID 66o3 and HCB end block offset 66o4. Then, RCB end block ID 66o8 and RCB end block offset 6
Write 6o9.

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

CPU16は、前のページのイメージ転送等のためのイ
メージメモリ38の専有が終了し、イメージメモリ38
が開放されると、イメージデータの形成及び転送処理を
行なう。即ち、CPU16は、上記S I B2O内の
ページ位置情報702□を参照し、当該シートの第1面
に印字すべきページのIDを検出する。続いて、検出さ
れたページのP I B66のページ状態スイッチ66
12を「DsPTJにセットし、上記DMAコントロー
ラ30を用いて、RCB54に格納されたラスクコマン
トを、1ブロツクづつ上記タスクプロセッサ28にDM
A転送し、イメージメモリ38上にフォントイメージ等
の展開を行う。全てのデータの展開処理が終了すると、
続いてCPU16は、対応するページのPIB66のペ
ージ状態スイッチ6612をrDsENDJにセットし
、プリンタエンジン14からの要求に基ついて形成した
ラスタイメージデータをプリンタエンジン14に転送す
る。
The CPU 16 completes exclusive use of the image memory 38 for image transfer of the previous page, etc.
When it is released, image data formation and transfer processing is performed. That is, the CPU 16 refers to the page position information 702□ 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 to "DsPTJ," and uses the DMA controller 30 to DM the rask commands stored in the RCB 54 to the task processor 28 one block at a time.
A is transferred, and font images, etc. are developed on the image memory 38. When all data has been expanded,
Subsequently, the CPU 16 sets the page status switch 6612 of the PIB 66 of the corresponding page to rDsENDJ, and transfers the raster image data formed based on the request from the printer engine 14 to the printer engine 14.

1画面分のラスタイメージデータの転送が終了すると、
続いてCPU16は、対応するシート及びページの各状
態スイッチ70,66□2を「WA I TJにセット
し、プリンタエンジン]4からの用紙の正常排出を待つ
When the transfer of one screen worth of raster image data is completed,
Subsequently, the CPU 16 sets the corresponding sheet and page state switches 70, 66□2 to "WA I TJ" and waits for the paper to be normally ejected from the printer engine 4.

実際には、イメージメモリ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 raster 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バッフソフ2のSSQよりデータを取り出し、
排出されたシートのS I B2OのIDを検出する。
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, extract data from SSQ of SSQ buffer software 2,
The S I B2O ID of the ejected sheet is detected.

そして、当該シートの5IB70のシート状態スイッチ
704゜をrFREEJにセットする。そして、当該シ
ートのS I B2OのPIB情報より、従属する全て
のページに対し下記の手順でページの開放処理を灯つ。
Then, the seat status switch 704° of the 5IB70 of the relevant seat is set to rFREEJ. Then, based on the S I B2O PIB information of the sheet, page release processing is activated for all dependent pages in the following procedure.

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

以上の手順てプリントモードとして片面印字が選択され
、ホストコンピュータ100より入力された印字情報の
、用紙への印字が正常終了する。
With the above steps, 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 commands and parameters from host data, it is possible to identify and extract host commands and parameters by simply transitioning between processing address tables corresponding to the host data. , there is almost no need for operations to perform comparisons and judgments, and processing can be executed at high speed.

なお、前述の実施例では、上位装置をホストコンピュー
タとした端末機として、プリンタを例に取って説明した
か、本発明はこれに限定されるものではなく、種々の上
位装置からのコマンドを処理する種々のコマンド処理装
置に適用可能である。
In the above-mentioned embodiment, a printer is used as an example of a terminal device with a host computer as a host device, but the present invention is not limited to this, and can process 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, it is possible to provide a command processing device for a terminal device that can easily identify and extract commands transferred from a host device. can.

さらに本発明によれば、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 change the analysis procedure.

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

第1図は本発明の端末機のコマンド処理装置の機能ブロ
ック図、第2図は実施例の構成を示す図、第3図はシー
ト/ベージ/バッファの管理体系を示す図、第4図は環
境情報ブロックの記憶内容を示す図、第5図は各処理ア
ドレステーブルをコードに対応させて示す図、第6図は
全体の処理の流れを示すフローチャート、第7図はホス
トコマンド別処理フローチャート、第8図は処理アドレ
ステーブル及び制御の遷移表、第9図はベージ/シート
獲得処理フローチャートである。 1・・・処理手段、2・・・コマンド入力手段、3・・
・処理識別子テーブル、4・・・テーブル指示手段、5
・・・処理選択手段、6・・・制御手段。 出願人代理人 弁理士 坪井  淳 ? 第 図 第8 図
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. FIG. 5 is a diagram showing the storage contents of the environment information block, FIG. 5 is a diagram showing each processing address table in correspondence with the code, FIG. 6 is a flowchart showing the overall processing flow, FIG. 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 instruction means, 5
. . . Processing selection means; 6. Control means. Applicant's representative Patent attorney Atsushi Tsuboi? Figure 8

Claims (2)

【特許請求の範囲】[Claims] (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 plurality of processing identifier tables each storing a plurality of identifiers each indicating one of the plurality of processing means in association with one unit of code; table designating means for selecting one of a plurality of process identifier tables; obtaining a process identifier from the process identifier table designated by the table designating means in response to one unit of code taken in by the command input means; processing selection means for activating the processing means indicated by the identifier among the plurality of processing means; and after executing the processing in the processing means, appropriately rewriting the table instruction means, and then instructing the processing selection means to perform the processing. 1. A command processing device for a terminal, comprising: control means for causing transition.
(2)前記複数個の処理識別子テーブルの内、前記テー
ブル指示手段によって最初に指示される処理識別子テー
ブルには、1バイトの文字コードと制御コードに対応す
る処理識別子と、エスケープシーケンスコードに対応し
て前記制御手段によって書き換えられる前記テーブル指
示手段により次に選択されるべき処理識別子テーブルを
示す処理識別子とを格納することを特徴とする請求項1
に記載の端末機のコマンド処理装置。
(2) Among the plurality of processing identifier tables, the processing identifier table instructed first by the table instruction means includes processing identifiers corresponding to 1-byte character codes and control codes, and escape sequence codes. and a processing identifier indicating a processing identifier table to be selected next by the table instruction means, which is rewritten by the control means.
A command processing device for the terminal described in .
JP2110447A 1990-04-27 1990-04-27 Command processing device of terminal equipment Pending JPH048570A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2110447A JPH048570A (en) 1990-04-27 1990-04-27 Command processing device of terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2110447A JPH048570A (en) 1990-04-27 1990-04-27 Command processing device of terminal equipment

Publications (1)

Publication Number Publication Date
JPH048570A true JPH048570A (en) 1992-01-13

Family

ID=14535948

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2110447A Pending JPH048570A (en) 1990-04-27 1990-04-27 Command processing device of terminal equipment

Country Status (1)

Country Link
JP (1) JPH048570A (en)

Similar Documents

Publication Publication Date Title
US20020161936A1 (en) User interface control apparatus and method
JPH08174964A (en) Data processing method and its device
JP2755308B2 (en) Output method and device
JP2993276B2 (en) Printer
US7589861B2 (en) Image forming apparatus and printing system
JPH048570A (en) Command processing device of terminal equipment
JPH07112552A (en) Method for control of printing form and apparatus therefor in printer
JPH0410026A (en) Command processor for terminal equipment
JP3116354B2 (en) Printer data management method
JP3478696B2 (en) Image processing apparatus and control method thereof
JPH02287611A (en) Printer controller
JPH08230249A (en) Image processing apparatus
JP3817077B2 (en) Print processing system and image forming apparatus
JPH04174022A (en) Printer controller
JPH08194460A (en) Character processing device
JP3387796B2 (en) Print control device and data processing method of print control device
JP2728916B2 (en) Character processing apparatus and method
JP3411350B2 (en) Outline character expansion device
JP3833195B2 (en) Image processing apparatus and control method thereof
JPH02286381A (en) Printer controller
JP3415542B2 (en) Print area control method for page printer
JPS59730A (en) Asynchronous hard copy system of display screen
JPH1011236A (en) Document visualizing processing method
JPH02286384A (en) Printer controller
JPH04327966A (en) Image forming device