Commodore 128 Programmer's Reference Manual page 448

Hide thumbs Also See for 128:
Table of Contents

Advertisement

438
COMMODORE 128
RESULTS:
Registers:
Memory:
Flags:
EXAMPLE:
JSR $FFE1
BEQ stop
.A = last keyboard row
.X = used (if STOP key)
none
status valid
;scan STOP key
;branch if down
i !
STOP checks a Kernal variable STKEY ($91), which is updated by UDTIM
during normal IRQ processing and contains the last scan of keyboard column C7.
The STOP key is bit 7, which will be 0 if the key is down. If it is, default I/O
channels are restored via CLRCH and the keyboard queue is flushed by resetting
NDX ($D0). The keys on keyboard line C7 are:
Bit:
Key:
7
STOP
6
Q
5
4
SPACE
3
2
2
CTRL
1
«-
0
1
ij
The path to STOP is through an indirect RAM vector at $328. Applications
may therefore provide their own STOP procedures or supplement the system's by
redirecting this vector to their own routine.
34. $FFE4 GETIN ;read buffered data
PREPARATION:
Registers:
Memory:
Hags:
Calls:
RESULTS:
Registers:
Memory:
Flags:
EXAMPLE:
wait JSR $FFE4
BEQ wait
STA character
none
system map
none
CHKIN (if necessary)
.A = character (or error code)
.X used
.Y used
STATUS, RSSTAT updated
.C = 1 if error
;get any key
ii
\ I
GETIN reads a character from the current input device (DFLTN ($99)) buffer
and returns it in .A. Input from devices other than the keyboard (the default input
device) must be OPENed and CHKINed. The character is read from the input buffer
associated with the current input channel:
u
u

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents