aboutsummaryrefslogtreecommitdiff
path: root/io.s
diff options
context:
space:
mode:
Diffstat (limited to 'io.s')
-rw-r--r--io.s9
1 files changed, 7 insertions, 2 deletions
diff --git a/io.s b/io.s
index 7b63f95..6968aa4 100644
--- a/io.s
+++ b/io.s
@@ -26,7 +26,9 @@ printchr:
; Subroutine: getchr
;
; Read ATASCII character from keyboard, return in A, without
- ; preserving registers.
+ ; preserving registers. On return, Y = 1 on success. On error,
+ ; Y will contain the error number (probably 128 for Break key or
+ ; 136 for EOF). Note that getchrx does NOT return the error code in Y!
;
; Uses the published and immutable KEYBDV address in the ROM, meaning
; it (a) doesn't require an IOCB open to the K: device, and (b)
@@ -111,12 +113,15 @@ printchrx:
; Actually, the return value here is also in Y, if you can think of a
; use for that.
;
+ ; Note: The CIO error code is NOT returned in Y! Use getchr if you
+ ; need that.
+ ;
; Calls getchr.
;
getchrx:
txa ; save X,
pha ; on stack.
- jsr getchr ; get the character.
+ jsr getchr ; get the character.
tay ; save A (our return value).
pla ; restore X,
tax ; from stack.