From 6324b9c7bc9a4ace12aedaa2952b8176750dba2f Mon Sep 17 00:00:00 2001 From: Imanol-Mikel Barba Sabariego Date: Tue, 27 Dec 2016 06:19:44 +0100 Subject: [PATCH] Corrected some memory prints to hex. Added teleporter save state --- data/teleporter.sav | Bin 0 -> 65574 bytes debug.c | 8 ++++---- 2 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 data/teleporter.sav diff --git a/data/teleporter.sav b/data/teleporter.sav new file mode 100644 index 0000000..424ad58 Binary files /dev/null and b/data/teleporter.sav differ diff --git a/debug.c b/debug.c index 17e3648..545cf12 100644 --- a/debug.c +++ b/debug.c @@ -116,8 +116,8 @@ void query() print_regs(); break; case 'm': - sscanf(input,"m %d\n",&mempos); - fprintf(stderr,"%d: %02x\n",mempos,mem[mempos]); + sscanf(input,"m %X\n",&mempos); + fprintf(stderr,"%02X: %02x\n",mempos,mem[mempos]); break; case 's': sscanf(input,"s %s\n",filename); @@ -131,8 +131,8 @@ void query() break; case 'w': //FIXME ALREADY - sscanf(input,"w %d %d\n",®,&value); - fprintf(stderr,"Setting register %d to %d",reg,value); + sscanf(input,"w r%d %d\n",®,&value); + fprintf(stderr,"Setting r%d = %02X",reg,value); regs[reg] = value; break; case 'q': -- libgit2 0.22.2