diff --git a/compiler/res/prog8lib/atari/textio.p8 b/compiler/res/prog8lib/atari/textio.p8 index cdc0b4268..393c585fe 100644 --- a/compiler/res/prog8lib/atari/textio.p8 +++ b/compiler/res/prog8lib/atari/textio.p8 @@ -1,4 +1,5 @@ ; Prog8 definitions for the Text I/O and Screen routines for the Atari 800XL +; Reference: https://www.atariarchives.org/mapping/appendix12.php %import syslib %import conv diff --git a/compiler/res/prog8lib/cx16/syslib.p8 b/compiler/res/prog8lib/cx16/syslib.p8 index e661d32ee..96e675a64 100644 --- a/compiler/res/prog8lib/cx16/syslib.p8 +++ b/compiler/res/prog8lib/cx16/syslib.p8 @@ -567,7 +567,6 @@ asmsub vaddr(ubyte bank @A, uword address @R0, ubyte addrsel @R1, byte autoIncrO asmsub vaddr_clone(ubyte port @A) clobbers (A,X,Y) { ; -- clones Vera addresses from the given source port to the other one. - ; leaves CTRL on the destination port. %asm {{ sta VERA_CTRL ldx VERA_ADDR_L @@ -580,6 +579,8 @@ asmsub vaddr_clone(ubyte port @A) clobbers (A,X,Y) { sty VERA_ADDR_M ply sty VERA_ADDR_H + eor #1 + sta VERA_CTRL rts }} } diff --git a/docs/source/todo.rst b/docs/source/todo.rst index dbfd61680..8ca1b804d 100644 --- a/docs/source/todo.rst +++ b/docs/source/todo.rst @@ -4,6 +4,8 @@ TODO - fix discord string bug for if key!="." : "ERROR undefined symbol: prog8_interned_strings.string_3" +- txt.waitkey() should return the pressed key? Also on atari. + - [on branch: shortcircuit] investigate McCarthy evaluation again? this may also reduce code size perhaps for things like if a>4 or a<2 .... ... diff --git a/examples/test.p8 b/examples/test.p8 index 9803acd92..a63f99df0 100644 --- a/examples/test.p8 +++ b/examples/test.p8 @@ -1,21 +1,11 @@ -%zeropage basicsafe %import textio -%import emudbg main { sub start() { - txt.print("is emulator? ") - txt.print_ub(emudbg.is_emulator()) - txt.nl() - - emudbg.console_write(iso:"Hello from emulator.\n") - emudbg.console_chrout(iso:'1') - emudbg.console_chrout(iso:'2') - emudbg.console_chrout(iso:'3') - emudbg.console_chrout(iso:'\n') - emudbg.console_value1(123) - emudbg.console_chrout(iso:'\n') - emudbg.console_value2(42) - emudbg.console_chrout(iso:'\n') + str key = "test" + txt.print(":") + if key != ":" { + cx16.r0++ + } } }