diff --git a/codeCore/src/prog8/code/target/pet/PETZeropage.kt b/codeCore/src/prog8/code/target/pet/PETZeropage.kt index 522f9d352..7889f36dc 100644 --- a/codeCore/src/prog8/code/target/pet/PETZeropage.kt +++ b/codeCore/src/prog8/code/target/pet/PETZeropage.kt @@ -53,6 +53,6 @@ class PETZeropage(options: CompilationOptions) : Zeropage(options) { } override fun allocateCx16VirtualRegisters() { - TODO("Not known if C128 can put the virtual regs in ZP") + TODO("Not known if PET can put the virtual regs in ZP") } } \ No newline at end of file diff --git a/codeGenCpu6502/src/prog8/codegen/cpu6502/assignment/AugmentableAssignmentAsmGen.kt b/codeGenCpu6502/src/prog8/codegen/cpu6502/assignment/AugmentableAssignmentAsmGen.kt index b126b1646..bbc9dd5c1 100644 --- a/codeGenCpu6502/src/prog8/codegen/cpu6502/assignment/AugmentableAssignmentAsmGen.kt +++ b/codeGenCpu6502/src/prog8/codegen/cpu6502/assignment/AugmentableAssignmentAsmGen.kt @@ -57,9 +57,8 @@ internal class AugmentableAssignmentAsmGen(private val program: PtProgram, // the asm-gen code can deal with situations where you want to assign a byte into a word. // it will create the most optimized code to do this (so it type-extends for us). // But we can't deal with writing a word into a byte - explicit typeconversion should be done - if(program.memsizer.memorySize(value.datatype) > program.memsizer.memorySize(target.datatype)) { - TODO("missing type cast: value type > target type ${target.position}") - } + if(program.memsizer.memorySize(value.datatype) > program.memsizer.memorySize(target.datatype)) + throw AssemblyError("missing type cast: value type > target type ${target.position}") fun regName(v: AsmAssignSource) = "cx16.${v.register!!.name.lowercase()}" diff --git a/compiler/res/prog8lib/cx16/syslib.p8 b/compiler/res/prog8lib/cx16/syslib.p8 index 8530972d1..a7d078ed9 100644 --- a/compiler/res/prog8lib/cx16/syslib.p8 +++ b/compiler/res/prog8lib/cx16/syslib.p8 @@ -395,6 +395,7 @@ romsub $febd = kbdbuf_peek() -> ubyte @A, ubyte @X ; key in A, queue length romsub $febd = kbdbuf_peek2() -> uword @AX ; alternative to above to not have the hassle to deal with multiple return values romsub $fec0 = kbdbuf_get_modifiers() -> ubyte @A romsub $fec3 = kbdbuf_put(ubyte key @A) clobbers(X) +romsub $fed2 = keymap(uword identifier @XY, bool read @Pc) -> bool @Pc romsub $ff68 = mouse_config(ubyte shape @A, ubyte resX @X, ubyte resY @Y) clobbers (A, X, Y) romsub $ff6b = mouse_get(ubyte zpdataptr @X) -> ubyte @A romsub $ff71 = mouse_scan() clobbers(A, X, Y) @@ -403,10 +404,10 @@ romsub $ff56 = joystick_get(ubyte joynr @A) -> ubyte @A, ubyte @X, ubyte @Y romsub $ff56 = joystick_get2(ubyte joynr @A) clobbers(Y) -> uword @AX ; alternative to above to not have the hassle to deal with multiple return values ; Audio (rom bank 10) -romsub $C04B = psg_init() clobbers(A,X,Y) +romsub $C04B = psg_init() clobbers(A,X,Y) ; (re)init Vera PSG romsub $C063 = ym_init() clobbers(A,X,Y) -> bool @Pc ; (re)init YM chip romsub $C066 = ym_loaddefpatches() clobbers(A,X,Y) -> bool @Pc ; load default YM patches -romsub $C09F = audio_init() clobbers(A,X,Y) -> bool @Pc ; (re)initialize PSG and YM audio chips +romsub $C09F = audio_init() clobbers(A,X,Y) -> bool @Pc ; (re)initialize both vera PSG and YM audio chips ; TODO: add more of the audio routines? diff --git a/compiler/src/prog8/compiler/astprocessing/NotExpressionAndIfComparisonExprChanger.kt b/compiler/src/prog8/compiler/astprocessing/NotExpressionAndIfComparisonExprChanger.kt index 4259fc961..ee063532d 100644 --- a/compiler/src/prog8/compiler/astprocessing/NotExpressionAndIfComparisonExprChanger.kt +++ b/compiler/src/prog8/compiler/astprocessing/NotExpressionAndIfComparisonExprChanger.kt @@ -143,8 +143,6 @@ internal class NotExpressionAndIfComparisonExprChanger(val program: Program, val private fun simplifyConditionalExpression(expr: BinaryExpression): CondExprSimplificationResult { - // TODO: somehow figure out if the expr will result in stack-evaluation STILL after being split off, - // in that case: do *not* split it off but just keep it as it is (otherwise code size increases) // NOTE: do NOT move this to an earler ast transform phase (such as StatementReorderer or StatementOptimizer) - it WILL result in larger code. if(compTarget.name == VMTarget.NAME) // don't apply this optimization for Vm target diff --git a/gradle.properties b/gradle.properties index 9d0a920cf..8457bfbf4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,4 +5,4 @@ org.gradle.daemon=true kotlin.code.style=official javaVersion=11 kotlinVersion=1.9.10 -version=9.5-SNAPSHOT +version=9.4.1