JPH08234939A - Printer device and its data managing method - Google Patents

Printer device and its data managing method

Info

Publication number
JPH08234939A
JPH08234939A JP7040111A JP4011195A JPH08234939A JP H08234939 A JPH08234939 A JP H08234939A JP 7040111 A JP7040111 A JP 7040111A JP 4011195 A JP4011195 A JP 4011195A JP H08234939 A JPH08234939 A JP H08234939A
Authority
JP
Japan
Prior art keywords
application
data
print command
executed
work area
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.)
Withdrawn
Application number
JP7040111A
Other languages
Japanese (ja)
Inventor
Atsuyuki Shoji
篤之 庄司
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP7040111A priority Critical patent/JPH08234939A/en
Publication of JPH08234939A publication Critical patent/JPH08234939A/en
Withdrawn legal-status Critical Current

Links

Abstract

PURPOSE: To provide the printer device and its data managing method which can efficiently compress data on a memory. CONSTITUTION: The printer device, which executes a printing process by switching applications according to a print command from an external equipment, stores plural application programs in a ROM 213 and arranges data used by corresponding applications in a RAM 213 successively according to the attributes of the data. Then it is decided whether or not the application indicated by the print command is currently executed; when the application is not being executed, the data in the work area corresponding to an application that is being executed at this time are compressed, and the process is moved to the application in instructed with the print command among the stored application programs to perform a printing process.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、外部機器よりの印刷コ
マンドを受信し、該印刷コマンドを解析して実行するア
プリケーションに切り換えて印刷する印刷装置及び該装
置におけるデータ管理方法に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a printing apparatus which receives a print command from an external device, analyzes the print command, switches to an application for execution, and prints, and a data management method in the apparatus.

【0002】[0002]

【従来の技術】近年、急速に普及してきたコンピュータ
機器に接続され、そのコンピュータ機器よりの印刷デー
タを受信して印刷する各種プリンタ装置が存在してい
る。これらプリンタ装置のうち、初期のプリンタ装置の
ように、文字コードを受信して一定サイズの文字のみを
印刷するプリンタ装置の場合には、プリンタ装置の主た
る機能は、その送られてきた文字コードを解釈して文字
パターンに展開するだけで十分であった。しかし、近年
のように、文字の書体やサイズを変更したり、イメージ
の印刷を行うのに伴い、プリンタ装置の機能に対する要
求が次第に複雑・多様化している。これに伴って、コン
ピュータ機器よりプリンタ装置に送られるコマンドや印
刷データ等が複雑になり、プリンタ装置では、これら種
々のコマンドが組込まれた印刷コマンドを入力し、それ
を解釈する必要が生じてきた。
2. Description of the Related Art In recent years, there are various types of printer devices which are connected to computer equipment which has been rapidly spread and which receive print data from the computer equipment and print it. Among these printer devices, in the case of a printer device that receives a character code and prints only characters of a certain size, like the initial printer device, the main function of the printer device is to change the sent character code. It was enough to interpret and expand it into a character pattern. However, as in recent years, as the typeface and size of characters are changed and images are printed, the demands on the functions of the printer device are becoming more and more complicated and diversified. Along with this, the commands and print data sent from the computer equipment to the printer become complicated, and it becomes necessary for the printer to input print commands incorporating these various commands and interpret them. .

【0003】しかし、プリンタ装置で使用されるコマン
ド体系は、そのメーカ、機器別に独自に開発されている
ため、相互に互換性がないのが現状である。またコンピ
ュータ機器(ホスト)のソフトウェアも、このような複
数の印刷コマンドセットに対応しているが、全ての印刷
コマンドセットに対応できるわけではない。そこでプリ
ンタ装置においても、複数の印刷コマンドセットを組み
込み、どのようなコンピュータ機器からでも印刷出力が
できるように対応する必要が生じている。
However, since the command system used in the printer device is originally developed for each maker and device, it is the current situation that they are not compatible with each other. Further, the software of the computer device (host) also supports such a plurality of print command sets, but not all print command sets. Therefore, it is necessary to incorporate a plurality of print command sets in the printer device so that any computer device can perform print output.

【0004】また一般に、プリンタ装置は、複数のコン
ピュータ機器から印刷コマンドを供給されることが多い
ため、それぞれの印刷コマンドを解釈するアプリケーシ
ョンを、プリンタ装置を再起動することなく立ち上げら
れなければ、操作性が極めて悪いものとなる。なぜなら
ば、アプリケーションの起動時には、時間をかけて作業
領域に文字情報などを展開するため、そのアプリケーシ
ョンの切り換えに多くの時間を要する。このようにプリ
ンタ装置は、複数のアプリケーションを瞬時に切り換え
られなければならない。
In general, a printer device is often supplied with print commands from a plurality of computer devices. Therefore, unless an application interpreting each print command can be started up without restarting the printer device, The operability will be extremely poor. This is because when the application is started, it takes a long time to expand the character information and the like in the work area, so that it takes a lot of time to switch the application. Thus, the printer device must be able to switch between a plurality of applications in an instant.

【0005】プリンタ装置の制御部で、独立したメモリ
等の資源をそれぞれのアプリケーションに割り当てられ
れば、プリンタ装置を再起動することなくアプリケーシ
ョンを容易に瞬時に切り換えることができるが、それで
は単独のアプリケーションが動作するプリンタ装置の複
数台分のメモリ等の資源が必要となり、コスト的に現実
的でない。
If the control unit of the printer apparatus can allocate resources such as independent memories to the respective applications, the applications can be easily and instantly switched without restarting the printer apparatus. Resources such as memories for a plurality of operating printer devices are required, which is not practical in terms of cost.

【0006】[0006]

【発明が解決しようとする課題】そこで、メモリ上のア
プリケーションの作業領域を一時退避させ、メモリを異
なったアプリケーション間で共有する技術が必要とな
る。コンピュータ機器などでは、RAM上の作業領域を
一時的にハードディスク等の二次記憶領域に退避させた
後、他のアプリケーションを立ち上げることにより、ア
プリケーションの切換えを高速に行うことが可能である
が、プリンタ装置の場合は、コストの点からこのような
二次記憶装置を備えることは難しい。
Therefore, a technique for temporarily saving the work area of the application on the memory and sharing the memory between different applications is required. In computer equipment and the like, it is possible to switch applications at high speed by temporarily saving the work area on RAM to a secondary storage area such as a hard disk and then launching other applications. In the case of a printer device, it is difficult to provide such a secondary storage device in terms of cost.

