Star Micronics NX-2410 Printer User Manual


 
If your system passes the codes directly to the printer without changing
them, you will get a printout like Figure 2-3.
00 01 02 03 04 05 06 07 08 09 OA 08 OC OD OE OF
10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F
20 21 22 23 24 25 26 27
28 29 2A 25 2C 2D 2E 2F
30 31 32 33 34 35 36 37 38 39 3A 38 3C 3D 3E 3F
40 41 42 43 44 45 46 47 48 49 4A 48 4C 40 4E 4F
50 51 52 53 54 55 56 57 58 59 5A 58 5C 5D 5E 5F
60 61 62 63 64 65 66 67 68 69 6A 66 6C 6D 6E 6F
70 71 72 73 74 75 76 77 78 79 7A 78 7C 7D 7E 7F
80 81
82 83 84 85 86 07 88 89 8A 88 8C 8D 8E 8F
90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F
A0 Al A2 A3 A4 A5 A6 A7
A8 A9 AA AB AC AD AE AF
BO 81 B2 83 84 85 86 87 88 B9 BA BB BC BD BE BF
CO Cl C2 C3 C4 C5 C6 C7
C8 C9 CA CB CC CD CE CF
DO Dl D2 D3 04 D5 06 07 08 D9 DA DB DC DD DE DF
EO El E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF
FO Fl F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF
. . .
OD OA
‘;,;#i&&; ;j;;;;:;
01234567 89::<=>?
@ABCDEFG HIJKLMNO
PQRSTLJVW XYZ[\]--
‘abcdefg hijklmno
pqrstuvw xyz{;)-o
. . . . . .
. . . . . . .
. . . . . . . .
. . . . . . .
.
. . . . . . . .
Figure 2-3. Sample hexadecimal dump
Most BASICS, however, are not quite that straightforward. For example,
the IBM-PC prints the following.
00 01 02 03
04 05 06 07 08 09 OA
08 OC 00 OA OE . . . . . . . . . . .
OF 10 11 12
13 14 15 16 17 18 19
1B 1C 1D 1E 1F _....... .
20 21 22 23 24 25 26 27 28 29 2A 28 2C 2D 2E 2F !"#I$%&' ox+.-./
30 31 32 33 34 35 36 37 38 39 3A 38 3C 30 3E 3F 01234567 89::<=>?
40 41 42 43 44 45 46 47 48 49 4A 48 4C 4D 4E 4F @ABCDEFG HIJKLMNO
50 51 52 53 54 55 56 57 58 59 5A 58 5C SD 5E 5F PQRSTUVW XYZ[\I--
60 61 62 63 64 65 66 67 68 69 6A 68 6C 6D 6E 6F ‘abcdefg hi jklmno
70 71 72 73 74 75 76 77 78 79 7A 78 7C 70 7E 7F pqrstuvw xyz{l)-o
80 81 82 83
84 05 86 07 08 09 8A
88 8C 8D 8E 8F ___..... . . .
90 91 92 93
94 95 96 97 96 99 9A
98 9C 9D 9E 9F . . . . .
A0 Al A2 A3
A4 A5 A6 A7 A8 A9 AA
AB AC AD AE AF I....... . . .
BO 81
82 83 84 B5 86 87 88 B9 BA Ba BC BD BE BF
CO Cl C2 C3 C4 C5 C6 C7
C8 C9 CA CB CC CD CE CF
:::::::I ::::::::
DO Dl D2 D3
D4 D5 D6 D7 DE D9 DA
DB DC DD DE DF __...... . . .
EO El EZ E3
E4 E5 E6 E7 E8 E9 EA
EB EC ED EE EF _____... . .
FO Fl F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF . . . . . . . . . . . . .
OD OA
Figure 2-a. Sample hexadecimal dump with IBM-PC
When the IBM-PC BASIC interpreter sends hex code OD (carriage re-
turn) it adds an extra hex OA (line feed). Hex code 1A (end-of-file) also gets -
special treatment: the interpreter does not send it at all. This can cause
problems in programs that generate graphics or download character data,
but there is a solution. Try changing line 20 in the preceding program and
adding the coding shown below.
Coding for IBM-PC with monochrome display:
20 GOSUB 100
100 O=INP(&H3BD)
:IF 0<128 THEN 100
110 OUT &H3BC,I :OUT &H3BE,5 :OUT &H3BE,4
120 RETURN
24