X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=blobdiff_plain;f=rmac.h;h=a2cc1c8a270d38677e6d98ccc05daecd18b1414b;hp=cf8aabc2d9521c962205a70784c24b41fb68ca28;hb=c38505ee4b2a0de59926107e52fb8bb84041a0e4;hpb=30a208654896284b50e7b362e97d3e63ec717b96 diff --git a/rmac.h b/rmac.h index cf8aabc..a2cc1c8 100644 --- a/rmac.h +++ b/rmac.h @@ -1,7 +1,7 @@ // // RMAC - Reboot's Macro Assembler for all Atari computers // RMAC.H - Main Application Code -// Copyright (C) 199x Landon Dyer, 2011-2018 Reboot and Friends +// Copyright (C) 199x Landon Dyer, 2011-2020 Reboot and Friends // RMAC derived from MADMAC v1.07 Written by Landon Dyer, 1986 // Source utilised with the kind permission of Landon Dyer // @@ -137,6 +137,12 @@ { (a)[(r + 0)] = (uint8_t)((v) & 0xFF); \ (a)[(r + 1)] = (uint8_t)((v) >> 8); } +// In DSP56001 mode, this is useful: +#define SETBE24(a, v) \ + { (a)[0] = (uint8_t)(((v) >> 16) & 0xFF); \ + (a)[1] = (uint8_t)(((v) >> 8) & 0xFF); \ + (a)[2] = (uint8_t)((v) & 0xFF); } + // Byteswap crap #define BYTESWAP16(x) ((((x) & 0x00FF) << 8) | (((x) & 0xFF00) >> 8)) #define BYTESWAP32(x) ((((x) & 0x000000FF) << 24) | (((x) & 0x0000FF00) << 8) | (((x) & 0x00FF0000) >> 8) | (((x) & 0xFF000000) >> 24)) @@ -218,12 +224,13 @@ PTR #define TEXT 0x0001 // Relative to text #define DATA 0x0002 // Relative to data #define BSS 0x0004 // Relative to BSS +//OK, this is bad, mmkay? These are treated as indices into an array which means that this was never meant to be defined this way--at least if it was, it was a compromise that has come home to bite us all in the ass. !!! FIX !!! #define M6502 0x0008 // 6502/microprocessor (absolute) #define M56001P 0x0010 // DSP 56001 Program RAM #define M56001X 0x0020 // DSP 56001 X RAM #define M56001Y 0x0040 // DSP 56001 Y RAM #define M56001L 0x0080 // DSP 56001 L RAM -#define TDB (TEXT|DATA|BSS) // Mask for text+data+bss +#define TDB (TEXT|DATA|BSS) // Mask for TEXT+DATA+BSS #define M56KPXYL (M56001P|M56001X|M56001Y|M56001L) // Mask for 56K stuff // Sizes