Skip to content

Commit

Permalink
todo
Browse files Browse the repository at this point in the history
  • Loading branch information
irmen committed Nov 6, 2024
1 parent 9864abd commit b88f550
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 25 deletions.
1 change: 0 additions & 1 deletion compiler/test/codegeneration/TestVariousCodeGen.kt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 0 additions & 1 deletion compilerAst/src/prog8/ast/antlr/Antlr2Kotlin.kt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions docs/source/todo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
28 changes: 5 additions & 23 deletions examples/test.p8
Original file line number Diff line number Diff line change
@@ -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
}}
}
}

0 comments on commit b88f550

Please sign in to comment.