JPS6061830A - Printer control system - Google Patents
Printer control systemInfo
- Publication number
- JPS6061830A JPS6061830A JP58170249A JP17024983A JPS6061830A JP S6061830 A JPS6061830 A JP S6061830A JP 58170249 A JP58170249 A JP 58170249A JP 17024983 A JP17024983 A JP 17024983A JP S6061830 A JPS6061830 A JP S6061830A
- Authority
- JP
- Japan
- Prior art keywords
- data
- pointer
- printer
- immediate
- command
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- Printers Characterized By Their Purpose (AREA)
Abstract
Description
【発明の詳細な説明】
〔発明の技術分野〕
本発明は、プリンタ制御方式に関し、特にプリンタに与
えられる順次コマンドおよび即時コマンドを統一的に取
扱って処理するコマンド処理制御方式に関する。DETAILED DESCRIPTION OF THE INVENTION [Technical Field of the Invention] The present invention relates to a printer control system, and more particularly to a command processing control system that integrally handles and processes sequential commands and immediate commands given to a printer.
ホストコントローラからプリンタへ与えられる印字デー
タには、印字すべき文字を示すデータの他に、各種の特
殊動作を実行させるコマンドデータがある。コマンドデ
ータには2梅類ちり、それぞれ順次コマンドと即時コマ
ンドと呼ばれる。The print data given from the host controller to the printer includes data indicating characters to be printed, as well as command data for executing various special operations. There are two kinds of command data, called sequential commands and immediate commands, respectively.
順次コマンドは、たとえばラインフィード(LF )、
キャリッジリターン(CR)などのようなものでアシ、
プリンタへ送られてくるデータ列の中での位置にしたが
って、順番通pに実行される。Sequential commands are, for example, line feed (LF),
Reeds with something like a carriage return (CR), etc.
They are executed in sequence p according to their position in the data string sent to the printer.
したがって、このコマンドは、それ以前に送られた印字
データの処理が終了するまでプリンタ内で待たされるた
め、印字データと同様に取扱うことができ、メモリのバ
ッファ領域に印字データととかニ一時保存される。Therefore, this command is made to wait in the printer until the processing of the previously sent print data is completed, so it can be handled in the same way as print data, and is temporarily stored in the buffer area of memory, such as print data. Ru.
他方、即時コマンドは、たとえば強制リセットコマンド
のESCAPEのようなものでアシ、このコマンドがプ
リンタへ送られると、即時に処理される。これは、プリ
ンタが現在実行しているデータの順位とは無関係に、す
なわち未処理データが残っていたとしても直ちに実行さ
れる。On the other hand, an immediate command is, for example, a forced reset command ESCAPE, which is processed immediately when it is sent to the printer. This is executed immediately regardless of the order of data currently being processed by the printer, ie, even if unprocessed data remains.
このように、順次コマンドと即時コマンドは。Thus, sequential commands and immediate commands.
プリンタにおける実行までの処理方法が基本的に異なる
ため、それぞれについてプリンタ内に異なるソフト、ハ
ード機構を用意する必要があシ、コスト高の一因となっ
ていた。Since the processing methods up to execution in the printer are fundamentally different, it is necessary to prepare different software and hardware mechanisms in the printer for each, which is a cause of high costs.
H1図は、従来のプリンタにおける制御部の一般的構成
を示す。図中、lはPORT(1)、2はMPU。Diagram H1 shows the general configuration of a control section in a conventional printer. In the figure, l is PORT (1) and 2 is MPU.
3はROM、tl−1:RAM、5はPORT(2)、
6はバス。3 is ROM, tl-1: RAM, 5 is PORT (2),
6 is a bus.
7は制御プログラム98は制御テーブル、□9ツバスタ
ック形式のバッファ、IQは作業領域を示す。Reference numeral 7 indicates a control program 98, a control table, □9 a buffer in the form of a tube stack, and IQ a work area.
第2図は、第1図に示すバッファ9)の詳細図である。FIG. 2 is a detailed diagram of the buffer 9) shown in FIG. 1.
図中、11は次の新しいデータの格納位置を示す保存ポ
インタ、12は次に実行すべきデータの取シ出し位置を
示す実行ポインタ、13で示す斜線を付した領域は未処
理データを表わす。In the figure, 11 is a storage pointer indicating the storage position of the next new data, 12 is an execution pointer indicating the retrieval position of the next data to be executed, and the diagonally shaded area 13 represents unprocessed data.
各ポインタは、使用される度に値を1ずつ増されて更新
される。Each pointer is updated by increasing its value by one each time it is used.
第3図(→は、データ入力処理の制御フロー、同図(h
)は、実行処理の制御フローである。以下に。Figure 3 (→ is the control flow of data input processing, the figure (h
) is the control flow of execution processing. less than.
上記各図を参照して動作を説明する。The operation will be explained with reference to the above figures.
ホストコントローラよpプリンタへ送られた印字データ
は、PORT(1)に入力される。MPUは。Print data sent from the host controller to the printer is input to PORT (1). MPU is.
第3図(→に示すようにPORT(11の印字データを
読み取シ、それが文字データであるか否かを調べ。As shown in Figure 3 (→), read the print data of PORT (11) and check whether it is character data.
文字データである場合には、バッファ 9 の保存ポイ
ンタ11が示している位置に格納し、保存ポインタ11
の内容を+1する。If it is character data, it is stored in the position indicated by the save pointer 11 of the buffer 9, and
Add 1 to the content of
他方1文字データ以外の場合には、さらにそれが即時コ
マンドであるか否かを調べる。即時コマンドではない場
合、すなわち順次コマンドの場合には、先の文字データ
の場合と同様にバッファ内に格納する。On the other hand, if it is other than one-character data, it is further checked whether it is an immediate command. If it is not an immediate command, that is, if it is a sequential command, it is stored in a buffer as in the case of character data.
他方、即時コマ−ンドの場合には、即時コマンドの内容
を解析し、制御データを作成してF ORT(2)へ出
力する。P ORT(2)の制御データは、プリンタ機
構部の必要な駆動要素等に供給され、制御が実行される
。たとえばESCAPEコマンドの場合には。On the other hand, in the case of an immediate command, the content of the immediate command is analyzed, control data is created and output to FORT (2). The control data of PORT (2) is supplied to necessary drive elements of the printer mechanism section, and control is executed. For example, in the case of the ESCAPE command.
プリントヘッドのエスケープ(後退)動作が行なわれる
。A printhead escape operation is performed.
即時コマンドの実行終了後、あるいは即時コマンドがな
い場合には、バッファ9の実行ポインタ12が指す位置
のデータを順次読み出し、実行する。After the execution of the immediate command is completed, or if there is no immediate command, the data at the position pointed to by the execution pointer 12 in the buffer 9 is sequentially read out and executed.
第3図(h)に示すように、バッファ内の実行ポインタ
12によシ指される位置からデータを取シ出し、プリン
タ機構部に指示する制御データを作成する。これらはた
とえば文字データの場合、デージ−プリントホイール上
の活字選択のための制御データ、あるいは順次コマンド
のフオーム・フィード(FF)では9次の頁の先頭位置
までフィードするための制御データなどでおる。これら
の制御データはP ORT(2)を介してプリンタ機構
部へ出力し、しかる後に、実行ポインタ12を+1する
。As shown in FIG. 3(h), data is extracted from the position pointed to by the execution pointer 12 in the buffer, and control data for instructing the printer mechanism is created. For example, in the case of character data, these are control data for selecting type on the print wheel, or control data for feeding to the top position of the next page in the form feed (FF) of sequential commands. . These control data are output to the printer mechanism section via PORT(2), and then the execution pointer 12 is incremented by one.
以上のように、従来方式の場合、即時コマンドはバッフ
ァを経由せずに処理されるため、順次コマンドおよび文
字コマンドの処理とは全く異なるプログラムを用意する
必要がある。As described above, in the case of the conventional method, since immediate commands are processed without going through a buffer, it is necessary to prepare a completely different program from that for processing sequential commands and character commands.
本発明の目的は、プリンタに与えられる印字データ中の
順次コマンドおよび文字データと即時コマンドとを、で
きる限シ共通のソフトおよびハード機構で統一的に取シ
扱えるようにすることにあシ、そのため単一のバッファ
に順次コマンド、文字データ、即時コマンドを全て格納
し、しかも即時コマンドについては自動的に最先にバッ
ファから取シ出すことを可能にする手段を提供すること
にある。An object of the present invention is to make it possible to handle sequential commands, character data, and immediate commands in print data given to a printer in a unified manner using common software and hardware mechanisms to the extent possible. To provide a means for sequentially storing commands, character data, and immediate commands in a single buffer, and automatically taking out immediate commands from the buffer first.
本発明の構成は、それにより、受信した順番にしたがっ
て実行することが必要な順次コマンドおよび文字データ
と、受信時直ちに実行することが必要な即時コマンドと
からなる印字データにしたがって動作するプリンタにお
いて、印字データ中の即時コマンドを識別する手段と、
バッファ手段と2次のデータ格納位置を示す保存ポイン
タ手段と次の実行データ位置を示す実行ポインタ手段と
。The configuration of the present invention is such that, in a printer that operates according to print data consisting of sequential commands and character data that need to be executed in the order in which they are received, and immediate commands that need to be executed immediately upon reception, means for identifying immediate commands in print data;
A buffer means, a storage pointer means indicating a secondary data storage position, and an execution pointer means indicating a next execution data position.
上記即時コマンド識別手段が印字データ中の即時コマン
ドを識別したとき、実行ポインタ手段の示す格納位置を
後退させ、後退させた実行ポインタの示す格納位置に即
時コマンドを格納する手段とを備本即時コマンドは実行
ポインタが示すバッファ手段の格納位置から取シ出して
印字制御することを特徴としている。When the immediate command identifying means identifies an immediate command in the print data, means for retracting the storage position indicated by the execution pointer means and storing the immediate command at the storage position indicated by the retracted execution pointer; is characterized in that printing is controlled by taking out a file from the storage position of the buffer means indicated by the execution pointer.
以下に2本発明の詳細を実施例にしたがって説明する。 The details of the present invention will be explained below based on two examples.
はじめに、第4図を用いて本発明の基本構成を説明する
。第4図は本発明におけるバッファの制御機構を機能的
に示したもので、第2図の従来方式のものに対比的に示
しである。図中、9はバッファ、11は保存ポインタ、
12は実行ポインタ。First, the basic configuration of the present invention will be explained using FIG. 4. FIG. 4 functionally shows the buffer control mechanism of the present invention, in contrast to the conventional system shown in FIG. In the figure, 9 is a buffer, 11 is a save pointer,
12 is an execution pointer.
13は未処理データ、14および15は+1加算器、1
6は一1減算器、17はスイッチでちる。13 is unprocessed data, 14 and 15 are +1 adders, 1
6 is a 11 subtractor, and 17 is a switch.
なお、これらの各要素はソフト上で実現されてもよい。Note that each of these elements may be realized on software.
第2図に示す従来のバッファでは、データの格納位置が
保存ポインタ11の示す位置に定められておシ、スタッ
ク形式のバッファの構造上、未処理データ13がある限
シ、格納したばかりのデータを、実行ポインタ12によ
シ直ちに取り出すことはできない。本発明では、そのた
め、即時コマンドが検出されたとき、これを実行ポイン
タ12が指している位置の1つ手前の位置、すなわち直
前に実行を終了したデータ位置に格納する。In the conventional buffer shown in FIG. 2, the data storage position is determined at the position indicated by the storage pointer 11. Due to the structure of the stack-type buffer, as long as there is unprocessed data 13, the data is stored at the position indicated by the storage pointer 11. cannot be retrieved immediately by the execution pointer 12. Therefore, in the present invention, when an immediate command is detected, it is stored at the position one position before the position pointed to by the execution pointer 12, that is, at the data position where execution ended immediately before.
=1減算器16およびスイッチ17は、実行ポインタ1
2の位置を、即時コマンド検出時に1位置だけ後退させ
るために使用される。=1 subtractor 16 and switch 17 set execution pointer 1
Used to retract the position of 2 by one position upon detection of an immediate command.
他方、順次コマンドあるいは文字データが検出された場
合には、第2図の従来方式と同様に、これらを保存ポイ
ンタ11が示す位置に格納する。On the other hand, if sequential commands or character data are detected, they are stored at the location indicated by the storage pointer 11, similar to the conventional method shown in FIG.
次に実行するデータは、実行ポインタ12の示す位置よ
シ取シ出される。先に即時コマンドが格納された場合に
は、必ず実行ポインタ12の指す位置に即時コマンドが
置かれているため、即時処理が可能となる。これに対し
て1図示の順次コマンドの場合には、未処理データ13
が全て実行終了した後、すなわち順番にしたがって取シ
出され。The data to be executed next is retrieved at the position indicated by the execution pointer 12. If an immediate command is stored first, the immediate command is always placed at the position pointed to by the execution pointer 12, so immediate processing becomes possible. On the other hand, in the case of the sequential command shown in Figure 1, the unprocessed data 13
After all have finished executing, that is, they are taken out in order.
実行される。executed.
第5図(α)、 (A)は1本発明の1実施例における
制御フローであシ、第3図(α)、 (h)に示した従
来方式の制御フローを改良したものである。第5図(→
における*印のステップが2本発明によシ変更されたと
ころであシ、その内容は、第4図において説明したもの
と同じである。FIGS. 5(α) and (A) are control flows in one embodiment of the present invention, which are improved versions of the conventional control flows shown in FIGS. 3(α) and (h). Figure 5 (→
Two of the steps marked with * have been changed according to the present invention, and the contents thereof are the same as those explained in FIG. 4.
第6図は、即時コマンド処理の1実施例として強制リセ
ットコマンド(ESCA、PE)のバッファへの格納か
ら実行までの制御フローを示したものである。この即時
コマンドは。FIG. 6 shows a control flow from storing a forced reset command (ESCA, PE) in a buffer to executing it as an example of immediate command processing. This immediate command is.
ESC・SUB@I (I:1.2.3)の形式をとシ
、’ESC″、−8UB″、゛工″ それぞれのコード
について1バイトずつ1合計3バイトで構成される。Using the format of ESC・SUB@I (I:1.2.3), it consists of 1 byte for each of the codes 'ESC'', -8UB'', and ``work'', making up a total of 3 bytes.
P ORT(1)から3バイト中の各バイトを順次1バ
イトずつ読み出す制御のために、−ESCモードフラグ
およびgsc −SUBモードフラグを用意しく図示せ
ず)、まずESCコードを検出したとき前者のフラグを
ONにセットし、続いてSUBコードを検出したとき後
者のフラグをONにセットし。In order to control sequentially reading out each byte of the 3 bytes from PORT(1), the -ESC mode flag and gsc -SUB mode flag (not shown for convenience), first, when an ESC code is detected, the former Set the flag to ON, and then set the latter flag to ON when the SUB code is detected.
ESC−SUBモードを確認して、さらに■コードを検
出したときに、実行ポインタを−1したノくツファ位置
に、 ESC−SUB・工を1バイトの内部コマンドに
変換して格納する。Confirm the ESC-SUB mode, and when the code is detected, convert the ESC-SUB into a 1-byte internal command and store it at the location where the execution pointer is subtracted by 1.
通常の文字データは■→■→■のルートで処理され、E
SCコードは■→■→■、SUBコードは■→■→■→
■、そしてIコードは■→■→■→■のルートで処理さ
れる。Normal character data is processed by the route ■→■→■, and E
SC code is ■→■→■, SUB code is ■→■→■→
■, and the I code is processed through the route ■→■→■→■.
以上のように2本発明によれば、プリンタのソフトおよ
びノ・−ド機構を従来方式にくらべて簡単化することが
でき、コストの低減が可能となる。As described above, according to the present invention, the software and node mechanism of the printer can be simplified compared to the conventional system, and costs can be reduced.
また特にプリンタのソフトが必要とするメモリ容量を減
少させることができる。In particular, the memory capacity required by printer software can be reduced.
第1図はプリンタ制御部の一般的構成を示すブロック図
、第2図はバッファ構成を示す図、第3図(α)、 (
h)は従来方式による印字データ処理の制御フロー図、
第4図は本発明の基本構成図、第5図(→、(b)は本
発明方式による印字データ処理の制御フロー図、第6図
は即時コマンドの処理の1実施例の制御フロー図である
。
図中、9はバッファ、11は保存ポインタ。
12は実行ポインタ、13は未処理データ、14および
15は+1加算器、16は一1減算器。
17はスイッチを表わす。
特許出願人 富士通株式会社
代理人弁理士 長谷用 文 廣(外1名)才1121
才4図
(0)
(b”1Figure 1 is a block diagram showing the general configuration of the printer control section, Figure 2 is a diagram showing the buffer configuration, Figure 3 (α),
h) is a control flow diagram of print data processing using the conventional method;
Figure 4 is a basic configuration diagram of the present invention, Figure 5 (→, (b) is a control flow diagram of print data processing according to the method of the present invention, and Figure 6 is a control flow diagram of one embodiment of immediate command processing. In the figure, 9 is a buffer, 11 is a storage pointer, 12 is an execution pointer, 13 is unprocessed data, 14 and 15 are +1 adders, 16 is a -1 subtracter, and 17 represents a switch. Patent applicant: Fujitsu Agent Patent Attorney Co., Ltd. Hiroshi Fumi Hase (1 other person) Age: 1121 Age: 4 (0) (b”1
Claims (1)
マンドおよび文字データと、受信時直ちに実行すること
が必要な即時コマンドとからなる印字データにしたがっ
て動作するブリーンタにおいて、印字データ中の即時コ
マンドを識別する手段と、印字゛データを格納するバッ
ファ手段と9次の受信データの格納位置を示す保存ポイ
ンタ手段と次に実行するデータの位置を示す実行ポイン
タ手段と、上記即時コマンド識別手段が印字データ中の
即時コマンドを識別したとき、実行ポインタ手段の示す
格納位置を後退させ、後退させた実行ポインタの示す格
納位置に即時コマンドを格納する手段とを備え、即時コ
マンドは実行ポインタが示すバッファ手段の格納位置か
ら取シ出し印字を制御することを特徴とするプリンタ制
御方式。Identifying immediate commands in print data in a bleinter that operates according to print data consisting of sequential commands and character data that need to be executed in the order in which they are received, and immediate commands that need to be executed immediately upon reception. means, a buffer means for storing print data, a storage pointer means for indicating the storage position of the ninth received data, an execution pointer means for indicating the position of the data to be executed next, and an immediate command identification means for detecting the data in the print data. means for retracting the storage position indicated by the execution pointer means and storing the immediate command at the storage position indicated by the retracted execution pointer when the immediate command is identified; A printer control method characterized by controlling print out from the printer.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP58170249A JPS6061830A (en) | 1983-09-14 | 1983-09-14 | Printer control system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP58170249A JPS6061830A (en) | 1983-09-14 | 1983-09-14 | Printer control system |
Publications (1)
Publication Number | Publication Date |
---|---|
JPS6061830A true JPS6061830A (en) | 1985-04-09 |
Family
ID=15901435
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP58170249A Pending JPS6061830A (en) | 1983-09-14 | 1983-09-14 | Printer control system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPS6061830A (en) |
-
1983
- 1983-09-14 JP JP58170249A patent/JPS6061830A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP0077892B1 (en) | Word processing system having a formatting bidirectional printer | |
JP2615137B2 (en) | Printing device | |
EP0574824B1 (en) | Print data processing apparatus | |
US4996640A (en) | Data processing system | |
JPS6174063A (en) | data processing equipment | |
JPS6061830A (en) | Printer control system | |
JPS5846427A (en) | Document editing device | |
JPS6145325A (en) | Printer | |
GB2217491A (en) | Output apparatus | |
KR20010081226A (en) | Data store method for printer | |
JPH0418332B2 (en) | ||
JPH0474740B2 (en) | ||
JP2674887B2 (en) | Word processor | |
JPS60110033A (en) | display printing device | |
JPH07319745A (en) | File length reduction processor | |
JPH05193205A (en) | Printing control system | |
JPS6288025A (en) | Receiving buffer memory control system | |
JPH01189790A (en) | Character recognizing device | |
JPH03250363A (en) | Character output device | |
JPS61204734A (en) | Character processor | |
JPH05342207A (en) | Format specifying method for word processor | |
JPH06309315A (en) | Editing processor for text file | |
JPS63138417A (en) | Printer | |
JP2000215196A (en) | Document display system | |
JPH04188272A (en) | Document processor |