X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=direct.c;h=a7368550bd82857811166b1aa6956cfe59889d71;hb=a29cbeceeadc92ff48ffa70a51135b503c96cc6d;hp=6a41e82ed9991b9b9a5cd6f8506f42b5b0494b7d;hpb=ff2052bcaa1428a33a202822a81a6f9b8e567ef4;p=rmac diff --git a/direct.c b/direct.c index 6a41e82..a736855 100644 --- a/direct.c +++ b/direct.c @@ -929,7 +929,9 @@ int d_ds(WORD siz) // Check to see if the value being passed in is negative (who the hell does // that?--nobody does; it's the code gremlins, or rum, that does it) - if (eval < 0) + // N.B.: Since VALUE is of type uint32_t, if it goes negative, it will have + // its high bit set. + if (eval & 0x80000000) return error("negative sizes not allowed"); // In non-TDB section (BSS, ABS and M6502) just advance the location @@ -982,15 +984,27 @@ int d_dc(WORD siz) for(;; tok++) { // dc.b 'string' [,] ... - if (siz == SIZB && *tok == STRING && (tok[2] == ',' || tok[2] == EOL)) + if (siz == SIZB && (*tok == STRING || *tok == STRINGA8) && (tok[2] == ',' || tok[2] == EOL)) { uint32_t i = strlen(string[tok[1]]); if ((challoc - ch_size) < i) chcheck(i); - for(p=string[tok[1]]; *p!=EOS; p++) - D_byte(*p); + if (*tok == STRING) + { + for(p=string[tok[1]]; *p!=EOS; p++) + D_byte(*p); + } + else if(*tok == STRINGA8) + { + for(p=string[tok[1]]; *p!=EOS; p++) + D_byte(strtoa8[*p]); + } + else + { + error("String format not supported... yet"); + } tok += 2; goto comma;