Atari ST series Technical Reference Manual page 255

Hide thumbs Also See for ST series:
Table of Contents

Advertisement

Keyboard Input Without Echo
Cnecin()
T h is f u n c t i o n w a i t s u n til a c h a r a c t e r is a v a i la b l e f r o m t h e c o n s o l e k e y ­
b o a r d , d o e s n o t e c h o t h e c h a r a c t e r t o t h e s c r e e n , a n d r e t u r n s it s A S C I I
v a l u e a n d s c a n c o d e . T h is f u n c t i o n is id e n ti c a l to C r a w c i n ( ) , t h o u g h th e
d o c u m e n t a t i o n s t a t e s t h a t it d i f f e r s f r o m t h a t f u n c t i o n in t h a t C n e c i n ( ) a c t s
o n c o n t r o l c o d e s lik e C o n t r o l - S , C o n t r o l - Q , a n d C o n t r o l - C , i n s t e a d o f p a s s ­
i n g t h e s e c o d e s o n , lik e C r a w c i n ( ). A t l e a s t in c u r r e n t T O S v e r s i o n s , h o w ­
e v e r , C n e c i n ( ) p a s s e s t h e s e c o d e s o n a ls o .
C macro format
l o n g k e y c o d e ;
k e y c o d e =
C n e c i n ( );
Machine language format
m o v e . w
# 8 , - ( s p )
t r a p
# 1
a d d q .l
# 2 , s p
Inputs
N o n e
Results
DO
k e y c o d e
See also
C c o n i n ( ) , C r a w c i n ( ) , C r a w c i o ( )
l o n g
A l o n g w o r d t h a t c o n t a i n s b o t h t h e A S C I I v a l u e o f
t h e k e y ( s ) p r e s s e d , a n d t h e s c a n c o d e . T h e A S C I I
v a l u e is r e t u r n e d in t h e l o w b y t e o f t h e lo w w o r d
keycode
o f
l o w b y t e o f t h e h i g h w o r d . S e e A p p e n d i x J f o r a
c o m p l e t e li s t o f k e y c o d e s .
Cnecin
, w h ile t h e s c a n c o d e is r e t u r n e d in th e
Opcode = 8 ($08)
247

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents