This commit is contained in:
Irmen de Jong 2024-11-07 00:48:13 +01:00
parent 9864abd393
commit b88f550c5b
4 changed files with 6 additions and 25 deletions

View File

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

View File

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

View File

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

View File

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