From 8fbe13f99d166184ddbc1cf685957f323b1f9bd9 Mon Sep 17 00:00:00 2001 From: Irmen de Jong Date: Fri, 29 Sep 2023 00:28:04 +0200 Subject: [PATCH] c64: $a5 removed from free ZP (it's actually used by kernal disk routines) --- codeCore/src/prog8/code/target/c64/C64Zeropage.kt | 4 ++-- docs/source/todo.rst | 1 - examples/test.p8 | 6 ++++++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/codeCore/src/prog8/code/target/c64/C64Zeropage.kt b/codeCore/src/prog8/code/target/c64/C64Zeropage.kt index dd3e70ac7..5f3bd194b 100644 --- a/codeCore/src/prog8/code/target/c64/C64Zeropage.kt +++ b/codeCore/src/prog8/code/target/c64/C64Zeropage.kt @@ -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 diff --git a/docs/source/todo.rst b/docs/source/todo.rst index 8676f8bee..8ed18b5fc 100644 --- a/docs/source/todo.rst +++ b/docs/source/todo.rst @@ -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 .... diff --git a/examples/test.p8 b/examples/test.p8 index 3a75d4feb..216f17f09 100644 --- a/examples/test.p8 +++ b/examples/test.p8 @@ -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")