EasyManua.ls Logo

Atari ST series - Page 252

Atari ST series
420 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Cprnout
Send Character to Printer
Cprnout()
Opcode = 5 ($05)
T his fu nctio n s e n d s a sin gle ch a r a cte r to th e C e n tron ics p arallel p rin te r d e
v ice. It d o es n o t retu rn un til th e ch ara cter h as b e en se n t, o r th e p rin ter
tim es ou t.
C macro format
ch a r ch ;
in t sta tu s;
statu s = C p rn o u t(ch );
Machine language format
m o v e .w # c h , - (sp )
m o v e.w # 5 , - ( s p )
trap # 1
a d d q .l # 4 ,s p
Inputs
ch
w o rd
T h e low b y te co n tain s th e A SC II v a lu e of
th e ch a ra cte r to w rite to th e p rin te r p o rt,
th e h ig h b yte is 0.
Results
sta tu s
w o rd
A v alu e o f - 1 is re tu rn ed if th e c h ara cte r
h as b ee n se n t co rrectly , a 0 if th e ch a ra c
te r c a n 't be s en t w ith in th e time out p e
rio d (tim e o u t pe rio d refers to th e co n d i
tion w h en th e p ap er ru n s o u t, th e p rin ter
is offline, a n d so on ).
See also
C p m o s (), C p m o u t (), C c o n o u t ()
n e w p ag e
244