int bfparam1; // bfxxx / fmove instruction parameter 1
int bfparam2; // bfxxx / fmove instruction parameter 2
-int bfval1; //bfxxx / fmove value 1
-int bfval2; //bfxxx / fmove value 2
+int bfval1; // bfxxx / fmove value 1
+int bfval2; // bfxxx / fmove value 2
TOKEN bf0expr[EXPRSIZE]; // Expression
uint64_t bf0exval; // Expression's value
WORD bf0exattr; // Expression's attribute
//
int check030bf(void)
{
+ PTR tp;
CHECK00;
tok++;
if (*tok == CONST)
{
- tok++;
- bfval1 = (int)*(uint64_t *)tok;
+ tp.u32 = tok + 1;
+ bfval1 = (int)*tp.u64++;
+ tok = tp.u32;
// Do=0, offset=immediate - shift it to place
bfparam1 = (0 << 11);
- tok++;
- tok++;
}
else if (*tok == SYMBOL)
{
else
return ERROR;
- if (*tok==':')
- tok++; //eat the ':'
+ // Eat the ':', if any
+ if (*tok == ':')
+ tok++;
if (*tok == '}' && tok[1] == EOL)
{
if (*tok == CONST)
{
- tok++;
- bfval2 = (int)*(uint64_t *)tok;
+ tp.u32 = tok + 1;
+ bfval2 = (int)*tp.u64++;
+ tok = tp.u32;
// Do=0, offset=immediate - shift it to place
bfparam2 = (0 << 5);
- tok++;
- tok++;
}
else if (*tok == SYMBOL)
{
else if ((*tok >= KW_D0) && (*tok <= KW_D7))
{
// Do=1, offset=data register - shift it to place
- bfval2 = ((*(int *)tok - 128));
+ bfval2 = (*(int *)tok - 128);
bfparam2 = (1 << 5);
tok++;
}