From 36dcaa5343f1abbf76df9e34f25a61d322eb9388 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Mon, 14 Nov 2022 18:12:54 -0500 Subject: v0.3.1: dla.xex: handle Break and EOF at prompts. --- io.s | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'io.s') 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. -- cgit v1.2.3