X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=blobdiff_plain;f=token.c;h=55dbc290980722d06ed144755e43bb85587965a5;hp=564ff0cc895d9349644776c69021687927f7dd83;hb=ace0b549a94110b69ec61442f825fb421b79799a;hpb=bdbf34766f4d074a5933eb1326fe4ce03d249e10 diff --git a/token.c b/token.c index 564ff0c..55dbc29 100644 --- a/token.c +++ b/token.c @@ -1,7 +1,7 @@ // // RMAC - Reboot's Macro Assembler for all Atari computers // TOKEN.C - Token Handling -// Copyright (C) 199x Landon Dyer, 2011-2019 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 // @@ -604,6 +604,9 @@ DEBUG { printf("ExM: SYMBOL=\"%s\"", d); } case CR_ABSCOUNT: d = "^^abscount"; break; + case CR_FILESIZE: + d = "^^filesize"; + break; case CR_DATE: d = "^^date"; break; @@ -950,7 +953,6 @@ int TokenizeLine(void) uint8_t c; // Random char uint64_t v; // Random value uint32_t cursize = 0; // Current line's size (.b, .w, .l, .s, .q, .d) - double f; // Random float uint8_t * nullspot = NULL; // Spot to clobber for SYMBOL termination int stuffnull; // 1:terminate SYMBOL '\0' at *nullspot uint8_t c1; @@ -1171,7 +1173,7 @@ DEBUG { printf("TokenizeLine: Calling fpop() from SRC_IFILE...\n"); } } // Make j = -1 if user tries to use a RISC register while in 68K mode - if (!(rgpu || rdsp) && ((TOKEN)j >= KW_R0 && (TOKEN)j <= KW_R31)) + if (!(rgpu || rdsp || dsp56001) && ((TOKEN)j >= KW_R0 && (TOKEN)j <= KW_R31)) { j = -1; } @@ -1287,6 +1289,10 @@ dostring: case '\\': c = '\\'; break; + case '{': + // If we're evaluating a macro + // this is valid because it's + // a parameter expansion case '!': // If we're evaluating a macro // this is valid and expands to @@ -1728,6 +1734,8 @@ void DumpToken(TOKEN t) printf("[ENDEXPR]"); else if (t == CR_ABSCOUNT) printf("[CR_ABSCOUNT]"); + else if (t == CR_FILESIZE) + printf("[CR_FILESIZE]"); else if (t == CR_DEFINED) printf("[CR_DEFINED]"); else if (t == CR_REFERENCED) @@ -1832,6 +1840,8 @@ void DumpTokenBuffer(void) printf("[ENDEXPR]"); else if (*t == CR_ABSCOUNT) printf("[CR_ABSCOUNT]"); + else if (*t == CR_FILESIZE) + printf("[CR_FILESIZE]"); else if (*t == CR_DEFINED) printf("[CR_DEFINED]"); else if (*t == CR_REFERENCED)