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:
+1
-1
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user