From 138bb8eeb4b67ab17a6d77e7afa9cd265759da0d Mon Sep 17 00:00:00 2001 From: alekseiplusplus Date: Sat, 29 Apr 2023 18:04:49 +1000 Subject: misc. fixes, finished LDA test. --- interpreter.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'interpreter.c') 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; } -- cgit v1.2.3