【0007】本発明は上記従来例に鑑みてなされたもの
で、メモリ上のデータを効率良く圧縮できる印刷装置及
び該装置におけるデータ管理方法を提供することことを
目的とする。
The present invention has been made in view of the above-mentioned conventional example, and an object of the present invention is to provide a printing apparatus and a data management method in the apparatus which can efficiently compress data on a memory.

【0008】また本発明の目的は、外部機器よりの印刷
コマンドに応じて、印刷装置内で実行するアプリケーシ
ョンを高速に切り換えて印刷を行うことができる印刷装
置及び該装置におけるデータ管理方法を提供することに
ある。
Another object of the present invention is to provide a printing apparatus and a data management method in the printing apparatus, which can perform printing by switching applications executed in the printing apparatus at high speed in response to a print command from an external device. Especially.

【0009】また本発明の他の目的は、データを効率良
く圧縮して、アプリケーションを実行するためのワーク
エリアを十分に確保できるようにした印刷装置及び該装
置におけるデータ管理方法に関するものである。
Another object of the present invention relates to a printing apparatus and a data management method in the apparatus, which are capable of efficiently compressing data and ensuring a sufficient work area for executing an application.

【0010】[0010]

【課題を解決するための手段】上記目的を達成するため
に本発明の印刷装置は以下のような構成を備える。即
ち、外部機器よりの印刷コマンドに応じてアプリケーシ
ョンを切り換えて印刷処理を実行する印刷装置であっ
て、複数のアプリケーション・プログラムを記憶する記
憶手段と、前記複数のアプリケーション・プログラムの
それぞれに対応して設けられ、対応するアプリケーショ
ンで使用されるデータの属性に応じて連続してデータを
配置するワークエリアと、前記記憶手段に記憶されてい
るアプリケーション・プログラムのうち、前記印刷コマ
ンドにより指示されたアプリケーションに処理を移行す
る制御手段と、前記制御手段によるアプリケーションの
移行に際して、前記ワークエリアのデータを圧縮する圧
縮手段とを有する。
In order to achieve the above object, the printing apparatus of the present invention has the following configuration. That is, a printing apparatus that executes a printing process by switching an application in accordance with a print command from an external device, and corresponds to each of the storage means for storing a plurality of application programs and each of the plurality of application programs. A work area for continuously arranging data according to the attribute of data used in a corresponding application and an application program stored in the storage means, which is designated by an application designated by the print command. It has a control means for migrating the processing and a compression means for compressing the data in the work area when the application is migrated by the control means.

【0011】上記目的を達成するために本発明の印刷装
置におけるデータ管理方法は以下のような工程を備え
る。即ち、外部機器よりの印刷コマンドに応じてアプリ
ケーションを切り換えて印刷処理を実行する印刷装置に
おけるデータ管理方法であって、実行中のアプリケーシ
ョンにより使用されるデータを、その属性に応じて連続
してメモリに配置する工程と、印刷コマンドにより指示
されたアプリケーションに移行する際、その時点で実行
中のアプリケーションに対応する前記メモリのデータを
圧縮する圧縮工程とを有する。
In order to achieve the above object, the data management method in the printing apparatus of the present invention comprises the following steps. That is, it is a data management method in a printing apparatus that executes a printing process by switching an application according to a print command from an external device. Data used by an application being executed is continuously stored in a memory according to its attribute. And a compression step of compressing the data in the memory corresponding to the application being executed at the time of shifting to the application instructed by the print command.

【0012】[0012]

【作用】以上の構成において、複数のアプリケーション
・プログラムを記憶手段に記憶しておき、これら複数の
アプリケーション・プログラムのそれぞれに対応して設
けられ、対応するアプリケーションで使用されるデータ
の属性に応じて連続してデータをワークエリアに記憶す
る。記憶手段に記憶されている複数のアプリケーション
・プログラムのうち、その受信した印刷コマンドにより
指示されたアプリケーションに処理を移行する際、ワー
クエリアに記憶されているデータを圧縮するように動作
する。
In the above structure, a plurality of application programs are stored in the storage means and provided corresponding to each of the plurality of application programs, according to the attribute of the data used by the corresponding application. Data is continuously stored in the work area. Among the plurality of application programs stored in the storage means, when the processing is transferred to the application instructed by the received print command, the data stored in the work area is compressed.

【0013】また本発明のデータ管理方法によれば、実
行中のアプリケーションにより使用されるデータを、そ
の属性に応じて連続してメモリに配置し、その印刷コマ
ンドにより指示されたアプリケーションに移行する際、
その時点で実行中のアプリケーションに対応するメモリ
のデータを圧縮する。
Further, according to the data management method of the present invention, when data used by an application being executed is continuously arranged in a memory according to its attribute, and is transferred to the application instructed by the print command. ,
Compress the data in memory that corresponds to the application that is currently running.

【0014】[0014]

【実施例】以下、添付図面を参照して本発明の好適な実
施例を詳細に説明する前に、本発明の一実施例の処理の
概要を簡単に説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Before describing the preferred embodiments of the present invention in detail with reference to the accompanying drawings, an outline of the processing of one embodiment of the present invention will be briefly described below.

【0015】データを圧縮する場合、圧縮の対象になる
データが全くランダムに並んでいる場合と比較して、相
関の高いデータが連続して並んでいる法が高い圧縮効率
が期待できる。一般的には、RAMの作業領域には、ソ
フトウェアにより使用される様々なデータ形式のデータ
が無秩序に混在している。これをデータのタイプ毎に文
字列形式、整数、アドレス情報等に分離して、同じデー
タ属性のデータを同じ領域に連続して並べる。例えば文
字列情報を集めた場合、英語テキストならば、その文字
コードは“127”(07FH:Hは16進数)未満の
値をとる頻度が高く、文字の並びの相関も高いものとな
る。また、日本語JISコードの場合にも同様に、上位
バイト、下位バイトとも“0”〜“255”の範囲内で
まんべんなくコードが分散しておらず、ある範囲内の値
しか取り得ないため、その文字コードの圧縮効果が期待
できる。また、アドレス情報は、例えばアドレスの内部
表現が32ビット長であって、実装されているメモリが
16Mバイト(=2の24乗)の場合、連続アドレスで
あれば最上位バイトは常に一定値であることが期待で
き、同じ値が周期的に発生することが期待できる。この
ような場合は、高い圧縮効果が期待できる。
In the case of compressing data, a method in which highly correlated data are continuously arranged can be expected to have high compression efficiency, as compared with the case where the data to be compressed are arranged at random. Generally, in the work area of the RAM, various data formats used by software are randomly mixed. This is separated into a character string format, an integer, address information, etc. for each data type, and data having the same data attribute is continuously arranged in the same area. For example, when the character string information is collected, if it is an English text, the character code thereof often takes a value less than "127" (07FH: H is a hexadecimal number), and the correlation of the character arrangement is also high. Similarly, in the case of the Japanese JIS code, the codes are not evenly distributed within the range of "0" to "255" for both the upper byte and the lower byte, and only a value within a certain range can be taken. A character code compression effect can be expected. Further, the address information is, for example, when the internal representation of the address is 32 bits long and the installed memory is 16 Mbytes (= 2 to the 24th power), the most significant byte is always a constant value if it is a continuous address. It can be expected that the same value will occur periodically. In such a case, a high compression effect can be expected.

【0016】図6は、データ属性に対応した各バイトご
とのデータ出現確率を示す図で、縦軸は出現確率を示
し、横軸はバイト値を示している。尚、これら図6
(a)〜(f)において、縦軸のスケールは同じではな
い。ここで、出現確率が一様である程、圧縮効率が期待
できないと考えられる。
FIG. 6 is a diagram showing the data appearance probability for each byte corresponding to the data attribute. The vertical axis shows the appearance probability and the horizontal axis shows the byte value. In addition, these FIG.
In (a) to (f), the vertical scales are not the same. Here, it is considered that the more efficient the appearance probability is, the less expected the compression efficiency is.

【0017】図6(a)はJISコードの各バイトの値
の出現確率を示す図である。JISコードの下位バイト
は、16進数で“21H”〜“07EH”(Hは16進
数を表す)の範囲に限定して分布し、上位バイトも“2
1H”〜“74H”までで、かつ上位バイトの値が“5
0H”以上は、第2水準の漢字に相当しているため、そ
の出現頻度が低くなっている。また、該当するJISコ
ードが存在しない空き領域もあるので、このような分布
となる。
FIG. 6A is a diagram showing the appearance probability of the value of each byte of the JIS code. The lower byte of the JIS code is limited to the range of "21H" to "07EH" (H represents a hexadecimal number) in hexadecimal number, and the upper byte is also "2".
1H "to" 74H "and the value of the upper byte is" 5 "
Since 0H "or more corresponds to the second-level Chinese character, its appearance frequency is low. Also, since there is an empty area in which the corresponding JIS code does not exist, such a distribution is obtained.

【0018】図6(b)は、16ビット、32ビット整
数の各バイトの値の出現確率を示す図である。一般的な
整数であるため、その出現頻度にほとんど差が認められ
ない。しかし実際には、プログラムの性質に応じて出現
頻度に差が生じると考えられる。また、16ビットデー
タが上詰めで格納されず、32ビットワードとして配置
されている場合には、データによっては上位バイトの空
き領域に格納されるデータの出現頻度が変化することも
考えられる。
FIG. 6B is a diagram showing the appearance probability of the value of each byte of 16-bit and 32-bit integers. Since it is a general integer, there is almost no difference in its appearance frequency. However, in reality, it is considered that the frequency of appearance varies depending on the nature of the program. Further, when 16-bit data is not stored in a top-justified manner and is arranged as a 32-bit word, the appearance frequency of the data stored in the empty area of the upper byte may change depending on the data.

【0019】図6(c)はアドレス情報の最上位バイト
の値の出現確率を示している。ただし、本実施例の後述
する図2のようなメモリマップの場合の分布である。
FIG. 6C shows the appearance probability of the value of the most significant byte of the address information. However, the distribution is in the case of a memory map as shown in FIG.

【0020】図6(d)はアドレス情報の次位バイトの
出現確率を示している。
FIG. 6D shows the appearance probability of the next byte of the address information.

【0021】図6(e)はアドレス情報の第3位のバイ
ト値の出現確率を示している。
FIG. 6E shows the appearance probability of the third byte value of the address information.

【0022】図6(f)はアドレス情報の最下位のバイ
ト値の出現確率を示している。この最下位バイトでは、
32ビット単位のデータが多いので数値が4毎に周期的
に変動する。尚、これらの図において、正確に図示しき
れないので、周期、間隔は正確ではない。
FIG. 6 (f) shows the appearance probability of the lowest byte value of the address information. In this least significant byte,
Since there are many 32-bit units of data, the numerical value fluctuates periodically every 4. In these figures, the period and the interval are not accurate because they cannot be shown accurately.

【0023】このように本実施例は、データの種類に応
じて、その数値分布(出現確率)が異なっているので、
それらデータをその属性毎に分離し、それらデータの出
現確率を利用してデータを圧縮することにより、より効
率良くデータを圧縮することを目的とする。
As described above, according to this embodiment, the numerical distribution (probability of occurrence) differs depending on the type of data.
The purpose of the present invention is to compress the data more efficiently by separating the data for each attribute and compressing the data using the appearance probability of the data.

【0024】以下、本発明の一実施例を詳細に説明す
る。
An embodiment of the present invention will be described in detail below.

【0025】図2は、本実施例のプリンタ装置200の
構成を示すブロック図である。
FIG. 2 is a block diagram showing the arrangement of the printer device 200 of this embodiment.

【0026】201はホストコンピュータで、実施例の
プリンタ装置200にページ記述言語等で記述された印
刷コマンドや各種データを送出して印刷を実行させてい
る。210は入出力部で、ホストコンピュータ201と
プリンタ装置200との間のデータの送受信を制御して
いる。この入出力部210は、例えばホストコンピュー
タ201より送信される、ポストスクリプトやページ記
述言語等の印刷コマンドに応じたインターフェース部を
有していても良い。211はCPUで、実施例のプリン
タ装置200全体の動作を制御している。212は主メ
モリのRAM部分、213はそのROM部分で、そのデ
ータ構成は後述の図1を参照して説明する。214はエ
ンジン部で、例えばレーザビームプリント法、インクジ
ェット法、サーマルプリント法或は熱転写法などによ
り、CPU211より送られる印刷イメージに応じて記
録紙等の記録媒体に画像を印刷している。
Reference numeral 201 denotes a host computer, which sends print commands and various data described in a page description language to the printer apparatus 200 of the embodiment to execute printing. An input / output unit 210 controls transmission / reception of data between the host computer 201 and the printer device 200. The input / output unit 210 may have an interface unit according to a print command such as Postscript or page description language transmitted from the host computer 201. Reference numeral 211 denotes a CPU, which controls the overall operation of the printer device 200 of the embodiment. Reference numeral 212 is a RAM portion of the main memory, and 213 is a ROM portion thereof, the data structure of which will be described later with reference to FIG. An engine unit 214 prints an image on a recording medium such as a recording sheet according to a print image sent from the CPU 211 by, for example, a laser beam printing method, an inkjet method, a thermal printing method, or a thermal transfer method.

【0027】以上の構成において、ROM213部分に
は、ホストコンピュータ201より受信した印刷コマン
ドに応じて実行される各アプリケーション・プログラム
及びフォントデータや各種データが記憶されている。C
PU211は、ホストコンピュータ201より受信した
印刷コマンドに応じて実行するアプリケーションを選択
し、そのアプリケーションを使用して、その印刷コマン
ドの解析、イメージへの展開などを実行している。また
RAM212には、各アプリケーションの実行に応じて
使用される作業領域(ワークエリア)が設けられてお
り、CPU211は、そのアプリケーションの切換えに
応じて使用するワークエリアを変更している。そのアプ
リケーションの切換えの際、使用しないアプリケーショ
ンのワークエリアのデータを圧縮することにより、自由
に使用できるRAM212のワークエリアのメモリ空間
を増やして、そのアプリケーションの実行を、より容易
にしている。
In the above configuration, the ROM 213 portion stores each application program executed in response to the print command received from the host computer 201, font data, and various data. C
The PU 211 selects an application to be executed according to the print command received from the host computer 201, and uses the application to analyze the print command, develop the image into an image, and the like. Further, the RAM 212 is provided with a work area (work area) used according to the execution of each application, and the CPU 211 changes the work area used according to the switching of the application. By compressing the data in the work area of an unused application when switching the application, the memory space of the work area of the RAM 212 that can be used freely is increased, and the execution of the application is made easier.

【0028】図1は、複数のアプリケーションを切り換
えて、ホストコンピュータ201から受け取った異なる
コード体系のデータを印刷出力するプリンタ装置200
におけるRAM212及びROM213のメモリマップ
例を示す図である。
FIG. 1 shows a printer device 200 which switches a plurality of applications and prints out data of different code systems received from a host computer 201.
3 is a diagram showing an example of a memory map of a RAM 212 and a ROM 213 in FIG.

【0029】このメモリマップは、RAM212のデー
タ圧縮を全く行なうことなく、複数のアプリケーション
のワークエリアをメモリに常駐させる場合で示してい
る。各アプリケーションの作業エリアのうち、ページメ
モリ、受信データのバッファリング、処理途中の中間デ
ータの格納エリア等は共通に使用されるためRAM21
2上にとられ、アプリケーションの内部設定等を記憶す
るエリアは個別に設けられている。
This memory map shows the case where work areas of a plurality of applications are made resident in the memory without performing data compression of the RAM 212 at all. Of the work areas of each application, the page memory, the buffering of received data, the storage area of intermediate data during processing, and the like are commonly used, so that the RAM 21 is used.
The area for storing the internal settings of the application, etc. is provided separately.

【0030】図1において、213はROMエリアで、
8Mバイトのメモリ空間を有している。100がアプリ
ケーションAのコード領域(プログラム領域)、101
がアプリケーションBのコード領域、そして102がア
プリケーションCのコード領域である。103は、フォ
ントデータの格納領域である。104は、アプリケーシ
ョンに依存しない共通コード領域である。
In FIG. 1, 213 is a ROM area,
It has a memory space of 8 Mbytes. 100 is the code area (program area) of application A, 101
Is the code area of application B, and 102 is the code area of application C. Reference numeral 103 denotes a font data storage area. A common code area 104 does not depend on the application.

【0031】RAM212の構成を説明すると、2はペ
ージメモリのイメージ展開領域を示し、3はフリーエリ
アで、受信データのバッファリング、中間データの格納
等に使用される。イメージ展開領域2及びフリーエリア
3は、各アプリケーション間で共有して使用されるが、
異なったアプリケーションが起動される毎に初期化され
る。一般に、フリーエリア3のメモリ空間が広い程、よ
り多くのデータをバッファリングできる。これにより、
ホストコンピュータ201を速、よりく印刷データの転
送処理より解放することができたり、より多くのフォン
トデータをキャッシングして、印刷出力を高速化でき
る。
Explaining the structure of the RAM 212, 2 is an image development area of the page memory, and 3 is a free area used for buffering received data, storing intermediate data, and the like. The image development area 2 and the free area 3 are commonly used by each application,
It is initialized each time a different application is started. In general, the larger the memory space of the free area 3, the more data can be buffered. This allows
The host computer 201 can be released more quickly than the print data transfer process, and more font data can be cached to speed up print output.

