Atari ST series Technical Reference Manual page 252

Hide thumbs Also See for ST series:
Table of Contents

Advertisement

Send Character to Printer
Cprnout()
T h is f u n c t i o n s e n d s a s in g le c h a r a c t e r t o t h e C e n t r o n i c s p a r a lle l p r i n t e r d e ­
v i c e . I t d o e s n o t r e t u r n u n til th e c h a r a c t e r h a s b e e n s e n t , o r th e p r i n t e r
ti m e s o u t .
C macro format
c h a r c h ;
in t s t a t u s ;
s t a t u s =
C p r n o u t ( c h ) ;
Machine language format
m o v e . w
# c h , - ( s p )
m o v e . w
# 5 , - ( s p )
t r a p
# 1
a d d q .l
# 4 , s p
Inputs
c h
w o r d
Results
s t a t u s
w o r d
See also
C p m o s ( ) , C p m o u t ( ) , C c o n o u t ( )
n e w p a g e
244
Cprnout
T h e l o w b y t e c o n t a i n s th e A S C I I v a l u e o f
t h e c h a r a c t e r to w r i t e t o t h e p r i n t e r p o r t ,
th e h i g h b y t e is 0 .
A v a l u e o f - 1
is r e t u r n e d if th e c h a r a c t e r
h a s b e e n s e n t c o r r e c t l y , a 0 if t h e c h a r a c ­
t e r c a n ' t b e s e n t w i th i n t h e
r io d ( t i m e o u t p e r i o d r e f e r s to t h e c o n d i ­
ti o n w h e n t h e p a p e r r u n s o u t , t h e p r i n t e r
is o f f lin e , a n d s o o n ).
Opcode = 5 ($05)
time out
p e ­

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents