Omnimaga

Calculator Community => TI Calculators => ASM => Topic started by: Xeda112358 on November 19, 2011, 07:12:13 pm

Title: bcall(_DelMem), pointers
Post by: Xeda112358 on November 19, 2011, 07:12:13 pm
I was using DelMem inside a parser hook and directly after that, I tried finding the updated position of a program. For some reason, bcall(_CheckFindSym) returned the old pointer (even though I watched the program data get shifted down in Wabbit's debugger).

So does anybody have any insight as to why this is and how it can be fixed?

EDIT: The code:
Code: [Select]
     bcall(_DelMem)
     ld hl,9652h          ;This is the pointer to the name of a currently executing program
     rst 20h               ;Copies 9 bytes at HL to OP1
     bcall(_CheckFindSym)   ;
     inc de \ inc de
     ld hl,(965Bh)       ;start of the currently executing program
     ld (965Bh),de
     ex de,hl
     sbc hl,de
     ld de,(progPtr)     ;a pointer inside the program
     add hl,de
     ld (progPtr),hl
     ret

EDIT2: Problem fixed :)