Roll back TOKENPTR changes and most of the .u32 changes weren't needed.
[rmac] / parmode.h
index 0c5ca2c0818e01b9ab248016127482dc41c456ce..64c3b5c86981c3576a099d2a921d04328de219da 100644 (file)
--- a/parmode.h
+++ b/parmode.h
        // Dn
        // An
        // # expression
-       if ((*tok.u32 >= KW_D0) && (*tok.u32 <= KW_D7))
+       if ((*tok >= KW_D0) && (*tok <= KW_D7))
        {
                AMn = DREG;
-               AnREG = *tok.u32++ & 7;
+               AnREG = *tok++ & 7;
        }
-       else if ((*tok.u32 >= KW_A0) && (*tok.u32 <= KW_A7))
+       else if ((*tok >= KW_A0) && (*tok <= KW_A7))
        {
                AMn = AREG;
-               AnREG = *tok.u32++ & 7;
+               AnREG = *tok++ & 7;
        }
-       else if (*tok.u32 == '#')
+       else if (*tok == '#')
        {
-               tok.u32++;
+               tok++;
 
                if (expr(AnEXPR, &AnEXVAL, &AnEXATTR, &AnESYM) != OK)
                        return ERROR;
        // ([bd,An,Xn],od)
        // ([bd,PC],Xn,od)
        // ([bd,PC,Xn],od)
-       else if (*tok.u32 == '(')
+       else if (*tok == '(')
        {
-               tok.u32++;
+               tok++;
 
-               if ((*tok.u32 >= KW_A0) && (*tok.u32 <= KW_A7))
+               if ((*tok >= KW_A0) && (*tok <= KW_A7))
                {
-                       AnREG = *tok.u32++ & 7;
+                       AnREG = *tok++ & 7;
 
-                       if (*tok.u32 == ')')
+                       if (*tok == ')')
                        {
-                               tok.u32++;
+                               tok++;
 
-                               if (*tok.u32 == '+')
+                               if (*tok == '+')
                                {
-                                       tok.u32++;
+                                       tok++;
                                        AMn = APOSTINC;
                                }
                                else
                        AMn = AINDEXED;
                        goto AMn_IX0;            // Handle ",Xn[.siz][*scale])"
                }
-               else if ((*tok.u32 >= KW_D0) && (*tok.u32 <= KW_D7))
+               else if ((*tok >= KW_D0) && (*tok <= KW_D7))
                {
                        //Since index register isn't used here, store register number in this field
-                       AnIXREG = *tok.u32++ & 7;                                // (Dn)
+                       AnIXREG = *tok++ & 7;                                // (Dn)
 
-                       if (*tok.u32 == ')')
+                       if (*tok == ')')
                        {
-                               tok.u32++;
+                               tok++;
                                AnEXTEN |= EXT_FULLWORD;    // Definitely using full extension format, so set bit 8
                                AnEXTEN |= EXT_BS;          // Base register suppressed
                                AnEXTEN |= EXT_BDSIZE0;     // Base displacement null
                                AnREG = 6 << 3;         // stuff 110 to mode field
                                goto AnOK;
                        }
-                       else if (*tok.u32 == 'L')
+                       else if (*tok == 'L')
                        {
                                // TODO: does DINDL gets used at all?
                                AMn = DINDL;                                     // (Dn.l)
                                AnEXTEN = 1 << 1;   // Long index size
-                               tok.u32++;
+                               tok++;
                        }
-                       else if (*tok.u32 == 'W')                                // (Dn.w)
+                       else if (*tok == 'W')                                // (Dn.w)
                        {
                                // TODO: does DINDW gets used at all?
                                AMn = DINDW;
                                AnEXTEN = 1 << 1;   // Word index size
-                               tok.u32++;
+                               tok++;
                        }
-                       else if (*tok.u32 == ',')
+                       else if (*tok == ',')
                        {
                                // ([bd,An],Xn..) without bd, An
                                // Base displacement is suppressed
                                AnEXTEN |= EXT_BS;          // Base register suppressed
                                AnEXTEN |= EXT_BDSIZE0;
                                AnREG = 6 << 3;         // stuff 110 to mode field
-                               tok.u32++;
+                               tok++;
                                goto CHECKODn;
                        }
                        else
                                return error("(Dn) error");
                        }
 
-                       if (*tok.u32 == '*')
+                       if (*tok == '*')
                        {                        // scale: *1, *2, *4, *8
-                               tok.u32++;
+                               tok++;
 
-                               if (*tok.u32 == SYMBOL)
+                               if (*tok == SYMBOL)
                                {
                                        if (expr(AnEXPR, &AnEXVAL, &AnEXATTR, &AnESYM) != OK)
                                                return error("scale factor expression must evaluate");
                                                goto badmode;
                                        }
                                }
-                               else if (*tok.u32++ != CONST || *tok.u32 > 8)
+                               else if (*tok++ != CONST || *tok > 8)
                                        goto badmode;
                                else
                                {
-                                       switch ((int)*tok.u32++)
+                                       switch ((int)*tok++)
                                        {
                                        case 1:
                                                break;
                                }
                        }
 
-                       if (*tok.u32 == ')')
+                       if (*tok == ')')
                        {
-                               tok.u32++;
+                               tok++;
                                AnEXTEN |= EXT_FULLWORD;    // Definitely using full extension format, so set bit 8
                                AnEXTEN |= EXT_BS;          // Base register suppressed
                                AnEXTEN |= EXT_BDSIZE0;     // Base displacement null
                                AMn = MEMPOST;
                                goto AnOK;
                        }
-                       else if (*tok.u32 == ',')
+                       else if (*tok == ',')
                        {
-                               tok.u32++;  // eat the comma
+                               tok++;  // eat the comma
                                // It might be (Dn[.wl][*scale],od)
                                // Maybe this is wrong and we have to write some code here
                                // instead of reusing that path...
                        else
                                return error("unhandled so far");
                }
-               else if (*tok.u32 == KW_PC)
+               else if (*tok == KW_PC)
                {                            // (PC,Xn[.siz][*scale])
-                       tok.u32++;
+                       tok++;
                        AMn = PCINDEXED;
 
                        // Common index handler; enter here with 'tok' pointing at the
 
                        AMn_IXN:                 // Handle any indexed (tok -> a comma)
 
-                       if (*tok.u32++ != ',')
+                       if (*tok++ != ',')
                                goto badmode;
 
-                       if (*tok.u32 < KW_D0 || *tok.u32 > KW_A7)
+                       if (*tok < KW_D0 || *tok > KW_A7)
                                goto badmode;
 
-                       AnIXREG = *tok.u32++ & 15;
+                       AnIXREG = *tok++ & 15;
 
-                       switch ((int)*tok.u32)
+                       switch ((int)*tok)
                        {                        // Index reg size: <empty> | .W | .L
                        case DOTW:
-                               tok.u32++;
+                               tok++;
                        default:
                                AnIXSIZ = 0;
                                break;
                        case DOTL:
                                AnIXSIZ = 0x0800;
-                               tok.u32++;
+                               tok++;
                                break;
                        case DOTB:               // .B not allowed here...
                                goto badmode;
                        }
 
-                       if (*tok.u32 == '*')
+                       if (*tok == '*')
                        {                        // scale: *1, *2, *4, *8
-                               tok.u32++;
+                               tok++;
 
-                               if (*tok.u32 == SYMBOL)
+                               if (*tok == SYMBOL)
                                {
                                        if (expr(AnEXPR, &AnEXVAL, &AnEXATTR, &AnESYM) != OK)
                                                return error("scale factor expression must evaluate");
                                                goto badmode;
                                        }
                                }
-                               else if (*tok.u32++ != CONST || *tok.u32 > 8)
+                               else if (*tok++ != CONST || *tok > 8)
                                        goto badmode;
                                else
                                {
-                                       switch ((int)*tok.u32++)
+                                       switch ((int)*tok++)
                                        {
                                        case 1:
                                                break;
                                }
                        }
 
-                       if (*tok.u32 == ',')
+                       if (*tok == ',')
                        {
                                // If we got here we didn't get any [] stuff
                                // so let's suppress base displacement before
                                // branching off
-                               tok.u32++;
+                               tok++;
                                AnEXTEN |= EXT_BDSIZE0;     // Base displacement null - suppressed
                                goto CHECKODn;
                        }
-                       if (*tok.u32++ != ')')         // final ")"
+                       if (*tok++ != ')')         // final ")"
                                goto badmode;
 
                        goto AnOK;
                }
-               else if (*tok.u32 == '[')
+               else if (*tok == '[')
                {                              // ([...
-                       tok.u32++;
+                       tok++;
                        AnEXTEN |= EXT_FULLWORD;     // Definitely using full extension format, so set bit 8
 
                        // Check to see if base displacement is present
-                       if (*tok.u32 != CONST && *tok.u32 != SYMBOL)
+                       if (*tok != CONST && *tok != SYMBOL)
                        {
                                AnEXTEN |= EXT_BDSIZE0;
                        }
                                        // bd=0 so let's optimise it out
                                        AnEXTEN|=EXT_BDSIZE0;
                                }
-                               else if (*tok.u32 == DOTL)
+                               else if (*tok == DOTL)
                                {                                               // ([bd.l,...
                                                AnEXTEN |= EXT_BDSIZEL;
-                                               tok.u32++;
+                                               tok++;
                                }
                                else
                                {                                               // ([bd[.w],... or ([bd,...
                                        // Is .W forced here?
-                                       if (*tok.u32 == DOTW)
+                                       if (*tok == DOTW)
                                        {
                                                AnEXTEN |= EXT_BDSIZEW;
-                                               tok.u32++;
+                                               tok++;
                                        }
                                        else
                                        {
                                        }
                                }
 
-                               if (*tok.u32 == ',')
-                                       tok.u32++;
+                               if (*tok == ',')
+                                       tok++;
                                //else
                                //      return error("Comma expected after base displacement");
                        }
                        // Check for address register or PC, suppress base register
                        // otherwise
 
-                       if (*tok.u32 == KW_PC)
+                       if (*tok == KW_PC)
                        {                                       // ([bd,PC,...
                                AnREG = (7 << 3) | 3;   // PC is special case - stuff 011 to register field and 111 to the mode field
-                               tok.u32++;
+                               tok++;
                        }
-                       else if ((*tok.u32 >= KW_A0) && (*tok.u32 <= KW_A7))
+                       else if ((*tok >= KW_A0) && (*tok <= KW_A7))
                        {                                       // ([bd,An,...
-                               AnREG = (6 << 3) | *tok.u32 & 7;
-                               tok.u32++;
+                               AnREG = (6 << 3) | *tok & 7;
+                               tok++;
                        }
-                       else if ((*tok.u32 >= KW_D0) && (*tok.u32 <= KW_D7))
+                       else if ((*tok >= KW_D0) && (*tok <= KW_D7))
                        {
                                // ([bd,Dn,...
                                AnREG = (6 << 3);
-                               AnEXTEN |= ((*tok.u32 & 7) << 12);
+                               AnEXTEN |= ((*tok & 7) << 12);
                                AnEXTEN |= EXT_D;
                                AnEXTEN |= EXT_BS; // Oh look, a data register! Which means that base register is suppressed
-                               tok.u32++;
+                               tok++;
 
                                // Check for size
                                {
                                // ([bd,An/PC],Xn.W/L...)
-                               switch ((int)*tok.u32)
+                               switch ((int)*tok)
                                {
                                // Index reg size: <empty> | .W | .L
                                case DOTW:
-                                       tok.u32++;
+                                       tok++;
                                        break;
                                default:
                                        break;
                                case DOTL:
                                        AnEXTEN |= EXT_L;
-                                       tok.u32++;
+                                       tok++;
                                        break;
                                case DOTB:
                                        // .B not allowed here...
                                }
 
                                // Check for scale
-                               if (*tok.u32 == '*')                    // ([bd,An/PC],Xn*...)
+                               if (*tok == '*')                        // ([bd,An/PC],Xn*...)
                                {                           // scale: *1, *2, *4, *8
-                                       tok.u32++;
+                                       tok++;
 
-                                       if (*tok.u32 == SYMBOL)
+                                       if (*tok == SYMBOL)
                                        {
                                                if (expr(AnEXPR, &AnEXVAL, &AnEXATTR, &AnESYM) != OK)
                                                        return error("scale factor expression must evaluate");
                                                        goto badmode;
                                }
                                        }
-                                       else if (*tok.u32++ != CONST || *tok.u32 > 8)
+                                       else if (*tok++ != CONST || *tok > 8)
                                                goto badmode;
                                        else
                                        {
-                                               switch ((int)*tok.u32++)
+                                               switch ((int)*tok++)
                                                {
                                                case 1:
                                                        break;
                                                }
                                        }
                                }
-                               if (*tok.u32 == ']')  // ([bd,Dn]...
+                               if (*tok == ']')  // ([bd,Dn]...
                                {
-                                       tok.u32++;
+                                       tok++;
                                        goto IS_SUPPRESSEDn;
                                }
                        }
-                       else if (*tok.u32 == ']')
+                       else if (*tok == ']')
                        {
                                // PC and Xn is suppressed
                                AnREG = 6 << 3;         // stuff 110 to mode field
                        }
 
                        // At a crossroads here. We can accept either ([bd,An/PC],... or ([bd,An/PC,Xn*scale],...
-                       if (*tok.u32 == ']')
+                       if (*tok == ']')
                        {
                                //([bd,An/PC],Xn,od)
                                // Check for Xn
-                               tok.u32++;
+                               tok++;
 
-                               if (*tok.u32 == ')')
+                               if (*tok == ')')
                                {
                                        //Xn and od are non existent, get out of jail free card
-                                       tok.u32++;
+                                       tok++;
                                        AMn = MEMPRE;                   // ([bc,An,Xn],od) with no Xn and od
                                        AnEXTEN |= EXT_IS | EXT_IISPREN;        //Suppress Xn and od
                                        goto AnOK;
                                }
-                               else if (*tok.u32 != ',')
+                               else if (*tok != ',')
                                        return error("comma expected after ]");
                                else
-                                       tok.u32++;                              // eat the comma
+                                       tok++;                          // eat the comma
 
-                               if ((*tok.u32 >= KW_A0) && (*tok.u32 <= KW_A7))
+                               if ((*tok >= KW_A0) && (*tok <= KW_A7))
                                {
-                                       AnIXREG = ((*tok.u32 & 7) << 12);
+                                       AnIXREG = ((*tok & 7) << 12);
                                        AnEXTEN |= EXT_A;
-                                       tok.u32++;
+                                       tok++;
                                }
-                               else if ((*tok.u32 >= KW_D0) && (*tok.u32 <= KW_D7))
+                               else if ((*tok >= KW_D0) && (*tok <= KW_D7))
                                {
-                                       AnEXTEN |= ((*tok.u32 & 7) << 12);
+                                       AnEXTEN |= ((*tok & 7) << 12);
                                        AnEXTEN |= EXT_D;
-                                       tok.u32++;
+                                       tok++;
                                }
                                else
                                {
                                        //No index found, suppress it
                                        AnEXTEN |= EXT_IS;
-                                       tok.u32--;                                      // Rewind tok to point to the comma
+                                       tok--;                                  // Rewind tok to point to the comma
                                        goto IS_SUPPRESSEDn;    // https://xkcd.com/292/ - what does he know anyway?
                                }
 
                                // Check for size
                                {
                                        // ([bd,An/PC],Xn.W/L...)
-                                       switch ((int)*tok.u32)
+                                       switch ((int)*tok)
                                        {
                                        // Index reg size: <empty> | .W | .L
                                        case DOTW:
-                                               tok.u32++;
+                                               tok++;
                                                break;
                                        default:
                                                break;
                                        case DOTL:
                                                AnEXTEN |= EXT_L;
-                                               tok.u32++;
+                                               tok++;
                                                break;
                                        case DOTB:
                                                // .B not allowed here...
                                }
 
                                // Check for scale
-                               if (*tok.u32 == '*')                   // ([bd,An/PC],Xn*...)
+                               if (*tok == '*')                   // ([bd,An/PC],Xn*...)
                                {                                  // scale: *1, *2, *4, *8
-                                       tok.u32++;
+                                       tok++;
 
-                                       if (*tok.u32 == SYMBOL)
+                                       if (*tok == SYMBOL)
                                        {
                                                if (expr(AnEXPR, &AnEXVAL, &AnEXATTR, &AnESYM) != OK)
                                                        return error("scale factor expression must evaluate");
                                                        goto badmode;
                                                }
                                        }
-                                       else if (*tok.u32++ != CONST || *tok.u32 > 8)
+                                       else if (*tok++ != CONST || *tok > 8)
                                                goto badmode;
                                        else
                                        {
-                                               switch ((int)*tok.u32++)
+                                               switch ((int)*tok++)
                                                {
                                                case 1:
                                                        break;
                                }
 
                                // Check for od
-                               if (*tok.u32 == ')')    // ([bd,An/PC],Xn)
+                               if (*tok == ')')        // ([bd,An/PC],Xn)
                                {
                                        //od is non existant, get out of jail free card
                                        AMn = MEMPOST;          // let's say it's ([bd,An],Xn,od) with od=0 then
                                        AnEXTEN |= EXT_IISPOSN; // No outer displacement
-                                       tok.u32++;
+                                       tok++;
                                        goto AnOK;
                                }
-                               else if (*tok.u32 != ',')
+                               else if (*tok != ',')
                                        return error("comma expected");
                                else
-                                       tok.u32++;      // eat the comma
+                                       tok++;  // eat the comma
 
                                CHECKODn:
                                if (expr(AnEXPR, &AnEXVAL, &AnEXATTR, &AnESYM) != OK)
                                        // od=0 so optimise it out
                                        AMn = MEMPOST;           // let's say it's ([bd,An],Xn,od) with od=0 then
                                        AnEXTEN |= EXT_IISPOSN; // No outer displacement
-                                       tok.u32++;
+                                       tok++;
                                        goto AnOK;
                                }
 
                                // ([bd,An/PC],Xn,od)
-                               if (*tok.u32 == DOTL)
+                               if (*tok == DOTL)
                                {
                                        // expr.L
                                        AnEXTEN |= EXT_IISPOSL; // Long outer displacement
                                        AMn = MEMPOST;
-                                       tok.u32++;
+                                       tok++;
 
                                        // Defined, absolute values from $FFFF8000..$00007FFF get
                                        // optimized to absolute short
                                        AMn = MEMPOST;
 
                                        // Is .W forced here?
-                                       if (*tok.u32 == DOTW)
+                                       if (*tok == DOTW)
                                        {
-                                               tok.u32++;
+                                               tok++;
                                        }
                                }
 
                                // Check for final closing parenthesis
-                               if (*tok.u32 == ')')
+                               if (*tok == ')')
                                {
-                                       tok.u32++;
+                                       tok++;
                                        goto AnOK;
                                }
                                else
 IS_SUPPRESSEDn:
 
                                // Check for od
-                               if (*tok.u32 == ')')    // ([bd,An/PC],Xn)
+                               if (*tok == ')')        // ([bd,An/PC],Xn)
                                {
                                        //od is non existant, get out of jail free card
                                        AMn = MEMPOST;          // let's say it's ([bd,An],Xn,od) with od=0 then
                                        AnEXTEN |= EXT_IISNOIN; // No outer displacement
-                                       tok.u32++;
+                                       tok++;
                                        goto AnOK;
                                }
-                               else if (*tok.u32!=',')
+                               else if (*tok!=',')
                                        return error("comma expected");
                                else
-                                       tok.u32++;      // eat the comma
+                                       tok++;  // eat the comma
 
-                if ((*tok.u32 != CONST) && (*tok.u32 != SYMBOL))
+                if ((*tok != CONST) && (*tok != SYMBOL))
                                        goto badmode;
 
                                expr(AnEXPR, &AnEXVAL, &AnEXATTR, &AnESYM);
@@ -663,15 +663,15 @@ IS_SUPPRESSEDn:
                                        // od=0 so optimise it out
                                        AMn = MEMPOST;           // let's say it's ([bd,An],Xn,od) with od=0 then
                                        AnEXTEN |= EXT_IISNOIN; // No outer displacement
-                                       tok.u32++;
+                                       tok++;
                                        goto AnOK;
                                }
 
                                // ([bd,An/PC],Xn,od)
-                               if (*tok.u32 == DOTL)
+                               if (*tok == DOTL)
                                {
                                        // expr.L
-                                       tok.u32++;
+                                       tok++;
                                        AMn = MEMPOST;
                                        AnEXTEN |= EXT_IISNOIL; // Long outer displacement with IS suppressed
                                }
@@ -681,11 +681,11 @@ IS_SUPPRESSEDn:
                                        AnEXTEN |= EXT_IISNOIW; // Word outer displacement with IS suppressed
                                        AMn = MEMPRE;
 
-                                       if (*tok.u32 == DOTW)
+                                       if (*tok == DOTW)
                                        {
                                                //AnEXTEN|=EXT_IISNOIW; // Word outer displacement
                                                AMn = MEMPOST;
-                                               tok.u32++;
+                                               tok++;
                                        }
                                        // Defined, absolute values from $FFFF8000..$00007FFF get
                                        // optimized to absolute short
@@ -699,45 +699,45 @@ IS_SUPPRESSEDn:
                                }
 
                                // Check for final closing parenthesis
-                               if (*tok.u32 == ')')
+                               if (*tok == ')')
                                {
-                                       tok.u32++;
+                                       tok++;
                                        goto AnOK;
                                }
                                else
                                        return error("Closing parenthesis missing on addressing mode");
                        }
-                       else if (*tok.u32 == ',')
+                       else if (*tok == ',')
                        {
-                               *tok.u32++;                     // ([bd,An,Xn.size*scale],od)
+                               *tok++;                 // ([bd,An,Xn.size*scale],od)
 
                                //Check for Xn
-                               if ((*tok.u32 >= KW_A0) && (*tok.u32 <= KW_A7))
+                               if ((*tok >= KW_A0) && (*tok <= KW_A7))
                                {
-                                       AnEXTEN |= ((*tok.u32 & 7) << 12);
+                                       AnEXTEN |= ((*tok & 7) << 12);
                                        AnEXTEN |= EXT_A;
-                                       tok.u32++;
+                                       tok++;
                                }
-                               else if ((*tok.u32 >= KW_D0) && (*tok.u32 <= KW_D7))
+                               else if ((*tok >= KW_D0) && (*tok <= KW_D7))
                                {
-                                       AnEXTEN |= ((*tok.u32 & 7) << 12);
+                                       AnEXTEN |= ((*tok & 7) << 12);
                                        AnEXTEN |= EXT_D;
-                                       tok.u32++;
+                                       tok++;
                                }
 
                                // Check for size
                                {
                                // ([bd,An/PC],Xn.W/L...)
-                               switch ((int)*tok.u32)
+                               switch ((int)*tok)
                                {
                                // Index reg size: <empty> | .W | .L
                                case DOTW:
-                                       tok.u32++;
+                                       tok++;
                                        break;
                                default:
                                        break;
                                case DOTL:
-                                       tok.u32++;
+                                       tok++;
                                        AnEXTEN |= EXT_L;
                                        break;
                                case DOTB:
@@ -747,11 +747,11 @@ IS_SUPPRESSEDn:
                                }
 
                                // Check for scale
-                               if (*tok.u32 == '*')                    // ([bd,An/PC],Xn*...)
+                               if (*tok == '*')                        // ([bd,An/PC],Xn*...)
                                {                           // scale: *1, *2, *4, *8
-                                       tok.u32++;
+                                       tok++;
 
-                                       if (*tok.u32 == SYMBOL)
+                                       if (*tok == SYMBOL)
                                        {
                                                if (expr(AnEXPR, &AnEXVAL, &AnEXATTR, &AnESYM) != OK)
                                                        return error("scale factor expression must evaluate");
@@ -772,11 +772,11 @@ IS_SUPPRESSEDn:
                                                        goto badmode;
                                                }
                                        }
-                                       else if (*tok.u32++ != CONST || *tok.u32 > 8)
+                                       else if (*tok++ != CONST || *tok > 8)
                                                goto badmode;
                                        else
                                        {
-                                               switch ((int)*tok.u32++)
+                                               switch ((int)*tok++)
                                                {
                                                case 1:
                                                        break;
@@ -796,24 +796,24 @@ IS_SUPPRESSEDn:
                                }
 
                                //Check for ]
-                               if (*tok.u32 != ']')
+                               if (*tok != ']')
                                        return error("Expected closing bracket ]");
-                               tok.u32++;                      // Eat the bracket
+                               tok++;                  // Eat the bracket
 
                                //Check for od
-                               if (*tok.u32 == ')')    // ([bd,An/PC,Xn]...
+                               if (*tok == ')')        // ([bd,An/PC,Xn]...
                                {
                                        //od is non existant, get out of jail free card
                                        //AnEXVAL=0;            // zero outer displacement
                                        AMn = MEMPRE;                   // let's say it's ([bd,An,Xn],od) with od suppressed then
                                        AnEXTEN |= EXT_IISPREN; // No outer displacement
-                                       tok.u32++;
+                                       tok++;
                                        goto AnOK;
                                }
-                else if (*tok.u32++ != ',')
+                else if (*tok++ != ',')
                                        return error("comma expected after ]");
 
-                               if (*tok.u32 == SYMBOL || *tok.u32 == CONST)
+                               if (*tok == SYMBOL || *tok == CONST)
                                {
                                        if (expr(AnEXPR, &AnEXVAL, &AnEXATTR, &AnESYM) != OK)
                                                goto badmode;
@@ -823,17 +823,17 @@ IS_SUPPRESSEDn:
                                                // od=0 so optimise it out
                                                AMn = MEMPRE;            // let's say it's ([bd,An],Xn,od) with od=0 then
                                                AnEXTEN |= EXT_IISPRE0; // No outer displacement
-                                               tok.u32++;
+                                               tok++;
                                                goto AnOK;
                                        }
                                }
 
                                // ([bd,An/PC,Xn],od)
-                               if (*tok.u32 == DOTL)
+                               if (*tok == DOTL)
                                {
                                        // expr.L
                                        AMn = MEMPRE;
-                                       tok.u32++;
+                                       tok++;
                                        AnEXTEN |= EXT_IISPREL;
                                }
                                else
@@ -861,9 +861,9 @@ IS_SUPPRESSEDn:
                                        AnEXTEN |= expr_size; // Assume we have a .w value
 
                                        // Is .W forced here?
-                                       if (*tok.u32 == DOTW)
+                                       if (*tok == DOTW)
                                        {
-                                               tok.u32++;
+                                               tok++;
 
                                                if (expr_size == EXT_IISPREL)
                                                        return error("outer displacement value does not fit in .w size");
@@ -871,9 +871,9 @@ IS_SUPPRESSEDn:
                                }
 
                                // Check for final closing parenthesis
-                               if (*tok.u32 == ')')
+                               if (*tok == ')')
                                {
-                                       tok.u32++;
+                                       tok++;
                                        goto AnOK;
                                }
                                else
@@ -890,46 +890,46 @@ IS_SUPPRESSEDn:
 
                        // It could be that this is really just an expression prefixing a
                        // register as a displacement...
-                       if (*tok.u32 == ')')
+                       if (*tok == ')')
                        {
-                               tok.u32++;
+                               tok++;
                                goto CHK_FOR_DISPn;
                        }
 
                        // Otherwise, check for PC & etc displacements...
-                       if (*tok.u32++ != ',')
+                       if (*tok++ != ',')
                                goto badmode;
 
-                       if ((*tok.u32 >= KW_A0) && (*tok.u32 <= KW_A7))
+                       if ((*tok >= KW_A0) && (*tok <= KW_A7))
                        {
-                               AnREG = *tok.u32 & 7;
-                               tok.u32++;
+                               AnREG = *tok & 7;
+                               tok++;
 
-                               if (*tok.u32 == ',')
+                               if (*tok == ',')
                                {
                                        AMn = AINDEXED;
                                        goto AMn_IXN;
                                }
-                               else if (*tok.u32 == ')')
+                               else if (*tok == ')')
                                {
                                        AMn = ADISP;
-                                       tok.u32++;
+                                       tok++;
                                        goto AnOK;
                                }
                                else
                                        goto badmode;
                        }
-                       else if (*tok.u32 == KW_PC)
+                       else if (*tok == KW_PC)
                        {
-                               if (*++tok.u32 == ',')
+                               if (*++tok == ',')
                                {                             // expr(PC,Xn...)
                                        AMn = PCINDEXED;
                                        goto AMn_IXN;
                                }
-                               else if (*tok.u32 == ')')
+                               else if (*tok == ')')
                                {
                                        AMn = PCDISP;             // expr(PC)
-                                       tok.u32++;
+                                       tok++;
                                        goto AnOK;
                                }
                                else
@@ -939,56 +939,56 @@ IS_SUPPRESSEDn:
                                goto badmode;
                }
        }
-       else if (*tok.u32 == '-' && tok.u32[1] == '(' && ((tok.u32[2] >= KW_A0) && (tok.u32[2] <= KW_A7)) && tok.u32[3] == ')')
+       else if (*tok == '-' && tok[1] == '(' && ((tok[2] >= KW_A0) && (tok[2] <= KW_A7)) && tok[3] == ')')
        {
                AMn = APREDEC;
-               AnREG = tok.u32[2] & 7;
-               tok.u32 += 4;
+               AnREG = tok[2] & 7;
+               tok += 4;
        }
-       else if (*tok.u32 == KW_CCR)
+       else if (*tok == KW_CCR)
        {
                AMn = AM_CCR;
-               tok.u32++;
+               tok++;
                goto AnOK;
        }
-       else if (*tok.u32 == KW_SR)
+       else if (*tok == KW_SR)
        {
                AMn = AM_SR;
-               tok.u32++;
+               tok++;
                goto AnOK;
        }
-       else if (*tok.u32 == KW_USP)
+       else if (*tok == KW_USP)
        {
                AMn = AM_USP;
-               tok.u32++;
+               tok++;
                AnREG = 2;      //Added this for the case of USP used in movec (see CREGlut in mach.c). Hopefully nothing gets broken!
                goto AnOK;
        }
-       else if ((*tok.u32 >= KW_IC40) && (*tok.u32 <= KW_BC40))
+       else if ((*tok >= KW_IC40) && (*tok <= KW_BC40))
        {
                AMn = CACHES;
-               AnREG = *tok.u32++ - KW_IC40;
+               AnREG = *tok++ - KW_IC40;
 
                // After a cache keyword only a comma or EOL is allowed
-               if ((*tok.u32 != ',') && (*tok.u32 != EOL))
+               if ((*tok != ',') && (*tok != EOL))
                        return ERROR;
                goto AnOK;
        }
-       else if ((*tok.u32 >= KW_SFC) && (*tok.u32 <= KW_CRP))
+       else if ((*tok >= KW_SFC) && (*tok <= KW_CRP))
        {
                AMn = CREG;
-               AnREG = (*tok.u32++) - KW_SFC;
+               AnREG = (*tok++) - KW_SFC;
                goto AnOK;
        }
-       else if ((*tok.u32 >= KW_FP0) && (*tok.u32 <= KW_FP7))
+       else if ((*tok >= KW_FP0) && (*tok <= KW_FP7))
        {
                AMn = FREG;
-               AnREG = (*tok.u32++ & 7);
+               AnREG = (*tok++ & 7);
        }
-       else if ((*tok.u32 >= KW_FPIAR) && (*tok.u32 <= KW_FPCR))
+       else if ((*tok >= KW_FPIAR) && (*tok <= KW_FPCR))
        {
                AMn = FPSCR;
-               AnREG = (1 << ((*tok.u32++) - KW_FPIAR + 10));
+               AnREG = (1 << ((*tok++) - KW_FPIAR + 10));
        }
        // expr
        // expr.w
@@ -1003,10 +1003,10 @@ IS_SUPPRESSEDn:
                        return ERROR;
 
 CHK_FOR_DISPn:
-               if (*tok.u32 == DOTW)
+               if (*tok == DOTW)
                {
                        // expr.W
-                       tok.u32++;
+                       tok++;
                        AMn = ABSW;
 
                        if (((AnEXATTR & (TDB | DEFINED)) == DEFINED) && (AnEXVAL < 0x10000))
@@ -1014,7 +1014,7 @@ CHK_FOR_DISPn:
 
                        goto AnOK;
                }
-               else if (*tok.u32 != '(')
+               else if (*tok != '(')
                {
                        // expr[.L]
                        AMn = ABSL;
@@ -1032,37 +1032,37 @@ CHK_FOR_DISPn:
                        }
 
                        // Is .L forced here?
-                       if (*tok.u32 == DOTL)
+                       if (*tok == DOTL)
                        {
-                               tok.u32++;
+                               tok++;
                                AMn = ABSL;
                        }
 
                        goto AnOK;
                }
 
-               tok.u32++;
+               tok++;
 
-               if ((*tok.u32 >= KW_A0) && (*tok.u32 <= KW_A7))
+               if ((*tok >= KW_A0) && (*tok <= KW_A7))
                {
-                       AnREG = *tok.u32++ & 7;
+                       AnREG = *tok++ & 7;
 
-                       if (*tok.u32 == ')')
+                       if (*tok == ')')
                        {
                                AMn = ADISP;
-                               tok.u32++;
+                               tok++;
                                goto AnOK;
                        }
 
                        AMn = AINDEXED;
                        goto AMn_IXN;
                }
-               else if (*tok.u32 == KW_PC)
+               else if (*tok == KW_PC)
                {
-                       if (*++tok.u32 == ')')
+                       if (*++tok == ')')
                        {
                                AMn = PCDISP;
-                               tok.u32++;
+                               tok++;
                                goto AnOK;
                        }