【0032】また、11はアプリケーションAの作業領
域(ワークエリア)、12はアプリケーションBの作業
領域、そして13はアプリケーションCの作業領域を示
している。図1ではこれらアプリケーションの作業領域
11〜13のメモリ空間のトータルエリアは、RAMエ
リア全体の6Mバイト(600000H番地)のうち約
2.2Mバイト(約200000H)となっている。ま
た、フリーエリア3のメモリ空間は300Kバイト程度
である。
Reference numeral 11 indicates a work area of the application A (work area), 12 indicates a work area of the application B, and 13 indicates a work area of the application C. In FIG. 1, the total area of the memory space of the work areas 11 to 13 of these applications is about 2.2 Mbytes (about 200,000 H) out of 6 Mbytes (address 600,000 H) of the entire RAM area. The memory area of the free area 3 is about 300 Kbytes.

【0033】図3は、例えばアプリケーションCが起動
され、それ以外のアクティブでないアプリケーション
(アプリケーションA,B)のワークエリア11,12
が圧縮された状態におけるメモリマップの内容を示す図
である。
In FIG. 3, for example, the application C is activated, and the work areas 11 and 12 of the other inactive applications (applications A and B).
It is a figure which shows the content of the memory map in the state which was compressed.

【0034】ここではアプリケーションCのみがアクテ
ィブになっており、11−1,12−1のそれぞれは、
圧縮されたアプリケーションA、Bの作業領域を示して
おり、圧縮されていない状態(図1の作業領域11,1
2)のメモリ空間の3割程度にまで圧縮されている。
Here, only the application C is active, and each of 11-1 and 12-1 is
The work areas of the compressed applications A and B are shown, and they are in a non-compressed state (work areas 11 and 1 in FIG. 1).
It is compressed to about 30% of the memory space of 2).

【0035】図3に示すように、各アプリケーションの
作業領域11及び12が圧縮されることにより、図1の
場合に比べて、RAM212に少なくとも約1Mバイト
のワークエリアが確保されている。もしも、このメモリ
(RAM212)の最終アドレスが80600000H
番地で、RAM212のメモリ空間が6MBだった場合
には、図3に示す場合には、約1.3MBの自由に使用
できる余分のメモリエリアが確保できる。これにより、
自由に使用できるワークエリアが増えるため、そのアプ
リケーションCの実行時に、そのエリアをフォントキャ
ッシュエリアの拡大等に使用できるため、作業性の向上
が期待でき、印刷速度の向上が期待できる。
As shown in FIG. 3, by compressing the work areas 11 and 12 of each application, a work area of at least about 1 MB is secured in the RAM 212 as compared with the case of FIG. If the final address of this memory (RAM212) is 80600000H
If the memory space of the RAM 212 is 6 MB at the address, an extra memory area of about 1.3 MB that can be used freely can be secured in the case shown in FIG. This allows
Since the work area that can be freely used increases, the area can be used for expanding the font cache area when the application C is executed, so that the workability can be improved and the printing speed can be improved.

【0036】尚、本実施例では、図の簡易化のためにア
プリケーションが3つの場合で示しているが本発明はこ
れに限定されるものではない。また、実際には各アプリ
ケーション専用の作業領域はもっと狭いことが多いが、
その代わりアプリケーションの数は多くなり、図示した
程度の作業領域が必要となる。
In this embodiment, three applications are shown for simplification of the drawing, but the present invention is not limited to this. Also, in practice, the work area dedicated to each application is often smaller,
Instead, the number of applications is large and the work area as shown is required.

【0037】次に、このようなデータ圧縮を行う際、そ
のデータの属性に基づいて圧縮する方法を説明する。
Next, a method of compressing such data based on the attribute of the data will be described.

【0038】図4は、C言語等で作られたデータ構造を
説明する図で、図4(a)は、双方向リストと、データ
へのポインタ及びいくつかの整数や文字列等の定義例を
示している。ここでは、「data」はキャラクタタイ
プで、「count」は32ビット整数、「left」
及び「right」は、アドレスに定義されている。ま
た「flag」は16ビット整数として定義されてい
る。
FIG. 4 is a diagram for explaining a data structure created in C language or the like. FIG. 4A shows a bidirectional list, pointers to data, and some definition examples of integers and character strings. Is shown. Here, "data" is the character type, "count" is a 32-bit integer, and "left".
And "right" are defined in the address. Also, "flag" is defined as a 16-bit integer.

【0039】これらは処理系にも依存するが、例えばあ
る32ビットの処理系では、メモリ上では図3(b)に
示すように格納される。このままの配置では、「lef
t」と「right」は共にアドレスであるためデータ
の相関があるが、「data」と「count」間、
「count」と「flag」間、「flag」と「l
eft」間においては、データ同士に何の相関も存在し
ない。またこれらの前後の変数と、「data」や「r
ight」の属性が一致する可能性も低い。
Although these depend on the processing system, for example, in a certain 32-bit processing system, they are stored in the memory as shown in FIG. 3B. With this arrangement, "lev
Since both "t" and "right" are addresses, there is data correlation, but between "data" and "count",
Between "count" and "flag", "flag" and "l"
There is no correlation between the data in “eft”. In addition, the variables before and after these, "data" and "r
It is unlikely that the attributes of “light” match.

【0040】前述したように、データを圧縮する際、同
じ構造体のデータが連続して並んでいる場合は圧縮率が
高まり、より高い圧縮率が期待できるが、このように互
いに相関の無い配列の場合は、より高い圧縮効果は期待
できない。
As described above, when compressing data, if the data of the same structure are continuously arranged, the compression rate is increased, and a higher compression rate can be expected. In case of, higher compression effect cannot be expected.

【0041】従って本実施例では、こレラのデータをそ
れぞれの属性に分けて格納することにより、後段の圧縮
処理において、より圧縮効果を高めている。
Therefore, in the present embodiment, the compression effect is further enhanced in the subsequent compression process by storing the data of this leveler by dividing it into respective attributes.

【0042】即ち、図4(b)において、「dat
a」,「left」,「right」をいずれも32ビ
ットのアドレス情報として扱う。また「count」を
32ビットの整数、「flag」を16ビットの整数と
して、図4(c)のように同じ属性のデータを連続して
格納する。
That is, in FIG. 4B, "dat
"a", "left", and "right" are all treated as 32-bit address information. Further, as "count" is a 32-bit integer and "flag" is a 16-bit integer, data having the same attribute is continuously stored as shown in FIG. 4C.

