diff options
Diffstat (limited to 'interpreter.c')
-rw-r--r-- | interpreter.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/interpreter.c b/interpreter.c index ff96650..0261e57 100644 --- a/interpreter.c +++ b/interpreter.c @@ -40,8 +40,9 @@ int main(int argc, char *argv[]){ continue; } + // FIXME!!! PAGE IS CLAMPED TO 00 ON THE LONG MODE // Dump a page of memory - if (c == 'M' || c == 'm'){ //EXPAND, MAKE IT PRINT SINGLE AND PAGE + if (c == 'M' || c == 'm'){ address x = 0; do { c = getc(stdin); @@ -51,10 +52,12 @@ int main(int argc, char *argv[]){ c = getc(stdin); if (c != '\n'){ x <<= 8; - x = dCharToNum(c) << 4; + x += dCharToNum(c) << 4; x += dCharToNum(getc(stdin)); + printf("@%04x:%02x\n", x, Memory[x]); } else{ + printf("Page %02x", x); dPageDump(x); } continue; @@ -94,10 +97,7 @@ int main(int argc, char *argv[]){ for(int i = 1; i >= 0; i--){ y += (dCharToNum(getc(stdin)) << (4*i)); } - - printf("%4x:%2x\n", x, y); Memory[x] = y; - continue; } |