Abstract:
A printer comprises input keys for instructing predetermined characters and input keys for instructing the particular positions, wherein the instructed characters are printed in the particular positions.

Description:
This application is a continuation of application Ser. No. 894,742 filed Aug. 11, 1986, now abandoned, which in turn is a continuation of application Ser. No. 623,338, filed June 22, 1984, now abandoned. 
    
    
     BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates to a printer which can print particular characters in the positions designated. 
     2. Description of the Prior Art 
     In conventionally known printers, a tabulation function to align the print start positions is provided so that the print start positions may be easily designated. 
     However, to print the particular characters in desired positions, it is necessary to confirm the length of the character string and the positions of the particular characters and to key them in. 
     SUMMARY OF THE INVENTION 
     It is an object of the present invention to provide a printer which can print characters or the like designated in the positions designated in consideration of the above-mentioned point. 
     It is a specific object of the invention to provide a printer in which particular characters are printed in the position designated without considering the length of character string and the positions of the particular characters. 
     To accomplish the above objects, a printer according to the invention comprises first input means for instructing predetermined characters and second input means for instructing the particular positions, whereby the characters instructed by the first input means in the particular positions are printed. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a block diagram showing one embodiment of the present invention; 
     FIG. 2 is an explanatory diagram showing an example of printing according to the present embodiment; 
     FIG. 3 is an explanatory diagram showing the positions designated in the example of printing shown in FIG. 2; 
     FIG. 4 is a flowchart showing a method of designation by a printer; 
     FIG. 5 is an explanatory diagram showing the indication and the progressive state of printing; and 
     FIGS. 6A to 6C are flowcharts showing a control unit in the present embodiment. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT 
     The present invention will now be described in detail hereinbelow with reference to the drawings. 
     FIG. 1 is a block diagram showing one embodiment of the invention, in which a keyboard KB is provided with: numeric value keys K0 to K9; arbitrary character key group KC; a control key KS to designate the particular characters; a control key KP to designate the particular positions; an instruction key KD to instruct the start of inputting of a character string; an instruction key KE for allowing the particular characters to be printed in accordance with the positions designated; and other control keys (not shown). 
     KR denotes a register to store key information from the keyboard KB; DSP is a numeric value display; and CPU is a central processing unit. 
     A printer PRT moves from left to right relative to print paper P and performs printing using a serial print head H. Also, a memory M stores information from the CPU. 
     FIG. 2 shows an example of printing according to this embodiment. As shown in FIG. 3, the positions which are designated are specified P1 and P2 and it is assumed that the character of decimal point &#34;.&#34; is designated. A method of designating the print positions and a method of designating the print characters in the above-mentioned particular positions will be explained in accordance with FIGS. 3 and 4. 
     Firstly, the print head H is moved to the first desired position P1 (step S2) and the position designation control key KP is depressed (step S4). Thus, the CPU stores the position P1 into the memory M (step S6) in accordance with this operation. 
     Subsequently, the print head H is moved to the position P2 (step S8) and the position designation control key KP is depressed (step S10), then the position P2 is stored into the memory M (step S12) similarly to the storage of the position P1. 
     Next, by depressing the particular character instruction key KS and the decimal point key &#34;.&#34; in the character key group (steps S14 and S16), the decimal point &#34;.&#34; is stored as the particular character information into a latch L1 (step S18). 
     Due to the above operations, the designated positions P1 and P2 are stored into the memory M and the particular position print character information &#34;.&#34; is stored into the latch L1. 
     FIG. 5 shows the indication and the progressive state of printing. 
     The operation of this embodiment will now be described hereinbelow in conjunction with FIGS. 5 and 6A to 6C. In this case, as shown in FIGS. 3 and 4, the designated positions P1 and P2 and the designated character &#34;.&#34; are preset. First of all, the print head H is moved to a desired position (to the left end) (step S20). Then, the depression of the character string input start instruction key KD (step S22) allows the CPU to read out the position P1 designated adjacent the right side of the print head H from the memory M and to calculate the position number &#34;6&#34; from the position of the print head H to the designated position P1 (steps S24 and S26). The result calculated is stored into a latch L2 in the CPU (step S28.) 
     By depressing the numeric value key K1 (step S30), a numeric value &#34;1&#34; is stored into the register KR (step S32) and is indicated in the display DSP (step S34). At this time, the CPU compares the numeric value &#34;1&#34; represented by the key depressed with the contents of the latch L1 (step S36); however, since it is not the designated character, the number of &#34;1&#34; of depressions is stored into a counter C for storing the number of times of depression of the numeric value key (step S38). 
     Subsequently, by depressing the numeric value key K2 (step S40), a numeric value &#34;2&#34; is stored into the register KR (step S42) similarly to the depression of the numeric value key K1 and &#34;2&#34; is indicated in the display DSP (step S44). In addition, at this time, the count value of the counter C for counting the number of times of depression becomes &#34;2&#34; (steps S46 and S48). 
     Next, by depressing the decimal point key of &#34;.&#34; as the designated character (step S50), a decimal point &#34;.&#34; is stored into the register KR (step S52) similarly to a numeric value &#34;12&#34;, so that &#34;12.&#34; is displayed in the display DSP (step S54) as shown in II of FIG. 5. The CPU also compares &#34;.&#34; the contents of the latch L1 similarly to the cases of numeric values &#34;1&#34; and &#34;2&#34; (step S56). When the content of the key depressed coincides with the designated character, the CPU stops the counting operation of the counter C (step S58). 
     Further, by inputting numeric values &#34;34&#34; by use of the numeric value keys, &#34;12.34&#34; is displayed in the display DSP as shown in III of FIG. 5 (steps S60 to S70). 
     Thereafter, by depressing the instruction key KE (step S72), the CPU performs the processing to subtract the contents &#34;2&#34; of the counter C from a numeric value &#34;6&#34; stored in the latch L2 and calculates &#34;4&#34; as the subtracted result (step S74). The CPU moves the print head H from the present position to the fourth position and allows it to print a numeric value &#34;1&#34; in that position. Then, the CPU moves the head H to the right by one position, thereby printing a numeric value &#34;2&#34;. It further moves the head to the right by one position, thereby printing the designated character &#34;.&#34; in the designated position P1. Similarly, the print head H is moved to the right by one position at a time, so that &#34;3&#34; and &#34;4&#34; are sequentially printed (step S76). Although the contents of the counter C and latch L2 are cleared due to this (step S78), the contents &#34;.&#34; of the latch L1 are still maintained. 
     Subsequently, by depressing the character string input start instruction key KD (step S80), the CPU reads the designated position P2 on the right side of the head H from the memory M (step S82) and calculates the position number &#34;12&#34; from the position of the print head H to the designated position P2 (step S84). The result of the calculation is stored into the latch L2 in the CPU (step S86). 
     By depressing the numeric key K1 (step S88), a numeric value &#34;1&#34; is stored into the register KR (step S90) and is displayed in the display DSP (step S92). At this time, the CPU compares &#34;1&#34; represented by the key depressed with the contents of the latch L1 and &#34;1&#34; is stored into the counter C (step S94) on the basis of the result of the comparison. 
     Further, when numeric values &#34;2345&#34; are input using the numeric value keys (step S98), the CPU performs the comparision regarding each numeric value with the contents of the latch L1 and stores the numeric values into the register KR (step S100). Then, the CPU displays those numeric values in the display DSP (step S102) and stores &#34;5&#34; into the counter C (step S104). By depressing the decimal point &#34;.&#34; as the designated character (step S106), the CPU stores the decimal point &#34;.&#34; into the register KR (step S108); displays it in the display DSP (step S110); performs the comparison processing with the contents of the latch L1; and stops the operation of the counter C on the basis of the result of the comparision (step S112). Subsequently, when numeric values &#34;67&#34; are input (step S114), the numeric values are indicated as shown in IV of FIG. 5 (step S116 and S118). 
     Now, the depression of the instruction key KE (step S120) allows the CPU to perform the processing to subtract the contents &#34;5&#34; of the counter C from numeric values &#34;12&#34; stored in the latch L2 and to calculate &#34;7&#34; as the subtracted result (step S122). The CPU moves the print head H from the present position (the position of &#34;4&#34; where the printing was previously done) to the seventh position, thereby printing a numeric value &#34;1&#34; in this position. Then, the CPU moves the head to the right by one position to print a numeric value &#34;2&#34;. Similarly, numeric values &#34;345&#34; are printed and the designated character &#34;.&#34; is printed in the designated position P2. Numeric values &#34;67&#34; are also similarly printed, so that the print as shown in V of FIG. 5 is obtained (step S124). At this time, although the contents of the latch L2 and counter C are cleared similarly to the case where &#34;12.34&#34; was previously printed (step S126), the contents of the latch L1 are still maintained. 
     By depressing some control keys thereafter, the print paper P is fed by only one line and the print head H is moved to the left end. 
     Subsequently, when the character string input start instruction key KD is depressed and the character information &#34;7654.32&#34; which is printed is input, the CPU reads out P1 from the memory M and sets it into the designated position in the same manner as in the case where &#34;12.34&#34; was printed and sets the characters maintained in the latch L1 into the designated characters, then the CPU executes the similar processings as the above. In addition, by depressing the instruction key KE, the CPU performs the processing to subtract the contents &#34;4&#34; of the counter C from the content &#34;6&#34; of the latch L2; calculates &#34;2&#34; as the subtraction result; moves the print head H from the present position to the second position; and allows the head to print &#34;7654.32&#34; in the manner as described above.