【0043】本実施例の図1及び図3に示すようなメモ
リ上のデータ構成の場合、アドレス情報を16進数で表
示した場合、そのアドレスの取り得る範囲は、0000
0000H〜007f0000H、または800000
00H〜805fffffHの範囲に限定される。ま
た、自分の領域以外のアドレスを指すことはないので、
このアドレスの範囲はさらに限定される。この場合、最
上位バイトの値は“00”または“80”となり、次位
バイトの値は最上位バイトの値が“00”ならば“2
3”〜“7f”の値を取り得、“80”ならば“00”
〜“3c”の値を取り得る。
In the case of the data structure on the memory as shown in FIGS. 1 and 3 of the present embodiment, when the address information is displayed in hexadecimal, the possible range of the address is 0000.
0000H-007f0000H, or 800,000
It is limited to the range of 00H to 805fffffH. Also, since it does not point to an address other than your own area,
The range of this address is further limited. In this case, the value of the most significant byte is “00” or “80”, and the value of the next most significant byte is “2” if the value of the most significant byte is “00”.
Possible values are 3 "to" 7f ", and if" 80 "," 00 "
It can take a value of "3c".

【0044】このように本実施例によれば、このメモリ
空間をアクセスするアドレス値に高い相関が認められ
る。また最下位バイトは、文字列のポインタを除き、下
位2ビットは常に“0”(4バイト単位でアクセスす
る)であることから、このアドレスもまた高い圧縮効果
を期待できる。
As described above, according to this embodiment, a high correlation is recognized in the address values that access this memory space. Further, since the least significant byte is always "0" (accessed in 4-byte units) except for the character string pointer, this address can also be expected to have a high compression effect.

【0045】例えばLZW圧縮等において、アドレス情
報と他の情報がランダムに混在している場合と、アドレ
ス情報を分離した場合とで比較すると、そのアドレスを
分離した場合は、数パーセントの圧縮率の向上が見られ
る。
For example, in LZW compression or the like, when address information and other information are randomly mixed and when the address information is separated, when the address is separated, a compression ratio of several percent is obtained. There is an improvement.

【0046】以上の構成に基づく本実施例のプリンタ装
置200における処理を、図5のフローチャートを参照
して説明する。尚、この処理を実行する制御プログラム
は、ROM213の共通コードエリア104に記憶され
ている。
The processing in the printer apparatus 200 of the present embodiment based on the above configuration will be described with reference to the flowchart of FIG. The control program for executing this process is stored in the common code area 104 of the ROM 213.

【0047】図5のフローチャートで示す処理は装置の
電源が投入されることにより開始され、まずステップS
1で、全体の初期化設定を行なって各アプリケーション
のイニシャライズを行ない、ステップS2で、デフォル
トで設定されているアプリケーションをアクティブにし
て、ホストコンピュータ201よりの印刷データの受信
待ちに入る。
The process shown in the flow chart of FIG. 5 is started when the power of the apparatus is turned on, and first, step S
In step 1, the entire initialization setting is performed to initialize each application, and in step S2, the application set by default is activated to wait for reception of print data from the host computer 201.

【0048】ステップS3で、ホストコンピュータ20
1よりのデータを受信するとステップS4に進み、その
受信データ或は受信したインターフェースに応じて、実
行するアプリケーションを選択する。こうして選択され
たアプリケーションが現在アクティブなアプリケーショ
ンかどうかを判断し、そうであればステップS7に進
み、そのまま対応するアプリケーションのコード100
ないし102のいずれかの領域のプログラムに制御を移
行し、ホストコンピュータ201よりのデータを受信し
(ステップS7)、その印刷コマンドを解析して印刷イ
メージに展開して印刷を行なう(ステップS8)。こう
してステップS9で、ホストコンピュータ201より受
信した所定量の印刷(1つの印刷ジョブ)が終了すると
ステップS3に戻り、次の印刷コマンドの受信待ちに進
む。
In step S3, the host computer 20
When the data of 1 is received, the process proceeds to step S4, and the application to be executed is selected according to the received data or the received interface. It is determined whether the selected application is the currently active application, and if so, the process proceeds to step S7, and the code 100 of the corresponding application is directly used.
Control is transferred to the program in any one of the areas 1 to 102, data is received from the host computer 201 (step S7), the print command is analyzed, developed into a print image and printed (step S8). In this way, when the predetermined amount of printing (one print job) received from the host computer 201 is completed in step S9, the process returns to step S3 and waits for the next print command.

【0049】一方、ホストコンピュータ201より受信
した印刷コマンドにより選択されたアプリケーション
が、その時点で非アクティブであった場合にはステップ
S4よりステップS5に進み、その時点でアクティブで
あったアプリケーションの作業領域(ワークエリア)の
データを圧縮して退避する。そして、その印刷コマンド
により要求されたアプリケーションの作業領域を展開
し、該当アプリケーションに制御を移行する。次にステ
ップS6に進み、イメージ展開領域2、フリーエリア3
の共有データ領域を初期化する。こうして新たなアプリ
ケーションげ起動されると、ホストコンピュータより送
られてくる印刷データを受信して解釈し(ステップS
7)、印刷出力を行なう(ステップS8)。こうして、
そのアプリケーションに対応した印刷ジョブに対応する
印刷処理を終了するとステップS3に戻り、次の印刷コ
マンドの受信待ちに進む。
On the other hand, if the application selected by the print command received from the host computer 201 is inactive at that time, the process proceeds from step S4 to step S5, and the work area of the application that is active at that time. Data in (work area) is compressed and saved. Then, the work area of the application requested by the print command is expanded, and control is transferred to the corresponding application. Next, in step S6, the image development area 2 and the free area 3
Initialize the shared data area of. When a new application is started in this way, the print data sent from the host computer is received and interpreted (step S
7) The printout is performed (step S8). Thus
When the print process corresponding to the print job corresponding to the application is completed, the process returns to step S3 and waits for the next print command.

