diff --git a/Dasm6500.cpp b/Dasm6500.cpp index 20b2dc5..a17a2b0 100644 --- a/Dasm6500.cpp +++ b/Dasm6500.cpp @@ -18,41 +18,6 @@ /* Copyright (C) Hermann Seib * ***************************************************************************/ -#if 0 -Little TODO notepad ... - -"<" and ">" for forced addressing modes are obviously not used in the 6502 -assembler world. So be it. There seem to be other methods: - -Kick: append .abs or .a to the mnemonic (Absolute mode) or - append .zp or .z to the mnemonic (Zeropage mode) - -dasm: .a, .z (plus various others) FORCE mnemonic extensions - -ACME: append +1 (zeropage), +2 (absolute 16bit), +3 (absolute 24bit for 65816) - to mnemo - -as65: nothing to be found in the manual - -Most, if not all, of the above assemblers would also interpret constants -given with leading zeroes (like $00xx) as implicit absolute and without ($xx) -as zero page addressing, but that is not something I'd rely on. Also, it's -only usable for constants and equates - but not, for example, labels in -the zero page. - -For the moment, I'm going with .a and .z, but that is surely not enough. -as65, for example, obviously can't handle that. - -To go for maximum compatibility, options would be necessary to define - - whether forced addressing is to be done at all (OK, got that) - - a potential mnemonic addition (like the .a and .z currently in use) - - a potential parameter prefix (like the < and > of old) -The "$00 means zero page, $0000 means absolute address" approach is not -something that can be easily incorporated (and, as mentioned, incomplete), -so I see neither reason nor a way to implement that. - -#endif - /*****************************************************************************/ /* Dasm650X.cpp : 650X disassembler implementation */ /*****************************************************************************/ diff --git a/Dasm6800.cpp b/Dasm6800.cpp index 525098e..aa6c7d4 100644 --- a/Dasm6800.cpp +++ b/Dasm6800.cpp @@ -1175,7 +1175,7 @@ switch (mode) /* which mode is this? */ dp = 0; } #if 1 - if (forceExtendedAddr && (W & (uint16_t)0xff00) == (uint16_t)dp || + if ((forceExtendedAddr && (W & (uint16_t)0xff00) == (uint16_t)dp) || GetForcedAddr(PC)) AddForced(smnemo, slbl, true); sparm = slbl; diff --git a/Dasm6809.cpp b/Dasm6809.cpp index 8c0f678..05920f6 100644 --- a/Dasm6809.cpp +++ b/Dasm6809.cpp @@ -1865,7 +1865,7 @@ switch (mode) /* which mode is this? */ if (dp == DEFAULT_ADDRESS) dp = 0; #if 1 - if (forceExtendedAddr && (W & (uint16_t)0xff00) == (uint16_t)dp || + if ((forceExtendedAddr && (W & (uint16_t)0xff00) == (uint16_t)dp) || GetForcedAddr(PC)) AddForced(smnemo, slbl, true); sparm = slbl; diff --git a/Makefile b/Makefile index 3305f0d..642661f 100644 --- a/Makefile +++ b/Makefile @@ -17,10 +17,13 @@ all: $(PROGS) dasmfw: $(OBJS) $(CXX) $(CPPFLAGS) -o $@ $^ + #Here's some things you could do now ... + # ln -s dasmfw dasmhc11 + # ln -s dasmfw dasm6809 %.o: %.cpp $(CXX) $(CPPFLAGS) $(<) -c -o $@ .PHONY clean: rm $(OBJS) - rm $(PROGS) + # rm $(PROGS) diff --git a/dasmfw.cpp b/dasmfw.cpp index d649204..10574d1 100644 --- a/dasmfw.cpp +++ b/dasmfw.cpp @@ -1489,7 +1489,7 @@ do adr_t offs, ign; ParseInfoRange(value, offs, ign, ign); if (offs != NO_ADDRESS) - saFNames.push_back(sformat("-offset:0x%x", offs)); + saFNames.push_back(sformat("-offset:0x%lx", offs)); saFNames.push_back(fn); } break; @@ -1500,7 +1500,19 @@ do if (idx == value.npos) idx = value.size(); option = value.substr(0, idx); value = triminfo(value.substr(idx)); - ParseOption(option, value, !bProcInfo); + if (!bSetDasm && + !bProcInfo && /* if just loading includes and files*/ + (option == "offset" || /* and "offset",... comes in */ + option == "begin" || + option == "end" || + option == "interleave" || + option == "bus")) + { + if (!value.empty()) /* append it to file list */ + saFNames.push_back(sformat("-%s:%s", option.c_str(), value.c_str())); + } + else + ParseOption(option, value, !bProcInfo); } break; case infoRemap : /* REMAP addr[-addr] offset */ diff --git a/dasmfw.h b/dasmfw.h index 794eaf6..9bca8d3 100644 --- a/dasmfw.h +++ b/dasmfw.h @@ -59,7 +59,7 @@ using namespace std; /* Global definitions */ /*****************************************************************************/ -#define DASMFW_VERSION "0.28" +#define DASMFW_VERSION "0.29" // set these to int64_t once 64bit processors become part of the framework typedef uint32_t cadr_t; /* container for maximal code address*/ diff --git a/history.txt b/history.txt index cf35bd5..53872b5 100644 --- a/history.txt +++ b/history.txt @@ -80,4 +80,6 @@ v0.27 2022-05-10 relc directive added v0.28 2022-05-18 crude fix for https://github.com/Arakula/dasmfw/issues/8 added 2 options for the 680X and 650X disassemblers to set up a pattern for forced direct(zeropage) and extended(absolute) - addressing \ No newline at end of file + addressing +v0.29 2022-05-20 "option offset,begin,end,bus,interleave" info file statements preceding + a "file" statement should work now