Author Topic: bcall(_DelMem), pointers  (Read 2199 times)

0 Members and 1 Guest are viewing this topic.

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
bcall(_DelMem), pointers
« 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 :)