1
0
mirror of https://github.com/KarolS/millfork.git synced 2026-04-20 03:16:45 +00:00

Implement readkey and readline for Apple II

This commit is contained in:
Karol Stasiak
2020-04-08 11:11:25 +02:00
parent 29335d376a
commit cd5e9decac
10 changed files with 35 additions and 9 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
[compilation]
arch=strict
encoding=apple2
modules=apple2_kernel,default_panic,stdlib
modules=apple2_kernel,default_panic,stdlib,default_readword
lenient_encoding=true
+13
View File
@@ -10,3 +10,16 @@ asm void bell() @$FBE4 extern
asm void putchar(byte register(a) char) @$FDED extern
asm void new_line() @$FC62 extern
asm pointer readline() {
jsr $FD6A
ldx #$ff
__readline_loop:
inx
lda $200,x
cmp #$8d
bne __readline_loop
lda #0
sta $200,x
ldx #2
rts
}
+6
View File
@@ -112,6 +112,12 @@ noinline asm byte readkey() {
#endif
#if APPLE_2
asm byte readkey() @$FD0C extern
#define OK = 1
#endif
#if NEC_PC_88
asm byte readkey() @$3583 extern
#define OK = 1