JP2728534B2 - Byte position identification code setting processing method - Google Patents
Byte position identification code setting processing methodInfo
- Publication number
- JP2728534B2 JP2728534B2 JP2019842A JP1984290A JP2728534B2 JP 2728534 B2 JP2728534 B2 JP 2728534B2 JP 2019842 A JP2019842 A JP 2019842A JP 1984290 A JP1984290 A JP 1984290A JP 2728534 B2 JP2728534 B2 JP 2728534B2
- Authority
- JP
- Japan
- Prior art keywords
- identification code
- byte
- japanese data
- code setting
- japanese
- 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.)
- Expired - Fee Related
Links
Landscapes
- Document Processing Apparatus (AREA)
Description
【発明の詳細な説明】 〔概要〕 2バイトコード系の日本語データを処理する計算機シ
ステムにおいて,日本語データの入出力処理における性
能の向上を図った日本語データのバイト位置識別コード
設定処理方式に関し, 日本語データの上位バイトであるか下位バイトである
かを識別する情報を高速に設定する手段を提供すること
を目的とし, 日本語データ域に設定された日本語データに対応し
て,各文字の上位バイトおよび下位バイトを識別する情
報が、数値による識別コードにより設定される識別コー
ド設定域と,ある値から前の識別コードを減算すること
により,日本語データの各文字の上位バイトの識別コー
ドと下位バイトの識別コードとを順次生成し,前記識別
コード設定域に設定する識別コード設定処理部とを備え
るように構成する。DETAILED DESCRIPTION OF THE INVENTION [Summary] In a computer system that processes Japanese data of a 2-byte code system, a byte position identification code setting method of Japanese data for improving the performance in input / output processing of Japanese data In order to provide a means for setting information for identifying whether it is the upper byte or the lower byte of the Japanese data at a high speed, the Japanese data set in the Japanese data area is The upper byte and lower byte of each character of Japanese data is obtained by subtracting the previous identification code from a certain value and the identification code setting area where the information for identifying the upper byte and lower byte of each character is set by a numerical identification code. And an identification code setting processing unit for sequentially generating the identification code of the lower byte and the identification code of the lower byte, and setting the identification code in the identification code setting area. I do.
本発明は,2バイトコード系の日本語データを処理する
計算機システムにおいて,日本語データの入出力処理に
おける性能の向上を図った日本語データのバイト位置識
別コード設定処理方式に関する。The present invention relates to a method for setting a byte position identification code of Japanese data in a computer system for processing Japanese data of a two-byte code system, with an improved performance in input / output processing of Japanese data.
第4図は2バイトコード系の問題説明図,第5図は従
来技術の例,第6図は従来技術による処理の例を示す。FIG. 4 is an explanatory diagram of a problem of the 2-byte code system, FIG. 5 is an example of the prior art, and FIG. 6 is an example of processing by the conventional technology.
漢字を含む日本語文字は,字種が多いため,各文字を
1バイトで表すことができず,2バイトで日本語の1文字
を表す2バイトコード系が採用されている。このような
2バイトコード系では,1文字の上位バイト(1バイト
目)と下位バイト(2バイト目)の両方でもって,意味
のあるコードとなり,個別では意味がまったく不明とな
る。Since Japanese characters including kanji have many character types, each character cannot be represented by one byte, and a two-byte code system that represents one Japanese character in two bytes is employed. In such a two-byte code system, both the upper byte (the first byte) and the lower byte (the second byte) of one character become a meaningful code, and the meaning is completely unknown individually.
例えば第4図に示すように,日本語データをディスプ
レイ画面40に表示するとき,画面の端が,日本語文字の
上位バイトと下位バイトの間にくると,いわゆる漢字の
泣き別れが生じる。すなわち,第4図の例では,「み」
の字が正常に表示されなくなる。For example, as shown in FIG. 4, when Japanese data is displayed on the display screen 40, when the edge of the screen comes between the upper byte and the lower byte of the Japanese character, so-called kanji tearing occurs. That is, in the example of FIG.
Will not be displayed properly.
この漢字の泣き別れを回避するためには,日本語デー
タを編集するごとに,画面の端が上位バイトの後か,下
位バイトの後かを常に判定する必要があるが,その都
度,計算をしていたのでは,その処理に時間がかること
になる。In order to avoid this kanji tearing, it is necessary to always determine whether the edge of the screen is after the upper byte or the lower byte each time the Japanese data is edited. If it did, the process would take a long time.
そこで,従来,第5図に示すように,日本語データが
設定されている日本語データ域11に対応して,その各日
本語データの1バイト目か2バイト目かを識別する識別
フラグ部50を設け,例えば識別グラグがOFFのとき,上
位バイト(1バイト目),識別フラグがONのとき,下位
バイト(2バイト目)を表すようにしていた。この識別
フラグのON/OFFを判定すれば,第4図に示すような漢字
の泣き別れが生じるか否かを直ちに判定できるようにな
る。Therefore, conventionally, as shown in FIG. 5, an identification flag portion for identifying the first byte or the second byte of each Japanese data corresponding to the Japanese data area 11 in which the Japanese data is set. For example, when the identification flag is OFF, the upper byte (first byte) is indicated, and when the identification flag is ON, the lower byte (second byte) is indicated. By judging ON / OFF of this identification flag, it becomes possible to immediately judge whether or not crying of Chinese characters occurs as shown in FIG.
第5図に示す識別フラグ部50に,識別フラグを設定す
る処理は,例えば第6図に示すように行われる。The process of setting the identification flag in the identification flag unit 50 shown in FIG. 5 is performed, for example, as shown in FIG.
ループ変数Cを1から日本語データの長さ(バイト
数)とし.までの処理を繰り返す。Let the loop variable C be 1 to the length (number of bytes) of Japanese data. The process up to is repeated.
識別フラグを設定する日本語データの現在の位置が,1
バイト目かどうかを判定し、1バイト目であれば,を
実行し,1バイト目でなければ,を実行する。The current position of the Japanese data for which the identification flag is set is 1
It is determined whether or not the byte is the byte. If the byte is the first byte, the process is executed. If not, the process is executed.
識別フラグをOFFにする。Turn off the identification flag.
識別フラグをONにする。Turn on the identification flag.
日本語データの長さ分の処理が終了するまで,ループ
の先頭からの処理を繰り返す。The processing from the beginning of the loop is repeated until the processing for the length of the Japanese data is completed.
第5図に示したような従来の方式では,日本語データ
の1バイト目か2バイト目かを識別する情報をビット
(フラグ)で設定するため,第6図に示すのような判
定文が必要となり,実行性能が悪いという問題がある。
すなわち,第6図に示すのような判定文は.機械語命
令レベルでは,比較命令と分岐命令とに展開され,実行
時のダイナミック・ステップが増加することになる。In the conventional method as shown in FIG. 5, information for identifying the first byte or the second byte of Japanese data is set by a bit (flag), so that a judgment statement as shown in FIG. Required, and the execution performance is poor.
That is, a judgment statement as shown in FIG. At the machine language instruction level, it is expanded into a comparison instruction and a branch instruction, and the dynamic step at the time of execution increases.
本発明は上記問題点の解決を図り,日本語データの上
位バイトであるか下位バイトであるかを識別する情報を
高速に設定する手段を提供することを目的としている。SUMMARY OF THE INVENTION It is an object of the present invention to solve the above-mentioned problems and to provide a means for setting information for identifying the upper byte or the lower byte of Japanese data at high speed.
第1図は本発明の原理説明図である。 FIG. 1 is a diagram illustrating the principle of the present invention.
第1図において,10はCPUおよびメモリなどからなるデ
ータ処理装置,11は日本語データが格納されている日本
語データ域,12は日本語データの上位バイトか下位バイ
トかを識別する情報が設定される識別コード設定域,13
は識別コード設定域12への識別コードの設定処理を行う
識別コード設定処理部を表す。In FIG. 1, reference numeral 10 denotes a data processing device including a CPU and a memory, 11 denotes a Japanese data area in which Japanese data is stored, and 12 denotes information for identifying an upper byte or a lower byte of the Japanese data. Identification code setting area, 13
Denotes an identification code setting processing unit that performs an identification code setting process on the identification code setting area 12.
識別コード設定域12には,日本語データ域11に設定さ
れた日本語データに対応して、各文字の上位バイトおよ
び下位バイトを識別する情報が,数値による識別コード
により設定されるようになっている。In the identification code setting area 12, information for identifying the upper byte and the lower byte of each character is set by a numerical identification code corresponding to the Japanese data set in the Japanese data area 11. ing.
識別コード設置処理部13は、ある値から前の識別コー
ドを減算することにより,日本語データの各文字の上位
バイトの識別コードと下位バイトの識別コードとを順次
生成し,その各識別コードを識別コード設定域12に設定
する処理を行う。The identification code setting processing unit 13 subtracts the previous identification code from a certain value to sequentially generate an identification code of the upper byte and an identification code of the lower byte of each character of the Japanese data, and identifies each identification code. A process for setting in the identification code setting area 12 is performed.
日本語データの上位バイトか下位バイトかを識別する
情報を,数値による識別コードとしているため,識別コ
ード設定処理部13では、1バイト目か2バイト目かの判
定を行うことなく,計算式の処理だけで,識別コードを
順次生成し,高速に情報を設定することができる。Since the information for identifying whether the upper byte or the lower byte of the Japanese data is a numeric identification code, the identification code setting processing unit 13 does not determine whether the byte is the first byte or the second byte. Identification codes can be sequentially generated only by processing, and information can be set at high speed.
例えば上位バイトの識別コードを“1"とし、下位バイ
トの識別コードを“2"とする。ある値“3"から上位バイ
トの識別コードを減算すると,下位バイトの識別コード
になり,下位バイトの識別コードを減算すると,上位バ
イトの識別コードになる。これにより,判定文を用いな
いでも,識別コード“1"と“2"を交互に設定することが
可能になる。For example, the identification code of the upper byte is “1”, and the identification code of the lower byte is “2”. When the identification code of the upper byte is subtracted from a certain value “3”, the identification code of the lower byte is obtained, and when the identification code of the lower byte is subtracted, the identification code of the upper byte is obtained. This makes it possible to set the identification codes “1” and “2” alternately without using a judgment statement.
第2図は本発明の適用システムの例,第3図は本発明
の実施例に係る識別コード設定処理の例を示す。FIG. 2 shows an example of an application system of the present invention, and FIG. 3 shows an example of an identification code setting process according to the embodiment of the present invention.
本発明は,例えば第2図に示すようなシステムに適用
される。図中,第1図と同符号のものは,第1図に示す
ものに対応し,20はディスプレイを備えた端末装置,21は
端末入出力部,22は日本語データ処理を行う応用処理部
を表す。The present invention is applied to, for example, a system as shown in FIG. In the figure, those having the same reference numerals as those in FIG. 1 correspond to those shown in FIG. 1, wherein 20 is a terminal device having a display, 21 is a terminal input / output unit, and 22 is an application processing unit for processing Japanese data. Represents
端末入出力部21は,応用用処理部22からの要求によ
り,端末装置20に対する日本語データの入出力を行う。
入出力の対象となる日本語データは,バッファとして用
意された日本語データ域11に格納される。この日本語デ
ータ域11に対応して,識別コード設定域12が用意され,
識別コード設定処理部13により,日本語データの上位バ
イトか下位バイトかを識別する数値による識別コードが
設定される。The terminal input / output unit 21 inputs / outputs Japanese data to / from the terminal device 20 in response to a request from the application processing unit 22.
Japanese data to be input / output is stored in a Japanese data area 11 prepared as a buffer. An identification code setting area 12 is prepared corresponding to the Japanese data area 11,
The identification code setting processing unit 13 sets an identification code of a numerical value for identifying whether the upper byte or the lower byte of the Japanese data.
端末入出力部21は,識別コード設定処理部13による識
別コードの設定処理の後,識別コード設定域12の設定情
報を用いて,画面の表示制御や日本語データのエラーチ
ェックなどを行う。After the identification code setting processing by the identification code setting processing unit 13, the terminal input / output unit 21 uses the setting information in the identification code setting area 12 to perform screen display control and error checking of Japanese data.
識別コード設定処理部13が行う処理は,高級言語レベ
ルで表記すると,例えば第3図に示すような処理であ
る。以下,第3図に示す〜に従って説明する。The processing performed by the identification code setting processing unit 13 is, for example, a processing as shown in FIG. Hereinafter, description will be made in accordance with the flowchart shown in FIG.
識別コードの変数Aの初期値を“1"に設定する。The initial value of the variable A of the identification code is set to “1”.
ループ変数Cを1から日本語データの長さ(バイト
数)とし,までの処理を繰り返す。The loop variable C is set to 1 to the length (number of bytes) of the Japanese data, and the processing up to is repeated.
識別コード設定域12のCバイト目に,変数Aの値を設
定する。The value of the variable A is set in the C byte of the identification code setting area 12.
定数3から変数Aを引いた値を,変数Aに設定する。The value obtained by subtracting the variable A from the constant 3 is set as the variable A.
日本語データの長さ分の処理が終了するまで,ループ
の先頭からの処理を繰り返す。The processing from the beginning of the loop is repeated until the processing for the length of the Japanese data is completed.
以上の処理により,識別コード設定域12の1バイト目
には1が設定され,2バイト目には2が設定され,3バイト
目には1が設定され,4バイト目には2が設定され,……
というように,上位バイトと下位バイトを示す識別コー
ドが交互に設定されることになる。By the above processing, 1 is set in the first byte of the identification code setting area 12, 2 is set in the second byte, 1 is set in the third byte, and 2 is set in the fourth byte. , ……
Thus, the identification code indicating the upper byte and the lower byte is set alternately.
以上説明したように,本発明によれば,数値でもって
上位バイトと下位バイトを識別する情報を扱うことによ
り,計算式による情報の設定が可能になり,判定文が不
要となるので,処理性能が向上する。As described above, according to the present invention, by handling information for distinguishing the upper byte and the lower byte by a numerical value, it is possible to set information using a calculation formula, and a judgment statement is not required. Is improved.
第1図は本発明の原理説明図, 第2図は本発明の適用システムの例, 第3図は本発明の実施例に係る識別コード設定処理の
例, 第4図は2バイトコード系の問題説明図, 第5図は従来技術の例, 第6図は従来技術による処理の例を示す。 図中,10はデータ処理装置,11は日本語データ域,12は識
別コード設定域,13は識別コード設定処理部を表す。FIG. 1 is a diagram for explaining the principle of the present invention, FIG. 2 is an example of an application system of the present invention, FIG. 3 is an example of an identification code setting process according to an embodiment of the present invention, and FIG. FIG. 5 shows an example of the prior art, and FIG. 6 shows an example of processing according to the prior art. In the figure, 10 is a data processing device, 11 is a Japanese data area, 12 is an identification code setting area, and 13 is an identification code setting processing unit.
Claims (1)
る計算機システムにおいて, 日本語データ域(11)に設定された日本語データに対応
して,各文字の上位バイトおよび下位バイトを識別する
情報が,数値による識別コードにより設定される識別コ
ード設定域(12)と, ある値から前の識別コードを減算することにより,日本
語データの各文字の上位バイトの識別コードと下位バイ
トの識別コードとを順次生成し,前記識別コード設定域
(12)に設定する識別コード設定処理部(13)と を備えたことを特徴とするバイト位置識別コード設定処
理方式。In a computer system for processing Japanese data of a two-byte code system, an upper byte and a lower byte of each character are identified according to Japanese data set in a Japanese data area (11). The identification code setting area (12) in which the information is set by a numerical identification code, and the identification code of the upper byte and lower byte of each character of Japanese data by subtracting the previous identification code from a certain value And an identification code setting processing section (13) for sequentially generating codes and setting the identification code in the identification code setting area (12).
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019842A JP2728534B2 (en) | 1990-01-30 | 1990-01-30 | Byte position identification code setting processing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019842A JP2728534B2 (en) | 1990-01-30 | 1990-01-30 | Byte position identification code setting processing method |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH03224030A JPH03224030A (en) | 1991-10-03 |
JP2728534B2 true JP2728534B2 (en) | 1998-03-18 |
Family
ID=12010521
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2019842A Expired - Fee Related JP2728534B2 (en) | 1990-01-30 | 1990-01-30 | Byte position identification code setting processing method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2728534B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0743710B2 (en) * | 1992-07-21 | 1995-05-15 | 株式会社ソリトンシステムズ | Kanji search device |
-
1990
- 1990-01-30 JP JP2019842A patent/JP2728534B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JPH03224030A (en) | 1991-10-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2728534B2 (en) | Byte position identification code setting processing method | |
US6086624A (en) | Simulator and simulation method in each of which simulation can be carried out at a high-speed | |
JP2789648B2 (en) | Data buffering device | |
JPS6038750B2 (en) | How to enter characters in a word processor | |
JP2504551B2 (en) | Error detection processing method for input data | |
JP2606658B2 (en) | Logic simulator and control method | |
JP2643330B2 (en) | Conversion method of internal representation format of character string | |
JP2995975B2 (en) | Document processing device | |
JPH03192452A (en) | Interruption processing method for device input/output driver program | |
JPS6285322A (en) | Picture displaying system | |
JPS61182137A (en) | Data processing with tag | |
JPH021027A (en) | Compiling system for compressed source program | |
JPS6136846A (en) | Program control system | |
JPS60220468A (en) | Vector arithmetic control system | |
JPH03229322A (en) | Automatic transcribing system | |
JPS588010B2 (en) | Program creation device | |
JPS62125422A (en) | Input system for character attribute code | |
JPH0581071A (en) | Program debugging device | |
JPS60247295A (en) | Line space specifying system for document | |
JPH04260970A (en) | Method for inputting japanese language in application program | |
JPH04215115A (en) | Information processor | |
JPH02128219A (en) | System generation system using system definition information | |
JPH03197997A (en) | Outline font data conversion system | |
JPH05120222A (en) | Common information acquisition system for on-line system | |
JPH07117991B2 (en) | Dictionary search method for character recognition device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
LAPS | Cancellation because of no payment of annual fees |