This commit is contained in:
mrdudz
2025-06-23 17:09:06 +02:00
parent 4863a3e29b
commit 5fc15a7a60
204 changed files with 915 additions and 912 deletions

View File

@@ -1,11 +1,11 @@
.export _getsp
.importzp sp
.importzp c_sp
.proc _getsp
ldx sp+1
lda sp
ldx c_sp+1
lda c_sp
rts
.endproc

View File

@@ -112,17 +112,17 @@ static void get_command(void)
#ifdef CHECK_SP
static char firstcall = 1;
static unsigned int good_sp;
unsigned int sp;
unsigned int c_sp;
if (firstcall)
sp = good_sp = getsp();
c_sp = good_sp = getsp();
else
sp = getsp();
c_sp = getsp();
if (sp != good_sp) {
printf("SP: 0x%04X ***MISMATCH*** 0x%04X\n", sp, good_sp);
if (c_sp != good_sp) {
printf("SP: 0x%04X ***MISMATCH*** 0x%04X\n", c_sp, good_sp);
}
else if (verbose)
printf("SP: 0x%04X\n", sp);
printf("SP: 0x%04X\n", c_sp);
#endif
arg1 = arg2 = arg3 = NULL;