c64: $a5 removed from free ZP (it's actually used by kernal disk routines)

This commit is contained in:
Irmen de Jong 2023-09-29 00:28:04 +02:00
parent 452e9e275f
commit 8fbe13f99d
3 changed files with 8 additions and 3 deletions

View File

@ -53,11 +53,11 @@ class C64Zeropage(options: CompilationOptions) : Zeropage(options) {
).map{it.toUInt()})
}
if(options.zeropage!= ZeropageType.DONTUSE) {
if(options.zeropage != ZeropageType.DONTUSE) {
// add the free Zp addresses
// these are valid for the C-64 but allow BASIC to keep running fully *as long as you don't use tape I/O*
free.addAll(listOf(0x02, 0x03, 0x04, 0x05, 0x06, 0x0a, 0x0e,
0x92, 0x96, 0x9b, 0x9c, 0x9e, 0x9f, 0xa5, 0xa6,
0x92, 0x96, 0x9b, 0x9c, 0x9e, 0x9f, 0xa6,
0xb0, 0xb1, 0xbe, 0xbf, 0xf9).map{it.toUInt()})
} else {
// don't use the zeropage at all

View File

@ -1,7 +1,6 @@
TODO
====
- fix c64 diskio.f_write optimizer issue (in test.p8)
- why is petscii \n translated to $8d and not $0d? and \r IS translated to $0d?
- add a compiler switch to replace all calls to the math word mul routine on the X16 by the verafx call instead.
- [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

@ -7,6 +7,12 @@
main {
sub start() {
txt.print("\\r=")
txt.print_ub('\r')
txt.print(" and \\n=")
txt.print_ub('\n')
txt.nl()
ubyte[256] buf
void diskio.delete("lines.txt")