summaryrefslogtreecommitdiff
path: root/interpreter.c
diff options
context:
space:
mode:
authoralekseiplusplus <alekseijeaves@protonmail.com>2023-04-29 18:04:49 +1000
committeralekseiplusplus <alekseijeaves@protonmail.com>2023-04-29 18:04:49 +1000
commit138bb8eeb4b67ab17a6d77e7afa9cd265759da0d (patch)
treebcafea69e68333a5b8b6a2e3263dd1a46b996648 /interpreter.c
parent1c30dea63b65c7e117b3fd8ba0140dbf77a0ef73 (diff)
misc. fixes, finished LDA test.
Diffstat (limited to 'interpreter.c')
-rw-r--r--interpreter.c10
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;
}