Image processing apparatus wherein character string processing can be performed on a display screen4924409Abstract There is an image processing apparatus which can perform the character processing works of character string on a display screen such as a CRT. This apparatus has: a keyboard having a special function input section to input a special code and a normal character input section to input normal code information different from the special code; a first memory to continuously store, as addresses, the special code inputted by the keyboard to display information on the basis of the codes stored in the first memory; a second memory to store the positional information regarding the special code; and a controller to control the display for allowing predetermined information to be displayed on the display on the basis of the special code stored in the first memory. The above special code may include either of carriage return code, tab code, centering code, gathering code, and space code. With this apparatus, the input and edit proceedings of new characters can be easily executed at any positions on the CRT by use of a buffer memory of a small capacity, so that the use efficiency of the memory is improved. Claims What is claimed is: Description BACKGROUND OF THE INVENTION
TABLE 1
______________________________________
Numeric value
Regis-
ters
DSR-INF 0 1 2 3
______________________________________
Register
The cursor The cursor
INF-CR exists at a
exists at a
(to show
position on
position on
the posi-
the left side
the right
tional re-
of the carri-
side of the
lation be-
age return or
carriage
tween the
at the posi-
return.
carriage re-
tion of the
turn and
carriage re-
the cursor)
turn.
Register The cursor
The cursor
The cursor
INF-CN exists exists at
exists at
(to show between a position
a position
the posi- the center-
on the left
on the right
tional re- ing char- side of the
side of the
lation be- acters. centering.
centering.
tween the
centering
and the
cursor)
Register The cursor
The cursor
INF-GH exists exists at
(to show between a position
the posi- the gather-
on the left
tional re- ing char- side of the
lation be- acters. gathering
tween the
gathering
and the
cursor)
Register
The cursor The cursor
INF-TB exists at exists
(to show
another between
the posi-
position the tab
tional re-
than the positions.
lation be-
tab position.
tween the
tab and
the cursor)
______________________________________
The format information registers DSR-FORM are the registers into which the format information for display on the screen is set and, as shown in FIG. 5, they comprise: a register FOM-LM to set the character position of the left margin; a register FOM-RM to set the character position of the right margin; a register FOM-ID to set the character position of the indent; registers FOM-TB [0]to FOM-TB[n](where, n is a positive integer) to store the tab positions designated; and a register TB-LEN to indicate the number of characters between a tab position and a character other than a space, the character existing between said tab position and its preceding tab position. In this embodiment, it is assumed that the registers FOM-LM, FOM-RM and FOM-ID are dealt in a manner such that the FOM-LM is "0", FOM-RM is "39" and FOM-ID is "0". In the registers FOM-TB [O]to FOM-TB [n]to indicate the tab positions, the tab positions as many as the number of tabs designated are sequentially set from the tab position having a small address. FIG. 6 shows an example of the state whereby the sentence inputted through the keyboard KB was displayed on the screen of the display CRT in FIG. 1. In this diagram, FML denotes a format line showing the format on the screen of the display CRT. A margin position and a tab position are displayed in this line. "L" displayed in the format line FML indicates the left margin position, "R" shows the right margin position, "t" represents the tab position, and "." indicates the positions at which characters are inputted. In this embodiment, it is assumed that the left margin is set to "0", the right margin is set to "39" and the tab is set to the three character positions (addresses) of "4", "9" and "14". Twelve lines indicated by DL1 to DL12 other than this format line FML are used as display areas for displaying sentences. A cursor CR is displayed on the screen by a mark ".sub.-- ". The value of the register CR-X indicating the x coordinate of this cursor CR is "0" at the left margin position and "39" at the right margin position. On the other hand, the value of the register CR-Y showing the y coordinate of the cursor CR is "0" in the first line DL1 and "11" in the last line DL12. In this way, the cursor CR can be moved by the cursor moving keys within a range of the coordinates of (0, 0) to (39, 11). In addition, CENT denotes a centering position, CRET is a carriage return position and GATH is a gathering position. FIG. 7 shows an example of the storage state of the buffer memory DB in which the contents of the display screen shown in FIG. 6 were stored. As shown in the diagram, the character string to be displayed is continuously stored in the buffer memory DB and special codes .circle.CN , .circle.CR , .circle.tb , and .circle.GH are included in the buffer memory DB. .circle.CN is a special code to indicate the start character of the centering. This code .circle.CN allows the character string in the section which is sandwiched between the special code .circle.CN and the special code .circle.CR to be displayed at the central position between the left and right margins. .circle.CR is a special code to indicate the carriage return and the character string after this code .circle.CR is displayed from the next line. .circle.tb is a special code to indicate the tab. This code .circle.tb allows the space characters (blanks) to be displayed on the screen until a preset backward tab position. It is now assumed that the number of space characters which are displayed due to the tab is set to the number of characters from the cursor position which is displayed at present to the tab position indicated by the tab position register FOM-TB [n]of the value that is closet to the above-mentioned current cursor position. .circle.GH is a special code to indicate the head of the character string which is subjected to the gathering. This code .circle.GH permits the character code in the section which is sandwiched between the special code .circle.GH and the special code .circle.CR to be displayed on the screen so as to coincide with the right margin In this embodiment, the "gathering" means that the character string sandwiched between the codes .circle.GH and .circle.CR is displayed or printed in such a manner that the character which is one character before the code .circle.CR is set at the position of the right margin. When the buffer memory .circle.DB having the contents shown in FIG. 7 is displayed on the display CRT, it will be as shown in FIG. 6 or 8. FIG. 8 shows an example of the state of the display screen of the display CRT in the case where the cursor CR is located at a position on the right side of the carriage return position (position of CRET in FIG. 8). FIG. 9 shows the contents of the respective registers of the display control registers DCR at this time. FIG. 10 shows the state of the display screen when the characters were inputted at the position of the cursor CR in FIG. 8. FIG. 11 shows the state of the buffer memory DB at this time. Namely, in the buffer memory DB, the code of the input character "x" at this time is inserted between the special codes .circle.CR and .circle.CR together with eight space codes, and the information behind "x" is sequentially moved backward (refer to FIG. 11). FIG. 12 shows an example of the state of the display screen when the cursor CR is located at the tab position (position indicated by .circle.tb before "At" shown in FIG. 6). FIG. 13 shows the contents of the respective registers of the display control registers DCR at this time. FIG. 14 shows the state of the display screen when the characters were inputted at the position of the cursor CR in FIG. 12. FIGS. 15 and 16 show the states of the buffer memory DB at this time. That is, in the buffer memory DB, the code of the input character "X" at this time may be replaced by the special code .circle.tb together with the space codes or may be inserted between the codes .circle.CR and .circle.tb (refer to FIG. 16). FIG. 17 shows an example of the state of the display screen when the cursor CR is located at a position on the left or right side of the centering. FIG. 18 shows the contents of the respective registers of the display control registers DCR when the cursor is located at a position on the left side of the centering. FIG. 19 shows the state of the display screen when the characters were inputted when the cursor exists at a location on the left side of the centering. FIG. 20-1 shows the state of the buffer memory DB at this time. FIG. 21 shows the state of the display screen when the characters were inputted when the cursor exists at a position on the right side of the centering. FIG. 22 shows the contents of the respective registers of the display control registers DCR prior to the execution of this processing. FIG. 23 shows the state of the buffer memory DB corresponding to FIG. 21. Namely, in the buffer memory DB, the code of the input character "X" at this time is inserted before the special code .circle.CR together with five space codes, and at the same time the special code .circle.CN is replaced by fourteen space codes (refer to FIG. 23). FIG. 24 shows an example of the state of the display screen when the cursor CR exists at a position on the left side of the gathering. FIG. 25 shows the contents of the respective registers of the display control registers DCR at this time. FIG. 26 shows the state of the display screen when the characters were inputted when the cursor exists at a position on the left side of the gathering. FIG. 27 shows the state of the buffer memory DB at this time. That is, in the buffer memory DB, the code of the input character "A" at this time is replaced by the special code .circle.CN together with thirteen space codes (refer to FIG. 27). On the other hand, there will be explained an embodiment whereby a use efficiency of the buffer memory can be improved as much as possible even in the case where, in addition to the above-mentioned cases, characters were inputted and the special codes such as .circle.tb , .circle.CN , etc. are replaced by a plurality of spaces and input characters and also in the case where, when those characters were inputted, those plurality of spaces are expressed by one code and characters are inputted. Practically speaking, as shown in FIG. 20-2, when special codes .circle.S7 and .circle.S6 are set, six or seven spaces are respectively expressed by one special code, so that the use areas in the buffer memory can be remarkably reduced as compared with FIG. 20-1. Also, the character input at the position of the special code can be performed in a similar manner as the processing of the tab code (tb). In this case also, the use of a special code regarding spaces enables the use area in the buffer memory to be remarkably reduced. Next, an example of the operation of the apparatus of the present invention shown in FIG. 1 will be described with reference to flow charts in FIGS. 28 to 38. FIG. 28 shows the overall processing procedure when one key of the keyboard KB was depressed. By repeatedly executing this processing procedure, the character processing such as the making, editing or the like of sentences is performed. First, in step S1, the apparatus waits for the input of a key through the keyboard 4. When it is determined that a certain key was depressed, the processing to take in the key is executed in the next step S2. In this take-in processing, the key code corresponding to the depressed key is fetched and this key code is checked in step S3 to see if it belongs to normal keys KB1 or not. When it is determined that the key code corresponds to a normal key in the normal keys KB1, the key set process in step S4 in FIG. 28 which will be explained in detail in conjunction with FIGS. 29 to 36 mentioned later, is executed In this key set process, the key code is set into the buffer memory DB in accordance with the state of the cursor position set on the display screen. On the other hand, where the key code corresponds to one of the special keys KB2 other than the normal keys KB1, the process routine advances from step S3 to S5 in FIG. 28 and the special process corresponding to that key code is carried out. For instance, when the inputted special key is the centering execution key CENTER or gathering execution key GATHER, the centering start code .circle.CN and the code .circle.CR indicative of the end of centering are set into the buffer memory DB, or the gathering start code .circle.GH and the code .circle.CR indicative of the end of gathering are set. However, in this embodiment, this process relates to the edit processing after those special codes .circle.CN, .circle.CR and the like have already been set into the buffer memory DB; therefore, the detailed description regarding the setting procedure of those special codes into the buffer memory DB is omitted. After the contents of the buffer memory DB were changed or the like due to the foregoing key set process or special process, the contents of the buffer memory DB are displayed on the display CRT due to the CRT display process in next step S6, then the cursor information check process is performed in step S7. Thus, the process regarding the depression of one key ends. The process routine then returns to step S1 and the apparatus waits for the input of the next key. Next, the above-mentioned key set process in step S4 in the case where a normal key was inputted will be described in detail with reference to the flow charts in FIGS. 29 to 36. FIG. 29 shows the whole key set process. In this process, first, in step S10, a check is made to see if the position of the cursor CR on the display screen when the key set process was designated is located at a special position described later or not. The position of the cursor CR on the display screen is determined by referring to flag values (numeric values) which were set into the respective registers of the cursor position display information registers (hereinbelow, called a cursor position information table) DSR-INF. This cursor position information table is updated due to the CRT control process for performing the cursor moving process in step S7 mentioned above and the cursor position information is always correctly set in response to the cursor moving process, so that the cursor position on the screen can be accurately determined. When it is determined that the cursor exists at a special position, the key set process at the special position is executed in step S11, and thereafter the process routine returns to the main routine in FIG. 28. In the case where the cursor is located at another normal position than the special position, the key set process at the normal position is executed in step S12, then the process routine returns to the main routine in FIG. 28. In the key set process at this normal position, the character code of the input character is set at the cursor position in the current buffer memory DB which is indicated by the buffer position cursor register (hereinafter, called a buffer cursor) DSR-POSI FIG. 30 shows the overall key set process at the special position in step S11 mentioned above. The special position means the position on the right side of the carriage return, position in the centering line, tab position, and position in the gathering line. The information at this special position has been respectively set into: the corresponding carriage position information register INF-CR in the cursor position information table DSR-INF; the centering position information register INF-CN; the tab position information register INF-TB; and the gathering position information register INF-GH. Therefore, by sequentially referring to the flag values of those respective registers (see Table 1 mentioned before), the current cursor position information can be known. Further, since the cursor is not simultaneously set at two special positions, the key set process that should be executed next is unconditionally determined. Consequently, first in step S20, a check is made to see if the cursor is located at a position on the right side of the carriage return or not by use of the flag in the carriage position information register INF-CR. If the answer is "YES" in step S20, the key set process at a right position of the carriage return is executed in step S12, then the process will return to the main routine. If "NO" in step S20, a check is made in step S22 to see if the cursor is located in the centering line or not by use of the flag in the centering position information register INF-CN. If "YES" in step S22, the key set process at the centering position is executed in step S23, then the process will return to the main routine. If "NO" in step S22, a check is made in step S24 to see if the cursor is located at the tab position or not by use of the flag in the tab position information register INF-TB. If "YES" in step S24, the key set process at the tab position is executed in step S25, then the process will return to the main routine. If "NO" in step S24, a check is made in step S26 to see if the cursor exists in the gathering line or not by use of the flag in the gathering position information register INF-GH. If "YES" in step S26, the key set process at the gathering position is executed in step S27, then the process will return to the main routine. In this way, the cursor position is sequentially discriminated and the key set process corresponding to the state of each cursor position is executed. FIG. 31 shows the detailed procedure for the key set process at a right position of the carriage return in step S21 mentioned above. Although an example of the display screen in the case where the cursor CR exceeded the carriage return code position and moved to the right has been shown in FIG. 8, the cursor CR at this time exists in the ninth column in the second line. In addition, the carriage return is located in the first column. Therefore, as shown in FIG. 9, the following data are set into the cursor position information table DSR-INF namely "1" is set into the carriage return information register INF-CR and the cursor position "9" is set into the buffer position cursor register DSR-POSI Further, "8" indicating the magnitude of the deviation amount from the carriage return to the cursor position is set into the deviation amount information register INF-POSI. The display contents on the screen when character "X" was inputted at the cursor position in this state were shown in FIG. 10. However, the state in the buffer memory DB in this state changes as shown in FIG. 11 due to the key set process in FIG. 31. Namely, when comparing with FIG. 7 showing the state of the buffer memory DB before character "X" is inputted, it will be seen that eight space codes and the code of character "X" were inserted between the carriage return code .circle.CR in the address DB[8]and the carriage return code .circle.CR in the address DB[9]. In this way, in the state of the buffer memory DB as shown in FIG. 11, even after the carriage return, data can be displayed on the display screen in a similar manner as in the case where characters were freely inputted. Therefore, in this key set processing procedure, first in step S30, the character string at and after the position in the buffer memory DB designated by the buffer cursor DSR-POSI is moved backward by one character. In next step S31, the character code inputted through the keyboard KB is set in the position in the buffer memory DB designated by the buffer cursor DSR-POSI. Subsequently, in step S32, the process in step S30 and the set of space code are repeatedly performed as many times as set in the deviation amount information register INF-POSI. Thereafter, the process routine returns to the main routine. The above procedure will be further practically explained with reference to FIGS. 7 to 11. The data in and behind the address DB[9]in the buffer memory DB is moved backward by each one character in step S30, then the code of input character "X" is set into the address DB[9]in step S31. Further, in step S32, the data in and behind the address DB[9]is moved backward by each one character similarly as in step S30 and the space code is set into the address DB[9]. By repeatedly performing the movement of the buffer data and the set of the space code only eight times corresponding to the deviation amount of "8" which was set into the deviation amount information register INF-POSI, the contents of the buffer memory DB become as shown in FIG. 11. After completion of the above process, the cursor may be moved to a new position DB[18]of the carriage return. As described above, according to this key set process, even at the positions where the data or the like does not exist in the buffer memory DB after the carriage return, the input characters can be set as if they existed at those positions. FIG. 32 shows the detailed procedure for the key set process at the tab position in step S25 in FIG. 30. The tab position means the position indicated at "t" in the format line FML in FIG. 12. The area until the tab position "t" is displayed as the spaces on the screen by the tab code .circle.tb in the buffer memory DB. In this way, the tab code .circle.tb is dealt as the space code on the display screen for filling the area until the position "t". However, in the buffer memory DB, only one tab code .circle.tb is stored at the position of one address DB[10]as shown in FIG. 7. When it is now assumed that the cursor CR exists at the position on the screen as shown in FIG. 12, the buffer cursor DSR-POSI at this time indicates the position of the tab code .circle.tb . On the other hand, the position of the cursor CR at this time has the deviation from the tab code .circle.tb and this deviation amount is set into the deviation amount information register INF-POSI (refer to FIG. 13). That is, as shown in FIG. 13, "10" indicative of the position DB[10]of the tab code .circle.tb (see FIG. 11) is set in the buffer cursor register DSR-POSI at this time. In the register INF-TB, "1" indicating that the cursor is located at the tab position is set. On one hand, in the register INF-POSI, "1" representing that the position of the cursor CR is deviated by only "1" from the position of the tab code .circle.tb in the buffer cursor register DSR-POSI is set. In addition, the number of space codes which exist between the character code (no character exists in case of this embodiment since it corresponds to the left margin) next to the relevant tab code .circle.tb and the last character code in front of the subsequent tab code .circle.tb is set into the register TB-LEN, thereby indicating the amount of spaces between the tab positions (the maximum amount is specified by the number of spaces between the tabs). Since four spaces exist in case of FIG. 12, "4" is set in the register TB-LEN. When character "X" is inputted in the cursor position in such a state as shown in FIG. 12, character "X" is displayed at this cursor position and the display state becomes as shown in FIG. 14 whereby the cursor CR was moved to the right by one character. The state of the buffer memory DB at this time changes to the state as shown in FIG. 15 or 16. In case of FIG. 15, after all of the tab codes .circle.tb were changed to the space codes, the input character code is set in the cursor position. On the other hand, in case of FIG. 16, the space codes are used as many times as the number of space characters until the character inputting position which the tab code .circle.tb has, and the input character is set in front of the tab code .circle.tb . FIG. 32 shows the key set processing procedure at the tab position to perform the process as shown in FIG. 16. The key set process at the tab position in FIG. 32 is executed when "1" indicating that the cursor exists at the tab position is set in the register INF-TB in the cursor position information table DSR-INF. First in step S40, a check is made to see if the value of which "1" was subtracted from the value set in the register TB-LEN coincides with the value in the register INF-POSI indicative of the deviation amount of the cursor position from the tab code .circle.tb or not. When they are coincident, it means the input character is set in the position of the tab code .circle.tb , while when they are not coincident, it means the cursor indicates another tab position than the tab code .circle.tb . In step S40, when it is determined that those values coincide, step S41 follows and the tab code .circle.tb designated by the buffer cursor register DSR-POSI is replaced with the character inputted through the keyboard KB. Next, in step S44, the process to move the character string at and after the position in the buffer memory DB designated by the buffer cursor register DSR-POSI backward by each one character and the process to set the space code in the position in the buffer memory DB designated by the buffer cursor register DSR-POSI are repeatedly performed as many times as set in the register INF-POSI indicative of the deviation amount from the tab code .circle.tb ; thereafter, the process routine returns to the main routine. On the other hand, in step S40, when it is determined that the values do not coincide, step S42 follows and the character string at and after the position in the buffer memory DB designated by the buffer cursor register DSR-POSI is moved backward by each one character. In next step S43, the character inputted through the keyboard KB is set in the position in the buffer memory DB designated by the buffer cursor register DSR-POSI. Then in step S44, a similar process as mentioned above is executed and the process routine returns to the main routine. The character input at the tab position can be carried out in a similar manner as the case at normal character positions due to the above-described key set process. FIGS. 33 to 35 show the centering key set processing procedure in step S23 in FIG. 30. In FIG. 17, CR(1) denotes a position of the cursor at a left position of the centering line and CR(2) indicates a position of the cursor at a right position of the centering line. FIG. 18 shows the contents of the registers when the cursor is located at the left position CR(l) in the centering line. In this case, "2" indicating that the cursor exists at a left position of the centering line (see Table 1) is set in the centering position information register INF-CN. The buffer cursor register DSR-POSI representing the cursor position in the buffer indicates the position "0" of the centering code .circle.CR (refer to FIG. 7). However, as shown in FIG. 17, the cursor on the display screen is not located at the position of " " indicating the centering code. The spaces of five characters which exist in the section between the displayed cursor position and the position of " " indicative of the start of centering exist as the deviation amount between the actual displayed cursor position and the internal cursor position. Consequently, "5" representing the deviation amount between the centering start code and the cursor is set in the deviation amount information register INF-POSI. Further, the space amount of "14" on the display screen from the display position of "L" indicative of the left margin to the head character of the centering start position " " is set in the register INF-CPOSI indicating the head position of the centering (see FIG. 17). When character "A" is inputted in the cursor position CR(1) in such a state as shown in FIG. 17, the display state becomes as shown in FIG. 19. The state of the buffer memory DB at this time changes as shown in FIG. 20-1 due to the key set process in FIG. 34. As described above, the input character "A" can be set in the left position of the centering character string without changing the display position of the character string "FREEBIE" that has already been subjected to the centering. On one hand, FIG. 20-2 shows an example of the buffer memory DB in the case where the special code indicative of a plurality of space codes is used. In this case as well, the display state is the same as FIG. 19. This centering key set process will now be explained with reference to the flow charts in FIGS. 33 and 34. FIG. 33 shows the overall centering key set processing procedure in step S23 in FIG. 30. First, in step S50, a check is made to see if the cursor is located at a left position of the centering or not by use of the value in the register INF-CN. If "YES" in step S50, the key set process at the left position of the centering is executed in step S51. If "NO", the key set process at the right position of the centering is executed in step S52, then the process routine will return to the main routine. When the cursor is located at a left position in the centering line, "2" is set in the register INF-CN, so that the discrimination in step S50 can be easily performed. FIG. 34 shows the details of the key set process at the left position of the centering in step S51 in FIG. 33. Now, assuming that the contents of the registers are as shown in FIG. 18 mentioned before, first in step S60, the buffer cursor register DSR-POSI designates the position "0" of the centering code .circle.CN , so that the centering code .circle.CN at this position is replaced with the space code. Next in step S61, the process to move the character string which was set in the buffer memory DB at and after the position "0" designated by the buffer cursor register DSR-POSI backward by each one character and the process to set the space code in the position of the buffer memory DB designated by the buffer cursor register DSR-POSI are repeatedly executed as many times as the value of "5" which was set in the deviation amount information register INF-POSI. In this case, if the special code indicative of a plurality of spaces is set in place of setting a plurality of space codes, the state of the buffer memory will become as shown in FIG. 20-2. Next in step S62, the input character code "A" inputted through the keyboard KB is set in the position "0" designated by the buffer cursor register DSR-POSI after moving the character string at and after the position indicated by the buffer cursor register DSR-POSI by one character in a similar manner as mentioned above. Further in step S63, the process to move the character string at and after the position designated by the buffer cursor register DSR-POSI backward by each one character and the process to set the space code in the position designated by the buffer cursor register DSR-POSI are repeatedly carried out as many times as the value "8" in the register CR-X indicative of the number of characters in the section from the cursor position to the left margin position, then the process routine returns to the main routine. Due to the execution of the above key set process, the contents of the buffer memory DB are changed as shown in FIG. 20-1 and displayed as shown in FIG. 19 (see FIG. 17). Then, the key set process when the cursor exists at a right position of the centering line will be explained. FIG. 21 shows the display state when character "X" was inputted in the cursor position CR(2) at the right position of the centering line in FIG. 17. In this case, the input character "X" is inputted and displayed at the right position of the centering without changing the display position of the character string "FREEBIE" which has been subjected to the centering. Although FIG. 22 shows the contents of the respective registers before this key set process is executed, "22" indicating the position of the carriage return code .circle.CR at the end of the centering line is set in the buffer cursor register DSR-POSI representative of the internal cursor position, while "3" indicating that the cursor exists at the right position of the centering line is set in the centering position information register INF-CN (refer to Table 1). Also, the deviation amount "4" between the displayed cursor position and the carriage return code .circle.CR is set in the deviation amount information register INF-POSI. The deviation amount "14" between the centering code .circle.CN and the left margin is set in the register INF-CPOSI. The key set process at the right position of the centering is executed using the above-mentioned cursor position information. FIG. 35 shows the details of the key set process at the right position of the centering in step S52 in FIG. 33. When it is now assumed that the contents of the registers are as shown in FIG. 22, first in step S70, the buffer cursor register DSR-POSI indicative of the position of the internal cursor shows the position "22" (see FIG. 17) of the carriage return code .circle.CR of the centering line. Therefore, after the character string in the buffer memory DB at and after the position designated by the buffer cursor register DSR-POSI was moved backward by each one character, the character inputted through the keyboard KB is set in the position designated by the buffer cursor register DSR-POSI. Next step S71 follows and the process to move the character at the position designated by the buffer cursor register DSR-POSI backward by one character and the process to set the space code in the position designated by the buffer cursor register DSR-POSI are repeatedly executed as many times as the value "4" in the register INF-POSI indicative of the deviation amount between the displayed cursor position and the position of the carriage return code .circle.CR . Subsequently in step S72, the process to search the position of the centering code .circle.CN in the buffer memory DB forward from the position designated by the buffer cursor register DSR-POSI is executed. The searched position "0" of the centering code .circle.CN is set as a new value in the buffer cursor register DSR-POSI. Next in step S73, the process to set the space code in the position designated by the buffer cursor register DSR-POSI and the process to move the character string at and after the position designated by the buffer cursor register DSR-POSI backward by each one character are repeated at the new position "0" designated by the buffer cursor register DSR-POSI as many times as the value "14" which was set in the deviation amount information register INF-POSI. Thereafter, the process routine returns to the main routine. The code .circle.CN is replaced with the space due to this process in step S73. As shown in FIG. 23, character "X" is set in the buffer memory DB due to the above procedure. In this way, the character input at the right position of the centering line can be performed without changing the display position of the character string that was subjected to the centering. However, the centering code .circle.CN does not exist in the buffer memory DB any more after those input processings have been once carried out, so that the same key set process as mentioned above regarding the same line is not executed again. The character input processing at a left position of the gathering will then be explained. FIG. 24 shows an example of the display screen when the cursor CR exists at a left position of the gathering. FIG. 25 shows the contents of the respective registers at this time, and "2" indicating that the cursor is located at a left position of the gathering is set in the register INF-GH (see Table 1), while the deviation amount "6" between the displayed position of the cursor CR and the gathering code .circle.GH is set in the register INF-POSI. FIG. 36 shows the details of the gathering key set process in step S27 in FIG. 30. When it is now assumed that the contents of the registers are as shown in FIG. 25 mentioned above, first in step S80, the gathering code .circle.GH at the position "185" designated by the buffer cursor register DSR-POSI is replaced by the space code. Next in step S81, the process to move the character string at and after the position designated by the buffer cursor register DSR-POSI backward by each one character and the process to set the space code in the position designated by the buffer cursor register DSR-POSI are repeatedly executed as many times as the value "6" which was set in the register INF-POSI. Subsequently in step S82, the character string at and after the position designated by the buffer cursor register DSR-POSI is further moved backward by each one character, then character "1" inputted through the keyboard KB is set in the position designated by the buffer cursor register DSR-POSI (see FIG. 26). Further, step S83 follows, and the process to move the character string at and after the position designated by the buffer cursor register DSR-POSI backward by each one character and the process to set the space code in the position designated by the buffer cursor register DSR-POSI are repeatedly performed as many times as the value "17" which was set in the register CR-X. Thereafter, the process routine returns to the main routine. The display state on the display screen becomes as shown in FIG. 26 and the contents of the buffer memory DB become as shown in FIG. 27 due to the above-described key set process. In this way, since the gathering code .circle.GH is replaced by the space code, the character input in the gathering line can be carried out without changing the display position of the gathering character string. FIG. 37 shows the details of the CRT display process shown in step S6 in FIG. 28. FIG. 38 shows the details of the cursor information check process shown in step S7 in FIG. 28. The CRT display process and cursor information check process can be performed by applying general technologies and they are not directly related to the invention; therefore, their detailed descriptions are omitted. In this embodiment, in the key set process in the special code line, the deviation amount between the cursor position on the screen and the position of the special code line in the buffer memory is replaced by the space code and set into the buffer memory. However, in place of this space code, the special code representing a plurality of spaces may be used as shown in FIG. 20-2. In case of using such a special code, the amount of memories which are set in the buffer memory can be reduced as compared with that when the space codes are used. Therefore, there is an advantage such that the buffer memory can be further effectively utilized.
|
Same subclass Same class Consider this |
||||||||||
