Star Micronics XR-1520, XR-1020 manual Coding for IBM-PC with monochrome display

Models: XR-1520 XR-1020

1 110
Download 110 pages 41.66 Kb
Page 57
Image 57
Coding for IBM-PC with monochrome display:

Most BASICS, however, are not quite that straightforward. For example, the IBM-PC will give you a printout similar to Figure 5-6.

Ffguts5-6.SamplelwxadedmaldumpwithIBM-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

Page 57
Image 57
Star Micronics XR-1520, XR-1020 manual Coding for IBM-PC with monochrome display