elf/
tests/
regression-tests/
-rmac-*
+versions/
memory boundaries, and fixup link addresses as necessary. This is needed
because of a quirk in how the OP works (it ORs constants on the address
lines to get the phrases it needs and if they are not zeroes, it will fail
- in bizarre ways).
+ in bizarre ways). It will also set all <ypos> constants on the correct
+ half-line (as that's how the OP views them).
Q: Why can't I define the link addresses for all the objects?
#
clean:
- $(rm) $(OBJS) kwgen.o 68kgen.o rmac kwgen 68kgen kwtab.h 68ktab.h mntab.h risckw.h 6502kw.h
+ $(rm) $(OBJS) kwgen.o 68kgen.o rmac kwgen 68kgen kwtab.h 68ktab.h mntab.h risckw.h 6502kw.h opkw.h
#
# Dependencies
// place to prevent a bad address at link time. :-P As
// a consequence of this, the highest address we can
// have here is $1FFFF8.
+ uint32_t diffsave = diff;
diff = ((diff & 0x001FFFFF) << 11) | olBitsSave;
SETBE32(dp, 0, diff);
+ // But we need those 3 bits, otherwise we can get in
+ // trouble with things like OL data that is in the cart
+ // space, and BOOM! So the 2nd phrase of the fixup (it
+ // will *always* have a 2nd phrase) has a few spare
+ // bits, we chuck them in there.
+ uint32_t p2 = GETBE32(dp, 8);
+ p2 &= 0x1FFFFFFF;
+ p2 |= (diffsave & 0x00E00000) << 8;
+ SETBE32(dp, 8, p2);
}
else // LONG relocation
{
"| | | | | | | | (_| | (__ \n"
"|_| |_| |_| |_|\\__,_|\\___|\n"
"\nReboot's Macro Assembler\n"
- "Copyright (C) 199x Landon Dyer, 2011-2017 Reboot\n"
+ "Copyright (C) 199x Landon Dyer, 2011-2018 Reboot\n"
"V%01i.%01i.%01i %s (%s)\n\n", MAJOR, MINOR, PATCH, __DATE__, PLATFORM);
}
SETBE32(locp, 0, eval);
break;
- // Fixup QUAD forward references
- // Need to add flags for OP uses... [DONE]
+ // Fixup QUAD forward references (mainly used by the OP assembler)
case FU_QUAD:
- // If the symbol is undefined, make sure to pass the symbol in
- // to the MarkRelocatable() function.
-/* if (!(eattr & DEFINED))
- MarkRelocatable(sno, loc, 0, MQUAD, esym);
- else if (tdb)
- MarkRelocatable(sno, loc, tdb, MQUAD, NULL);//*/
-
if (w & FU_OBJLINK)
{
uint64_t quad = GETBE64(locp, 0);
if (fup->orgaddr)
addr = fup->orgaddr;
-//printf("sect.c: FU_OBJLINK quad=%016lX, addr=%016lX ", quad, addr);
eval = (quad & 0xFFFFFC0000FFFFFFLL) | ((addr & 0x3FFFF8) << 21);
-//printf("(%016lX)\n", eval);
}
else if (w & FU_OBJDATA)
{
+ // If it's in a TEXT or DATA section, be sure to mark for a
+ // fixup later
+ if (tdb)
+ MarkRelocatable(sno, loc, tdb, MQUAD, NULL);
+
uint64_t quad = GETBE64(locp, 0);
uint64_t addr = eval;
}
SETBE64(locp, 0, eval);
-//printf("(%016lX)\n", eval);
break;
// Fixup a 3-bit "QUICK" reference in bits 9..1
#define MAJOR 1 // Major version number
#define MINOR 13 // Minor version number
-#define PATCH 0 // Patch release number
+#define PATCH 1 // Patch release number
#endif // __VERSION_H__