Atari ST series Technical Reference Manual page 253

Hide thumbs Also See for ST series:
Table of Contents

Advertisement

Input/Output Console Character
Crawio()
T h is f u n c t i o n a l l o w s y o u e i t h e r t o s e n d c h a r a c t e r s t o t h e c o n s o l e d e v i c e , o r
to r e c e i v e t h e m . T h e r e c e i v e c h a r a c t e r p o r t i o n o f t h e f u n c t i o n d o e s n o t
w a i t f o r a c h a r a c t e r t o b e c o m e a v a i l a b l e , b u t r e t u r n s im m e d i a t e l y w h e t h e r
o r n o t o n e w a s r e c e i v e d .
C macro format
in t c h i n , c h o u t ;
c h i n =
C r a w i o ( c h o u t ) ;
Machine language format
m o v e . w
c h o u t , - (s p )
m o v e . w
# 6 , - ( s p )
t r a p
# 1
a d d q .l
# 4 , s p
Inputs
c h o u t
w o r d
Results
DO
c h i n
w o r d
Crawio
T h e l o w b y t e o f th is w o r d e i t h e r c o n t a i n s
a n A S C I I c h a r a c t e r 0 - 2 5 4 t o s e n d t o th e
s c r e e n , o r a v a l u e o f 2 5 5 , w h i c h in d i c a t e s
t h a t a c h a r a c t e r is to b e r e c e i v e d .
chout
I f
w a s s e t t o 2 5 5 , t h e v a l u e o f t h e c h a r a c t e r r e a d
f r o m t h e k e y b o a r d is r e t u r n e d h e r e . If n o c h a r a c t e r
w a s a v a i la b l e , a 0 is r e t u r n e d in b o t h b y t e s . If a c h a r ­
a c t e r c a n b e r e a d , t h e l o w b y t e c o n t a i n s it s A S C I I
v a l u e , a n d t h e h i g h b y t e c o n t a i n s it s s c a n c o d e .
Opcode = 6 ($06)
245

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents