diff --git a/compiler/test/codegeneration/TestVariousCodeGen.kt b/compiler/test/codegeneration/TestVariousCodeGen.kt index 59740a45d..5919f9aca 100644 --- a/compiler/test/codegeneration/TestVariousCodeGen.kt +++ b/compiler/test/codegeneration/TestVariousCodeGen.kt @@ -1,7 +1,6 @@ package prog8tests.codegeneration import io.kotest.core.spec.style.FunSpec -import io.kotest.matchers.collections.shouldContain import io.kotest.matchers.ints.shouldBeGreaterThan import io.kotest.matchers.shouldBe import io.kotest.matchers.shouldNotBe diff --git a/compilerAst/src/prog8/ast/antlr/Antlr2Kotlin.kt b/compilerAst/src/prog8/ast/antlr/Antlr2Kotlin.kt index 2838283d6..078ad06bd 100644 --- a/compilerAst/src/prog8/ast/antlr/Antlr2Kotlin.kt +++ b/compilerAst/src/prog8/ast/antlr/Antlr2Kotlin.kt @@ -1,7 +1,6 @@ package prog8.ast.antlr import org.antlr.v4.runtime.ParserRuleContext -import org.antlr.v4.runtime.tree.ErrorNodeImpl import org.antlr.v4.runtime.tree.TerminalNode import prog8.ast.base.FatalAstException import prog8.ast.base.SyntaxError diff --git a/docs/source/todo.rst b/docs/source/todo.rst index 13eb6bf98..9612fc6b4 100644 --- a/docs/source/todo.rst +++ b/docs/source/todo.rst @@ -7,6 +7,7 @@ regenerate symbol dump files improve ability to create library files in prog8; for instance there's still stuff injected into the start of the start() routine AND there is separate setup logic going on before calling it. Make up our mind! Maybe all setup does need to be put into start() ? because the program cannot function correctly when the variables aren't initialized properly bss is not cleared etc. etc. +Add a -library $xxxx command line option to preselect every setting that is required to make a library at $xxxx rather than a normal loadable and runnable program Improve register load order in subroutine call args assignments: in certain situations, the "wrong" order of evaluation of function call arguments is done which results diff --git a/examples/test.p8 b/examples/test.p8 index 44682cbce..b0610c40b 100644 --- a/examples/test.p8 +++ b/examples/test.p8 @@ -1,31 +1,13 @@ %import textio -%zeropage basicsafe +%zeropage dontuse %option no_sysinit +%address $5000 +%launcher none main { - ubyte bank - - extsub @bank bank $a000 = routine_in_hiram(uword arg @AY) -> uword @AY - sub start() { - ; copy the routine into hiram bank 8 - bank = 8 - cx16.rambank(bank) - sys.memcopy(&the_increment_routine, $a000, 255) - cx16.rambank(1) - - txt.print("incremented by one=") - txt.print_uw(routine_in_hiram(37119)) + txt.print("address of start: ") + txt.print_uwhex(&start, true) txt.nl() } - - asmsub the_increment_routine(uword arg @AY) -> uword @AY { - %asm {{ - clc - adc #1 - bcc + - iny -+ rts - }} - } }