Star Micronics XR-1020 Printer User Manual


 
Most BASICS, however, are not quite that straightforward. For example, the
IBM-PC will give you a printout similar to Figure 5-6.
Ffguts 5-6. Sample lwxadedmal dump with IBM-PC.
When the IBM-PC BASIC interpreter sends hex code OD (carriage return)
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 with
graphics or download character data. However, you can solve this problem
by changing line 30 in the preceding program and adding the coding shown
below.
Coding for IBM-PC with monochrome display:
30 GOSUB 100
100 X=INP (&H3BOJ
:IF X(128 THEN 100
110 OUT &H3BC,I
:OUT BH3BE.5 :OUT 8cH3BE.4
120 RETURN
Coding for IBM-PC with color adapter:
30 GOSUB 100
100 X=INP c&H3791 :IF X(128 THEN 100
110 OUT hH378.1
:OUT &H37A.5 :OUT aH37A.4
120 RETURN
49