Star Micronics LC-20 Printer User Manual


 
MostBASICS,however,arenotquitethatstraightfonvard.Forexample,the
IBM-PC willgiveyou a printoutsimilarto Figure2-5.
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
! 4+$%!%’( ) x+, -. /
O123456789: : .::=::.?
@ABCDEFGHIJF::LMNO
PQF:STLIVWXYZ [ \ 1‘“’-
abcde+g h i j l:.1mno
pqh.5tLlVW>:yZ : : ]+.
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . ..
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . .. . . . . . . . . .
“.
Figure2-5. Sample hexadecimal dump with IBM-PC
WhentheIBM-PCBASICinterpretersendshex codeOD(carriagereturn)
it adds an extra hex OA(line feed). Hex code 1A (end-of-fde)also gets
specialtreatment: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 O==INP(&H3BD) : IF 0<128 THEN 100
110 OUT &H3BC, I
:OUT &H3BE,5
:OUT &H3BE,4
1204 RETURN
Codingfor IBM-PCwithcoloradapter:
20 GOSUB 100
100 O=INP (&H379 )
: IF 0<128 THEN 100
110 OUT &H378, I
:OUT &H37A, 5
:OUT &H37A, 4
120 RETURN
ill