【0050】ここで、ステップS5において、RAM2
12の各アプリケーションのワークエリアでは、例えば
前述の図4に示すように、データの属性が一致するデー
タが連続して記憶されているので、よりデータの圧縮効
率を高めることができる。
Here, in step S5, the RAM 2
In the work areas 12 of the respective applications, for example, as shown in FIG. 4 described above, since the data having the same data attributes are continuously stored, the data compression efficiency can be further improved.

【0051】尚、本発明は、複数の機器から構成される
システムに適用しても1つの機器から成る装置に適用し
ても良い。また、本発明は、システム或は装置に本発明
を実施するプログラムを供給することによって達成され
る場合にも適用できる。
The present invention may be applied to a system composed of a plurality of devices or an apparatus composed of a single device. The present invention can also be applied to the case where it is achieved by supplying a program for implementing the present invention to a system or an apparatus.

【0052】以上説明したように本実施例によれば、複
数のアプリケーションを切り換えて使用するようなプリ
ンタ装置において、アクティブになっていないアプリケ
ーションの作業領域を圧縮する際に、本実施例のよう
に、属性が一致するデータ毎に連続してメモリに格納領
することにより、データの圧縮効率を高めて、より効率
的にメモリを使用することができる。
As described above, according to the present embodiment, when compressing the work area of an inactive application in a printer device that switches and uses a plurality of applications, it is possible to use By continuously storing in the memory for each data having the same attribute, the data compression efficiency can be improved and the memory can be used more efficiently.

【0053】[0053]

【発明の効果】以上説明したように本発明によれば、メ
モリ上のデータを効率良く圧縮できる効果がある。
As described above, according to the present invention, the data on the memory can be efficiently compressed.

【0054】また本発明によれば、外部機器よりの印刷
コマンドに応じて、印刷装置内で実行するアプリケーシ
ョンを高速に切り換えて印刷を行うことができる。
Further, according to the present invention, it is possible to perform printing by switching the applications executed in the printing device at high speed in response to a print command from an external device.

【0055】また本発明によれば、データを効率良く圧
縮して、アプリケーションを実行するためのワークエリ
アを十分に確保できる効果がある。
Further, according to the present invention, there is an effect that data can be efficiently compressed and a work area for executing an application can be sufficiently secured.

【0056】[0056]

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

【図1】本実施例のプリンタ装置において、データ圧縮
を行なわないときのメモリマップを示す図である。
FIG. 1 is a diagram showing a memory map when data compression is not performed in the printer apparatus of the present embodiment.

【図2】本実施例のプリンタ装置の概略構成を示すブロ
ック図である。
FIG. 2 is a block diagram showing a schematic configuration of a printer device of the present embodiment.

【図3】本実施例のプリンタ装置において、アクティブ
でないアプリケーションに関するデータを圧縮したとき
のメモリマップを示す図である。
FIG. 3 is a diagram showing a memory map when data relating to an inactive application is compressed in the printer device of the present embodiment.

【図4】C言語により規定されたデータのは一例を説明
するための図で、(a)はデータ構造を定義するC言語
の一例を示す図、(b)はC言語で規定されたデータ構
造がどのように配置されるかを示す図、(c)は本実施
例によりデータの属性に応じて分離されて配置されたデ
ータ配列を示す図である。
FIG. 4 is a diagram for explaining an example of data defined by C language, (a) is a diagram showing an example of C language defining a data structure, and (b) is data defined by C language. FIG. 3C is a diagram showing how the structures are arranged, and FIG. 6C is a diagram showing a data array separated and arranged according to the attribute of the data according to the present embodiment.

【図5】本実施例のプリンタ装置における処理を示すフ
ローチャートである。
FIG. 5 is a flowchart showing a process in the printer apparatus of this embodiment.

【図6】データに応じた出現確率を示す図で、(a)は
JISコードの各バイトの値の分布確率を示す図、
(b)は16ビット、32ビット整数の各バイトの値の
分布確率を示す図、(c)は、本実施例のアドレス情報
の最上位バイトの値の分布確率を示す図、(d)は本実
施例のアドレス情報の次位バイトの分布確率を示す図、
(e)は、本実施例のアドレス情報の第3位バイトの分
布確率を示す図、(f)はアドレス情報の最下位バイト
の値の分布確率を示す図である。
FIG. 6 is a diagram showing appearance probabilities according to data, FIG. 6A is a diagram showing distribution probabilities of values of each byte of JIS code,
(B) is a diagram showing a distribution probability of each byte value of 16-bit and 32-bit integers, (c) is a diagram showing a distribution probability of a value of the most significant byte of the address information of the present embodiment, and (d) is The figure which shows the distribution probability of the next byte of address information of a present Example,
(E) is a diagram showing the distribution probability of the third byte of the address information of this embodiment, and (f) is a diagram showing the distribution probability of the value of the least significant byte of the address information.

【符号の説明】[Explanation of symbols]

