-
Notifications
You must be signed in to change notification settings - Fork 52
Description
org $0fffff : db 0is ugly (and technically prevents using that last byte as freespace)- sel wanted a way to control how much the rom can be autoexpanded by
so something like romsize 512k..2M to set the size to (at least) 512k, and limit autoexpanding to not go past 2M. romsize 512k would be shorthand for 512k..512k. (so i guess here the .. is an inclusive range... which is inconsistent with the for loop syntax... whatever)
should it error if you try to patch it to a rom that's already longer than the upper bound? or should it truncate?
also we don't have a parser for this size notation. simplest would be to just parse size in bytes as math expressions, but these kinds of expressions would look a bit ugly i think (for 2M you'd need either like 2*1024*1024 or 2<<20)
it wouldn't be too hard to just parse integer literals with suffixes, but i'm afraid it might be too inflexible. though i guess you can work around it with !a #= somemath : romsize !a if you do need to use math there