//
-// 6502 Assembler
+// RMAC - Reboot's Macro Assembler for all Atari computers
+// 6502.C - 6502 Assembler
+// Copyright (C) 199x Landon Dyer, 2011-2018 Reboot and Friends
+// RMAC derived from MADMAC v1.07 Written by Landon Dyer, 1986
+// Source utilised with the kind permission of Landon Dyer
//
// Init6502 initialization
// d_6502 handle ".6502" directive
{
register int amode; // (Parsed) addressing mode
register int i;
- VALUE eval; // Expression value
+ uint64_t eval; // Expression value
WORD eattr; // Expression attributes
int zpreq; // 1, optimize instr to zero-page form
register char * p; // (Temp) string usage
//
zpreq = 0;
- switch ((int)*tok)
+ switch (tok[0])
{
case EOL:
amode = A65_IMPL;
if (*tok == '>')
{
tok++;
+
if (expr(exprbuf, &eval, &eattr, NULL) < 0)
return;
else if (*tok == '<')
{
tok++;
+
if (expr(exprbuf, &eval, &eattr, NULL) < 0)
return;
tok++;
p = string[tok[1]];
- if (*tok != SYMBOL || p[1] != EOS || (*p | 0x20) != 'y') // Sleazo tolower()
+ // Sleazo tolower() -----------------vvvvvvvvvvv
+ if (*tok != SYMBOL || p[1] != EOS || (*p | 0x20) != 'y')
goto badmode;
tok += 2;
tok++;
p = string[tok[1]];
- if (*tok != SYMBOL || p[1] != EOS || (*p | 0x20) != 'x') // Sleazo tolower()
+ // Sleazo tolower() -----------------vvvvvvvvvvv
+ if (*tok != SYMBOL || p[1] != EOS || (*p | 0x20) != 'x')
goto badmode;
tok += 2;