MostBASICS,however,arenotquitethatstraightforwardForexample,the. IBM-PCwill give you a printoutsimilarto Figure 2-6.

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . ,,. . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

I

Figura 2-6.Sample hexadecimal dump with IBM-PC

Whenthe IBM-PCBASICinterpretersendshex codeOD(carriagereturn) it adds an extra hex OA(line feed). Hex code 1A (end-of-file)also gets special treatment:the interpreterdoes not send it at all. This can cause problemswithgraphicsor downloadcharacterdata.However,youcansolve this problemby changingline 20 in the precedingprogramand addingthe codingshown below.

Codingfor IBM-PCwith monochromedisplay:

20 GOSUB 100

100 X=INP (&H3BP) : IF X<:128 THEN 100

110OUT &H3BC, I : OUT &H3BE, 5 : OUT &H3BE, 4

120RETURN

Codingfor IBM-PCwith color adapter:

20 GOSUB 100

100 X=INP (&H379) : IF X<128 THEN 100

110OUT &H378 , I : OUT &H37A, 5 : OUT &H37A,4

120RETURN

Page 38
Image 38
Star Micronics LC-200 user manual Return, Figura 2-6.Sample hexadecimal dump with IBM-PC