cx16.vaddr_clone now leaves vera CTRL selected port intact

This commit is contained in:
Irmen de Jong 2023-11-17 16:35:33 +01:00
parent faf05582f8
commit 2637939e62
4 changed files with 10 additions and 16 deletions

View File

@ -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

View File

@ -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
}}
}

View File

@ -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 ....
...

View File

@ -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++
}
}
}