MostBASICS,however,arenotquitethatstraightforward.Forexample,the
IBM-PCwillgive youaprintoutsimilarto Figure 2-6.
................
................
.. . . . . . ,,. . . . . . . .
................
................
................
................
................
I
Figura2-6. Sample hexadecimal dump with IBM-PC
Whenthe IBM-PCBASICinterpretersendshexcode OD(carriagereturn)
it addsan extra hex OA (linefeed). Hex code 1A (end-of-file)also gets
specialtreatment: theinterpreter doesnot send it at all. This can cause
problemswithgraphicsordownloadcharacterdata.However,youcansolve
thisproblemby changingline 20in the precedingprogramandaddingthe
codingshownbelow.
Codingfor IBM-PCwith monochromedisplay:
20 GOSUB 100
100 X=INP (&H3BP):IF X<:128 THEN 100
110 OUT &H3BC,I:OUT &H3BE,5:OUT &H3BE,4
120 RETURN
Codingfor IBM-PCwith coloradapter:
20 GOSUB 100
100 X=INP (&H379) :IF X<128 THEN 100
110 OUT &H378,I:OUT &H37A,5:OUT &H37A,4
120 RETURN