#define SIGN_MASK 01000000000000ULL
#define VAL_MASK 00777777777777ULL
-typedef struct loc
+typedef struct loc
{
int block;
int address;
{
if (error_hook)
error_hook("Parse error");
-
+
if (english)
printf("Parse error (line %d): %s\n", lino, english_msg);
else
int op = (w >> 30) & 0177; // Operation code
int ax = (w >> 28) & 3; // Address extensions supported in Minsk-22 mode
int ix = (w >> 24) & 15; // Indexing
- loc x = { ax & 2, (w >> 12) & 07777 }; // Operands (original form)
+ loc x = { ax >> 1, (w >> 12) & 07777 }; // Operands (original form)
loc y = { ax & 1, w & 07777 };
loc xi=x, yi=y; // (indexed form)
if (trace)
// not +00 00 0000 0000 (NOP). Otherwise, an empty program would reveal
// the location of the password :)
for (int i=0; i<memblocks; i++)
- for (int j=0; i<MEM_SIZE; j++)
+ for (int j=0; j<MEM_SIZE; j++)
mem[i][j] = 01000000000000ULL;
// Store the password
parse_in();
run();
-
+
return 0;
}