KR940009451B1 - Korean character code exchange method - Google Patents

Korean character code exchange method Download PDF

Info

Publication number
KR940009451B1
KR940009451B1 KR1019880000901A KR880000901A KR940009451B1 KR 940009451 B1 KR940009451 B1 KR 940009451B1 KR 1019880000901 A KR1019880000901 A KR 1019880000901A KR 880000901 A KR880000901 A KR 880000901A KR 940009451 B1 KR940009451 B1 KR 940009451B1
Authority
KR
South Korea
Prior art keywords
code
index
combination
rom
hangul
Prior art date
Application number
KR1019880000901A
Other languages
Korean (ko)
Other versions
KR890011703A (en
Inventor
유상철
Original Assignee
주식회사금성사
최근선
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 주식회사금성사, 최근선 filed Critical 주식회사금성사
Priority to KR1019880000901A priority Critical patent/KR940009451B1/en
Publication of KR890011703A publication Critical patent/KR890011703A/en
Application granted granted Critical
Publication of KR940009451B1 publication Critical patent/KR940009451B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/02Input arrangements using manually operated switches, e.g. using keyboards or dials
    • G06F3/023Arrangements for converting discrete items of information into a coded form, e.g. arrangements for interpreting keyboard generated codes as alphanumeric codes, operand codes or instruction codes

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The method converts a combination type to a completion type in a korean alphabet code. The method is realized by binary searching an inputted combination code within a predetermined area, after a combination code table and an index table are stored in a font ROM and an index table ROM, respectively. According to this invention, the code of the combination type is converted into the code of completion type, quickly.

Description

한글코드 변환방법How to convert Korean code

제 1 도는 94×25 인티저테이블을 보인 설명도.1 is an explanatory diagram showing a 94 × 25 integer table.

제 2 도는 16단위 부호에서의 부분적인 비트 구성에 해당하는 한글자모를 보인 설명도.2 is an explanatory diagram showing a Hangul alphabet corresponding to a partial bit structure in a 16 unit code.

제 3 도는 종래 코드 변환 신호흐름도.3 is a conventional code conversion signal flow diagram.

제 4 도는 본 발명이 적용되는 프린터의 제어장치 블록도.4 is a control block diagram of a printer to which the present invention is applied.

제 5 도는 본 발명에 따른 조합코드테이블 예시도.5 is an exemplary combination code table according to the present invention.

제 6 도는 본 발명에 따른 인덱스테이블 예시도.6 is an exemplary view of an index table according to the present invention.

제 7 도는 본 발명의 한글코드 변환방법에 의한 신호흐름도.7 is a signal flow diagram according to the Hangul code conversion method of the present invention.

* 도면의 주요부분에 대한 부호의 설명* Explanation of symbols for main parts of the drawings

1 : 중앙처리장치 2 : 시스템롬1: central processing unit 2: system ROM

3 : 폰트롬 4 : 인덱스테이블롬3: Font ROM 4: Index Table ROM

5 : 이미지발생기5: Image Generator

본 발명은 프린터등과 같은 퍼스널 컴퓨터 주변기기에서의 한글코드 변환방법에 관한 것으로, 특히 한글 조합형 코드를 한글 완성형 코드로 변환하는데 소요되는 서치(search)시간을 줄일 수 있게 한 한글코드 변환방법에 관한 것이다.The present invention relates to a Hangul code conversion method in a personal computer peripheral device such as a printer, and more particularly, to a Hangul code conversion method capable of reducing the search time required to convert a Hangul combination code into a Hangul complete code. .

국내 퍼스널 컴퓨터에서 사용되는 한글코드 체계는 크게 완성형 코드체계와 조합형 코드체계로 구별되는데, 상기 완성형 코드체계는 제 1 도와 같이 한글의 글자마다 1개의 코드를 부여하고, 조합형 코드체계는 제 2 도와 같이 한글의 자음 및 모음에 대하여 각각의 코드를 부여하고, 이 코드를 조합하여 한글의 문자를 완성하게 된다.The Korean code system used in domestic personal computers is largely divided into a complete code system and a combined code system. The complete code system is assigned one code for each letter of the Hangul as in the first degree, and the combined code system is used as the second degree. Each code is given to the consonants and vowels of Hangul, and the codes are combined to complete the Hangul characters.

한편, 프린트등에서는 메모리의 한계로 인하여 완성형 코드에 해당하는 글자를 기억하고 있는데, 퍼스널컴퓨터에서 조합형 코드를 보내줄 경우 이를 읽어 해석한 후 프린터가 가지고 있는 코드체계로 변경하여야한다.On the other hand, in print, etc., the characters corresponding to the completed codes are memorized due to the limitation of memory. When a personal computer sends a combined code, it must be read and interpreted and changed to the code system that the printer has.

이와같은 코드 변환방법은 완성형 코드의 틀에 낮추어진 조합형 코드의 내용을 서치(search)하는 형태이다.This code conversion method is a form of searching for the content of the combined code lowered in the framework of the complete code.

즉, 제 1 도를 기초로 하여 한글의 94×25 인티저(integer) 어레이(array)를 만든 후 각 글자에 해당하는 어레이내용으로 제 2 도에 도시한 바와같은 조합형 코드의 값을 기억시켜 94×25 인티저테이블을 만든다.That is, a 94 × 25 integer array of Korean characters is created based on FIG. 1, and the values of the combined codes as shown in FIG. 2 are stored in the array contents corresponding to each letter. Create an integer table.

여기서, 폰트롬에 기억된 정보를 읽음에 있어서는 제 3 도의 신호흐름도에 나타낸 바와같이, 우선 인티저로 되어 입력되는 조합형 코드를 읽고, 94×25 인티저테이블에서 입력된 조합형 코드를 바이너리(binary)서치한 후, 그 서치한 곳의 인덱스를 구하고, 그 인덱스로부터 완성형 코드 즉, 94×25 인티저테이블의 행(Row)인덱스와 열(Coulumn)인덱스에 1대 1로 대응되는 해당 완성형 코드를 구하게 되어 있다.In reading the information stored in the font ROM, as shown in the signal flow diagram of FIG. 3, first, the combined code inputted as an integer is read, and the combined code inputted from the 94 × 25 integer table is binary. After searching, find the index of the searched place, and obtain the completion code corresponding to the completion code corresponding to the row index and the column index of the 94 × 25 integer table one-to-one from the index. It is.

그러나, 이러한 종래의 한글코드 변환방법에 있어서는 조합형 코드를 94×25 인티저테이블에서 서치할 경우에 바이너리서치로 테이블 전체를 서치하는데 대한 시간이 많이 소요될 뿐 아니라, 완성형 코드를 구한후에도 폰트롬에 있는 해당글자를 찾기 위해서는 또 다른 별도의 프로그램이 필요하게 되는 등의 결함이 있었다.However, in the conventional Hangul code conversion method, when searching for a combined code in a 94 × 25 integer table, it takes a long time to search the entire table with binary search, and even after obtaining a complete code, There was a flaw such that another separate program was required to find the corresponding letter.

본 발명은 이와같은 종래의 결함을 감안하여, 조합코드테이블 및 인덱스테이블을 폰트롬 및 인덱스테이블롬에 저장한 후 입력되는 조합형 코드를 상기 테이블을 이용하여 일정범위만 바이너리서치하게 창안한 것으로, 이를 첨부한 도면을 참조하여 상세히 설명하면 다음과 같다.SUMMARY OF THE INVENTION In view of the above-mentioned deficiencies, the present invention devises a binary search using only the range of the combined code input after storing the combined code table and the index table in the font ROM and the index table ROM. When described in detail with reference to the accompanying drawings as follows.

제 4 도는 본 발명이 적용되는 프린터의 제어부 블록구성도로서, 이에 도시한 바와같이 전체동작을 제어하는 중앙처리장치(1)와, 시스템프로그램이 저장되어 있는 시스템롬(2)과, 폰트데이타가 저장되어 있는 폰트롬(3)과, 인덱스테이블이 저장되어 있는 인덱스테이블롬(4)과, 상기 폰트데이타에 따른 이미지를 발생하는 이미지발생기(5)로 구성된다.4 is a block diagram of a control unit of a printer to which the present invention is applied. As shown therein, a central processing unit 1 for controlling the overall operation, a system ROM 2 storing system programs, and font data are shown. A font ROM 3 stored therein, an index table ROM 4 having an index table stored therein, and an image generator 5 which generates an image according to the font data.

폰트를 저장할 때 제 1 도에 도시한 바와같이 글자순서대로 폰트롬(3)에 저장하여 두고, 프린트하고자 하는 글자가 완성형 코드 테이블에서 몇번째인가를 찾아내면 쉽게 폰트롬(3)에서 해당글자를 찾아낼 수 있게 된다.When saving the font, save it in the font ROM (3) in the order of the characters as shown in Fig. 1, and find out the number of the letters to be printed in the complete code table, and then easily insert the corresponding letters in the font ROM (3). I can find it.

또한 필요에 따라서 완성형 코드 테이블의 글자를 2가지 분류 혹은 3가지로 분류하여 쓰이는 경우 일예로, 폰트롬(3)에 저장시 일부는 순수비트맵(bit map)으로 저장하고 일부는 압축(compressed)비트맵으로 저장하는 경우에도 쉽게 적용될 수 있게 된다.Also, if necessary, the letters of the complete code table are classified into two or three types. For example, some of them are stored as pure bitmaps and some are compressed. Even when saving as a bitmap can be easily applied.

이를 위해서는 우선 제 5 도 및 제 6 도에 도시한 바와같은 1차원의 조합코드테이블 및 인덱스테이블을 구성하여야 한다.To this end, first, a combination code table and an index table of one-dimensional dimensions as shown in Figs.

제 5 도는 본 발명에 따른 조합코드테이블 예시도로서, 이에 도시한 바와같이 제 1 도 완성형 코드 테이블의 글자순서대로 인덱스를 부여하고, 그 인덱스마다 그 글자에 해당되는 제 2 도의 조합코드값을 기록하여 구성한다. 예를들어 한글 "나"자의 경우 조합코드가 "352"이고, 그 "나"에 해당하는 완성형 코드의 순서가 "250"이므로, 그 "250"을 인덱스로 하여, 그에 상기 조합코드값 "352"를 기록하고, 또한 한글 "걔"의 경우 조합코드가 "300"이고, 그 "걔"에 해당하는 완성형 코드의 순서가 "230"이므로, 그 "230"을 인덱스로 하여 그에 상기 조합코드값 "300"을 기록하게 된다.5 is an illustration of a combination code table according to the present invention. As shown in FIG. 5, indexes are assigned in the order of the characters of the FIG. 1 completed code table, and the combination code values of FIG. 2 corresponding to the letters are recorded for each index. To configure. For example, in the case of the Hangul "I" character, the combination code is "352", and the completion code corresponding to the "I" is "250". Therefore, the "250" is an index, and the combination code value "352". &Quot; and the combination code is " 300 " for the Korean " Gee ", and the order of the completed code corresponding to the " G " is " 230 " "300" is recorded.

한편, 제 2 도에 나타난 바와같은 조합형 코드로 구성 가능한 모든 코드값은 "0000(16진수)"부터 "FFFF(16진수)"까지의 범위안에 있게 되고, 이러한 범위를 임의의 인터발(interval)값으로 나누게 되면, 나누어진 각 세그먼트의 첫번째 글자와 매칭되는 완성형 코드가 반드시 1개 존재하게 되는데, 이러한 원리를 이용하여 제 6 도와 같이 인덱스테이블을 구성한다. 예를들어 한글문자 "걔"의 경우 조합코드가 "300"이고, 이때 인터발값이 "100"이라 가정할 때, 그 조합코드 "300"을 인터발값 "100"으로 나누면, 몫이 "3"인 첫번째 글자로 된다. 따라서 상기 몫 "3"을 인덱스로 하여, 그에 제 5 도 조합코드 "300"의 인덱스인 "230"을 기록한다.On the other hand, all code values configurable with the combined code as shown in FIG. 2 are in the range of "0000 (hexadecimal)" to "FFFF (hexadecimal)", and this range is an arbitrary interval value. When divided by, there is necessarily one complete code that matches the first letter of each segment. Using this principle, an index table is constructed as shown in FIG. For example, in the case of the Korean character "G", the combination code is "300", and when the interval value is "100", the combination code "300" is divided by the interval value "100", and the quotient is "3". Becomes the first letter. Therefore, using the quotient "3" as an index, "230" which is an index of the fifth degree combination code "300" is recorded therein.

상기와 같이 구성한 테이블을 이용하여 한글코드를 변환하는 과정은 제 7 도의 흐름도와 같이 이루어진다.The conversion of the Korean code using the table constructed as described above is performed as shown in the flowchart of FIG.

퍼스널 컴퓨터로부터 입력되는 조합코드를 읽고, 그 조합코드를 인터발로 나누면, 그 몫이 제 6 도 인덱스테이블의 인덱스를 나타낸다. 따라서, 그 몫에 의해 인덱스테이블롬(4)의 인텍스테이블의 인덱스(i)를 찾고, 이 인덱스(i)에 "1"을 가산(i+1)한다. 이와같이 구한 인덱스(i), (i+1)의 내용을 읽어, 그 내용으로부터 제 5 도 조합코드테이블의 인덱스(I), (J)를 구하게 된다. 이와같이 구하여진 조합코드테이블의 인덱스(I), (J) 사이만을 서치하게 되면, 상기 입력 조합코드에 해당하는 조합코드를 찾을 수 있게 되고, 이와같이 찾은 조합코드의 인덱스가 폰트롬(3)의 해당글자순서가 되므로, 완성형 코드를 산출할 수 있게 된다.If a combination code input from a personal computer is read and the combination code is divided into intervals, the share represents the index of the FIG. 6 index table. Therefore, the index finds the index i of the index table of the index table ROM 4, and adds "1" to this index i (i + 1). The contents of the indices (i) and (i + 1) thus obtained are read, and the indices (I) and (J) of the fifth degree code table are obtained from the contents. When searching only between the indexes (I) and (J) of the obtained assembly code table, the assembly code corresponding to the input assembly code can be found, and the index of the assembly code found in this way corresponds to that of the font ROM (3). Since it is in alphabetical order, it is possible to calculate the complete code.

상기에서 예를들면 설명한 바와같이 한글 "나"의 조합코드 "352"가 입력된 경우에 그 조합코드 "352"를 인터발값 "100"으로 나누게 되면, 그 몫이 "3"으로 되어 인덱스테이블의 인덱스(i)가 "3"으로 구해지고, 그 인덱스(i)에 "1"을 더하면 인덱스(i+1)은 "4"로 구해진다. 이와같이 구해진 인덱스 "3", "4"의 내용을 읽어 조합코드테이블의 인덱스를 찾을 수 있게 된다. 즉, 인덱스테이블의 인덱스 "3"으로부터 조합코드테이블의 인덱스 "230"을 찾을 수 있게 되고, 또한 인덱스테이블의 인덱스 "4"로부터 그에 해당하는 조합코드테이블의 인덱스(일예로 "270"이라 가정함)을 찾을 수 있게 되며, 이에따라 조합코드테이블의 인덱스 "230"부터 인덱스 "270"까지만 서치함으로써 상기 한글 "나"자의 조합코드 "352"에 해당하는 인덱스 "250"을 찾을 수 있게 된다.For example, when the combination code "352" of Korean "I" is inputted as described above, when the combination code "352" is divided by the interval value "100", the quotient becomes "3". The index i is obtained by "3", and when "1" is added to the index i, the index i + 1 is obtained by "4". The index of the combination code table can be found by reading the contents of the indexes "3" and "4" thus obtained. That is, the index "230" of the combination code table can be found from the index "3" of the index table, and the index of the corresponding combination code table from the index "4" of the index table (for example, "270"). ) Can be searched for, and by searching only the index "230" to the index "270" of the combination code table, the index "250" corresponding to the combination code "352" of the Hangul "I" character can be found.

