mirror of
https://github.com/irmen/prog8.git
synced 2024-11-26 11:49:22 +00:00
start address of blocks without explicit memory address, is now word-aligned in memory
This commit is contained in:
parent
6319269976
commit
15695a304e
@ -181,6 +181,8 @@ internal class AsmGen(private val program: Program,
|
||||
out("\n\n; ---- block: '${block.name}' ----")
|
||||
if(block.address!=null)
|
||||
out("* = ${block.address!!.toHex()}")
|
||||
else
|
||||
out("\t.align 2")
|
||||
out("${block.name}\t" + (if("force_output" in block.options()) ".block\n" else ".proc\n"))
|
||||
|
||||
outputSourceLine(block)
|
||||
|
@ -2,8 +2,6 @@
|
||||
TODO
|
||||
====
|
||||
|
||||
- make blocks without explicit memory address, word-aligned in the assembly.
|
||||
|
||||
- add sound to the cx16 tehtriz
|
||||
|
||||
- hoist all variable declarations up to the subroutine scope *before* even the constant folding takes place (to avoid undefined symbol errors when referring to a variable from another nested scope in the subroutine)
|
||||
|
@ -5,6 +5,22 @@
|
||||
main {
|
||||
|
||||
sub start() {
|
||||
txt.print("Foo_bar\n")
|
||||
uword xx = &b2.zz
|
||||
xx=&b3.zz
|
||||
|
||||
txt.print_uwhex(&main, true)
|
||||
txt.nl()
|
||||
txt.print_uwhex(&b2, true)
|
||||
txt.nl()
|
||||
txt.print_uwhex(&b3, true)
|
||||
txt.nl()
|
||||
}
|
||||
}
|
||||
|
||||
b2 {
|
||||
str zz="hello"
|
||||
}
|
||||
|
||||
b3 $4001 {
|
||||
str zz="bye"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user