mirror of
https://github.com/irmen/prog8.git
synced 2024-12-22 18:30:01 +00:00
make memtop adjust automatically when you use %address larger than the default memtop setting.
This commit is contained in:
parent
1b528491c2
commit
573cecb087
@ -264,7 +264,14 @@ internal fun determineProgramLoadAddress(program: Program, options: CompilationO
|
||||
}
|
||||
|
||||
options.loadAddress = loadAddress
|
||||
|
||||
options.memtopAddress = program.toplevelModule.memtopAddress?.first ?: options.compTarget.machine.PROGRAM_MEMTOP_ADDRESS
|
||||
|
||||
if(loadAddress>options.memtopAddress) {
|
||||
errors.warn("program load address ${loadAddress.toHex()} is beyond default memtop address ${options.memtopAddress.toHex()}. " +
|
||||
"Memtop has been adjusted to ${'$'}ffff to avoid assembler error. Set a valid %memtop yourself to get rid of this warning.", program.toplevelModule.position)
|
||||
options.memtopAddress = 0xffffu
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -3,8 +3,6 @@ TODO
|
||||
|
||||
make repeat support 65536 iterations
|
||||
|
||||
make memtop adjust automatically when you use %address larger than the default . Then simply set it at $ffff because apparently the programmer knows better?
|
||||
|
||||
scripts/cx16_images : add an option to keep the first palette entry black (there's already the option to retain the first 16 entries)
|
||||
|
||||
support this usage of defer:
|
||||
|
@ -1,16 +1,12 @@
|
||||
%import textio
|
||||
%zeropage basicsafe
|
||||
%option no_sysinit
|
||||
%zeropage basicsafe
|
||||
%address $f200
|
||||
%output raw
|
||||
%launcher none
|
||||
|
||||
main {
|
||||
sub start() {
|
||||
repeat 100 {
|
||||
cx16.r0++
|
||||
if cx16.r0!=0
|
||||
goto mylabel
|
||||
}
|
||||
|
||||
mylabel:
|
||||
|
||||
txt.print_uwhex(cbm.MEMTOP(0, true), true)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user