mirror of
https://github.com/ksherlock/x65.git
synced 2025-02-06 09:29:57 +00:00
Fix for local labels within rept/LUP and force org with command line argument
- Flushing local labels after each rept/LUP source segment so local labels within won't cross over the segment boundary - The command line argument -org will force fixed address rather than suggest a location, which in turn makes the -lst command line more readable.
This commit is contained in:
parent
ee53c41776
commit
273bdcc92d
8
x65.cpp
8
x65.cpp
@ -6149,8 +6149,10 @@ void Asm::Assemble(strref source, strref filename, bool obj_target)
|
||||
error = BuildSegment();
|
||||
if (contextStack.curr().complete())
|
||||
error = PopContext();
|
||||
else
|
||||
else {
|
||||
FlushLocalLabels(scope_depth);
|
||||
contextStack.curr().restart();
|
||||
}
|
||||
}
|
||||
if (error == STATUS_OK) {
|
||||
if (!obj_target)
|
||||
@ -7007,6 +7009,8 @@ int main(int argc, char **argv)
|
||||
assembler.default_org = (arg + 1).ahextoui();
|
||||
else if (arg.is_number())
|
||||
assembler.default_org = arg.atoi();
|
||||
// force the current section to be org'd
|
||||
assembler.AssignAddressToSection(assembler.SectionId(), assembler.default_org);
|
||||
} else if (arg.has_prefix(acc) && arg[acc.get_len()] == '=') {
|
||||
assembler.accumulator_16bit = arg.after('=').atoi() == 16;
|
||||
} else if (arg.has_prefix(xy) && arg[xy.get_len()] == '=') {
|
||||
@ -7052,7 +7056,7 @@ int main(int argc, char **argv)
|
||||
" * -cpu=6502/65c02/65c02wdc/65816: assemble with opcodes for a different cpu\n"
|
||||
" * -acc=8/16: set the accumulator mode for 65816 at start, default is 8 bits\n"
|
||||
" * -xy=8/16: set the index register mode for 65816 at start, default is 8 bits\n"
|
||||
" * -org = $2000 or - org = 4096: set the default start address of fixed address code\n"
|
||||
" * -org = $2000 or - org = 4096: force fixed address code at address\n"
|
||||
" * -obj (file.x65) : generate object file for later linking\n"
|
||||
" * -bin : Raw binary\n"
|
||||
" * -c64 : Include load address(default)\n"
|
||||
|
Loading…
x
Reference in New Issue
Block a user