Star Micronics LC-200 Printer User Manual


 
MostBASICS,however,arenotquitethatstraightforward.Forexample,the
IBM-PCwillgiveyou a printoutsimilarto Figure2-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
problemswithgraphicsordownloadcharacterdata.However,youcansolve
thisproblemby changingline20 in theprecedingprogramandaddingthe
codingshownbelow.
Codingfor IBM-PCwithmonochromedisplay:
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-PCwithcoloradapter:
20 GOSUB 100
100 X=INP (&H379)
: IF X<128
THEN 100
110
OUT &H378 , I : OUT &H37A, 5 :OUT &H37A,4
120 RETURN