2 イメージ展開領域 3 フリーエリア 11 アプリケーションAの作業領域 12 アプリケーションBの作業領域 11−1 圧縮されたアプリケーションAの作業領域 12−1 圧縮されたアプリケーションBの作業領域 13 アプリケーションCの作業領域 20 アプリケーションに依存しない共通作業領域 100 アプリケーションAのコード領域 101 アプリケーションBのコード領域 102 アプリケーションCのコード領域 103 フォントデータ格納領域 104 共通コード領域 200 プリンタ装置 201 ホストコンピュータ 211 CPU 212 ROM 213 RAM 2 image development area 3 free area 11 work area of application A 12 work area of application B 11-1 work area of compressed application A 12-1 work area of compressed application B 13 work area of application C 20 application Common work area that does not depend on 100 Code area of application A 101 Code area of application B 102 Code area of application C 103 Font data storage area 104 Common code area 200 Printer device 201 Host computer 211 CPU 212 ROM 213 RAM

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 外部機器よりの印刷コマンドに応じてア
プリケーションを切り換えて印刷処理を実行する印刷装
置であって、 複数のアプリケーション・プログラムを記憶する記憶手
段と、 前記複数のアプリケーション・プログラムのそれぞれに
対応して設けられ、対応するアプリケーションで使用さ
れるデータの属性に応じて連続してデータを配置するワ
ークエリアと、 前記記憶手段に記憶されているアプリケーション・プロ
グラムのうち、前記印刷コマンドにより指示されたアプ
リケーションに処理を移行する制御手段と、 前記制御手段によるアプリケーションの移行に際して、
前記ワークエリアのデータを圧縮する圧縮手段と、を有
することを特徴とする印刷装置。
1. A printing apparatus for executing a printing process by switching an application in accordance with a print command from an external device, the storage device storing a plurality of application programs, and each of the plurality of application programs. A work area, which is provided correspondingly and in which data is continuously arranged according to the attribute of the data used by the corresponding application, and an application program stored in the storage unit, which is instructed by the print command. Control means for migrating processing to the application, and when migrating the application by the control means,
And a compression unit that compresses data in the work area.
【請求項2】 前記印刷コマンドにより指示されたアプ
リケーションは、当該アプリケーションの実行時、前記
圧縮手段によるデータ圧縮により拡大された前記ワーク
エリアの使用可能エリアを使用することを特徴とする請
求項1に記載の印刷装置。
2. The application designated by the print command uses the usable area of the work area expanded by the data compression by the compression unit when the application is executed. The printing device described.
【請求項3】 前記圧縮手段は、前記印刷コマンドによ
り指示されたアプリケーションがその時点で実行中か否
かを判断し、当該アプリケーションが実行中でない時
は、その時点で実行中のアプリケーションに対応するワ
ークエリアのデータを圧縮することを特徴とする請求項
1に記載の印刷装置。
3. The compressing unit determines whether or not an application instructed by the print command is being executed at that time, and when the application is not being executed, corresponds to the application being executed at that time. The printing apparatus according to claim 1, wherein the data in the work area is compressed.
【請求項4】 外部機器よりの印刷コマンドに応じてア
プリケーションを切り換えて印刷処理を実行する印刷装
置におけるデータ管理方法であって、 実行中のアプリケーションにより使用されるデータを、
その属性に応じて連続してメモリに配置する工程と、 印刷コマンドにより指示されたアプリケーションに移行
する際、その時点で実行中のアプリケーションに対応す
る前記メモリのデータを圧縮する圧縮工程と、を有する
ことを特徴とする印刷装置におけるデータ管理方法。
4. A data management method in a printing apparatus for executing a printing process by switching an application in accordance with a print command from an external device, wherein data used by the running application includes:
It has a step of continuously arranging in the memory according to the attribute, and a compression step of compressing the data in the memory corresponding to the application being executed at the time of shifting to the application instructed by the print command. A data management method in a printing apparatus, comprising:
【請求項5】 前記圧縮工程は、前記印刷コマンドによ
り指示されたアプリケーションがその時点で実行中であ
るか否かを判断し、実行中でない時にそれまで実行され
ていたアプリケーションに対応する前記メモリのデータ
を圧縮することを特徴とする請求項4に記載の印刷装置
におけるデータ管理方法。
5. The compressing step determines whether or not an application instructed by the print command is being executed at that time, and when the application is not being executed, the memory of the memory corresponding to the application that has been executed until then is determined. The data management method according to claim 4, wherein the data is compressed.
【請求項6】 前記印刷コマンドにより指示されたアプ
リケーションがその時点で実行中でない時は、記憶され
ているアプリケーション・プログラムのうち前記印刷コ
マンドにより指示されたアプリケーションに処理を移行
する工程を更に有することを特徴とする請求項4に記載
の印刷装置におけるデータ管理方法。
6. The method further comprises a step of migrating the processing to the application instructed by the print command among the stored application programs when the application instructed by the print command is not being executed at that time. A data management method in a printing apparatus according to claim 4, wherein:
JP7040111A 1995-02-28 1995-02-28 Printer device and its data managing method Withdrawn JPH08234939A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7040111A JPH08234939A (en) 1995-02-28 1995-02-28 Printer device and its data managing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7040111A JPH08234939A (en) 1995-02-28 1995-02-28 Printer device and its data managing method

Publications (1)

Publication Number Publication Date
JPH08234939A true JPH08234939A (en) 1996-09-13

Family

ID=12571751

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7040111A Withdrawn JPH08234939A (en) 1995-02-28 1995-02-28 Printer device and its data managing method

Country Status (1)

Country Link
JP (1) JPH08234939A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100484164B1 (en) * 2002-09-23 2005-04-19 삼성전자주식회사 Practical using method and apparatus for memory of a printer

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100484164B1 (en) * 2002-09-23 2005-04-19 삼성전자주식회사 Practical using method and apparatus for memory of a printer

Similar Documents

Publication Publication Date Title
JP2000135821A (en) Printer
US7289235B2 (en) Information processing device, information processing system, method for controlling information processing device, storage medium and control program
JP3814324B2 (en) Print control apparatus and print control method
US6016155A (en) Character processing apparatus, character processing method, and memory
JPH10329371A (en) Printer memory boost
JPH11134140A (en) Data processor and print controller, data processing method of data processor and of printing controller, and storage medium for computer-readable program
JPH08234939A (en) Printer device and its data managing method
US20020033831A1 (en) Image drawing apparatus, image drawing method and memory medium
JPH0644013A (en) Method for compressing printing data
JP2973260B2 (en) Print information processing device
US5905853A (en) Image printing apparatus and method having changeable capacity storage means
JPH09190313A (en) Printer control device and method therefor
JPH11203070A (en) Printer controller
JPH0863145A (en) Pattern generating method and device therefor
JP2001282471A (en) Printing system, printer, information processor, and their controlling method
JPH09269874A (en) Information processor, its data processing method and storage medium storing program readable by means of computer
JP3173716B2 (en) Output device, information processing system and data output method
JP3209858B2 (en) Print control device and print control method
JPH03114856A (en) Printer data management system
JPH10198530A (en) Printer system
JPH08282019A (en) Image forming method and device
JPH0631989A (en) Control method of printing of page printer
JP3483419B2 (en) Computer, data processing method, and computer-readable storage medium
JP2002358175A (en) Printing controller and printing control method and printing system
JPH11291564A (en) Image processor and processing method, print system and memory medium

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20020507