이상에서 상세히 설명한 바와같이 본 발명은 조합코드테이블 및 인덱스테이블을 구성하여 폰트롬 및 인덱스테이블롬에 저장하고, 그 테이블을 이용하여 입력되는 조합코드를 일정범위만 바이너리서치한 후 완성코드로 변환하게 함으로써 종래와 같이 전범위를 바이너리서치하는 방법을 일정범위만 바이너리서치하게 되므로 조합형 코드를 완성형 코드로 변환하는데 소요되는 시간을 줄일 수 있음은 물론 해당 폰트를 프린트하는데 있어서 완성코드를 해석해야 되는 과정이 필요없게 되는 효과가 있게 된다.As described in detail above, the present invention configures a combination code table and an index table and stores them in a font ROM and an index table ROM, and converts the combined code inputted using the table into a complete code after binary searching only a certain range. As a result, binary search of the entire range is performed in a binary manner, and thus the time required for converting the combined code into the complete code is reduced, and the process of interpreting the completed code in printing the corresponding font is required. The effect becomes unnecessary.

Claims (1)

조합코드테이블 및 인덱스테이블을 분류하여 폰트롬(3) 및 인텍스테이블롬(4)에 저장시켜 두고, 퍼스널 컴퓨터로부터 입력된 조합코드를 읽고 그 조합코드를 인터발로 나누어 그 몫에 의해 인덱스테이블롬(4)의 인덱스(i)를 구함과 아울러 그 인덱스(i)에 "1"을 가산하여 인덱스테이블(4)의 인덱스(i+1)를 구하는 단계와, 상기 인덱스테이블롬(4)의 인덱스(i)(i+1)의 내용을 읽어 상기 조합코드테이블의 인덱스(I)(J)를 구하는 단계와, 상기 조합코드테이블의 인덱스(I)(J)의 사이를 바이너리서치하여, 상기 입력된 조합코드에 해당하는 인덱스를 찾아읽는 단계로 이루어진 것을 특징으로 하는 한글코드 변환방법.The combination code table and the index table are classified and stored in the font ROM 3 and the index table ROM 4, and the combination codes input from the personal computer are read, and the combination codes are divided into intervals, and the index table ROM ( Obtaining the index i of 4) and adding "1" to the index i to obtain the index i + 1 of the index table 4, and the index of the index table ROM 4 i) reading the contents of (i + 1) to obtain the index (I) (J) of the combination code table, and performing binary search between the index (I) (J) of the combination code table, Hangul code conversion method comprising the steps of finding and reading the index corresponding to the combination code.
KR1019880000901A 1988-01-30 1988-01-30 Korean character code exchange method KR940009451B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019880000901A KR940009451B1 (en) 1988-01-30 1988-01-30 Korean character code exchange method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019880000901A KR940009451B1 (en) 1988-01-30 1988-01-30 Korean character code exchange method

