X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=blobdiff_plain;f=token.c;h=564ff0cc895d9349644776c69021687927f7dd83;hp=9d6decf5468709082b4c4551c4ed3948f219b837;hb=bdbf34766f4d074a5933eb1326fe4ce03d249e10;hpb=9153334781cd2e23750f4dc002e847606c07a1f0 diff --git a/token.c b/token.c index 9d6decf..564ff0c 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-2018 Reboot and Friends +// Copyright (C) 199x Landon Dyer, 2011-2019 Reboot and Friends // RMAC derived from MADMAC v1.07 Written by Landon Dyer, 1986 // Source utilised with the kind permission of Landon Dyer // @@ -560,7 +560,8 @@ DEBUG { printf("ExM: SYMBOL=\"%s\"", d); } // to choke on legitimate code... Need to investigate this further // before changing anything else here! case CONST: - sprintf(numbuf, "$%lx", (uint64_t)*tk++); +// sprintf(numbuf, "$%lx", (uint64_t)*tk++); + sprintf(numbuf, "$%" PRIX64, (uint64_t)*tk++); tk++; d = numbuf; break; @@ -1315,45 +1316,20 @@ dostring: while (hextab[*ln] >= 0) v = (v << 4) + (int)hextab[*ln++]; - if (*ln == '.') - { - if (obj_format == BSD) - { - if ((*(ln + 1) & 0xDF) == 'B') - { - v &= 0x000000FF; - ln += 2; - } - else if ((*(ln + 1) & 0xDF) == 'W') - { - v &= 0x0000FFFF; - ln += 2; - } - else if ((*(ln + 1) & 0xDF) == 'L') - { - v &= 0xFFFFFFFF; - ln += 2; - } - } - } - *tk.u32++ = CONST; *tk.u64++ = v; - if (obj_format == ALCYON) + if (*ln == '.') { - if (*ln == '.') + if ((*(ln + 1) == 'w') || (*(ln + 1) == 'W')) { - if ((*(ln + 1) == 'w') || (*(ln + 1) == 'W')) - { - *tk.u32++ = DOTW; - ln += 2; - } - else if ((*(ln + 1) == 'l') || (*(ln + 1) == 'L')) - { - *tk.u32++ = DOTL; - ln += 2; - } + *tk.u32++ = DOTW; + ln += 2; + } + else if ((*(ln + 1) == 'l') || (*(ln + 1) == 'L')) + { + *tk.u32++ = DOTL; + ln += 2; } } }