X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=blobdiff_plain;f=rmac.h;h=a2cc1c8a270d38677e6d98ccc05daecd18b1414b;hp=07d6ed162508b4dcf3f93b644ba5ebeab5d16e99;hb=c38505ee4b2a0de59926107e52fb8bb84041a0e4;hpb=9153334781cd2e23750f4dc002e847606c07a1f0 diff --git a/rmac.h b/rmac.h index 07d6ed1..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,8 +224,14 @@ 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 TDB (TEXT|DATA|BSS) // Mask for text+data+bss +#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 M56KPXYL (M56001P|M56001X|M56001Y|M56001L) // Mask for 56K stuff // Sizes #define SIZB 0x0001 // .b @@ -284,6 +296,7 @@ enum extern int verb_flag; extern int debug; extern int rgpu, rdsp; +extern int robjproc; extern int dsp56001; extern int err_flag; extern int err_fd; @@ -306,6 +319,7 @@ extern int activecpu; extern int activefpu; // Exported functions +void strtoupper(char * s); char * fext(char *, char *, int); int nthpath(char *, int, char *); int ParseOptimization(char * optstring);