Publications (2)

Publication Number Publication Date
KR890011703A KR890011703A (en) 1989-08-22
KR940009451B1 true KR940009451B1 (en) 1994-10-13

Family

ID=19271892

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019880000901A KR940009451B1 (en) 1988-01-30 1988-01-30 Korean character code exchange method

Country Status (1)

Country Link
KR (1) KR940009451B1 (en)

Also Published As

Publication number Publication date
KR890011703A (en) 1989-08-22

Similar Documents

Publication Publication Date Title
US4907194A (en) String comparator for searching for reference character string of arbitrary length
US5047932A (en) Method for coding the input of Chinese characters from a keyboard according to the first phonetic symbols and tones thereof
US4597056A (en) Language translator having circuitry for retrieving full words after single letter input
US5131766A (en) Method for encoding chinese alphabetic characters
US4482981A (en) Input device for pocket electronic translator
US5137383A (en) Chinese and Roman alphabet keyboard arrangement
KR940009451B1 (en) Korean character code exchange method
JPH0413742B2 (en)
JPS6254364A (en) Ideogram processing method and apparatus
US5404517A (en) Apparatus for assigning order for sequential display of randomly stored titles by comparing each of the titles and generating value indicating order based on the comparison
JPH0575143B2 (en)
KR20010067827A (en) multi-languages Chinese characters database structure
JP2634926B2 (en) Kana-Kanji conversion device
JPH0531190B2 (en)
KR860000298B1 (en) Collectablely written home language typewriter for double fold usage
JPS63316162A (en) Document preparing device
KR900006730B1 (en) Method for controlling chinese letter font process in dot matrix printer
JPH1158U (en) Document input device
JPH02136970A (en) English word retrieving device
JPS62266662A (en) Kana/kanji converting device
JPS625469A (en) Input device for character or the like
JPH0113579B2 (en)
JPH0352102B2 (en)
JPS6321226B2 (en)
JPS62125426A (en) Data input system

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
G160 Decision to publish patent application
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 19971229

Year of fee payment: 5

LAPS Lapse due to unpaid annual fee