Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; Clears all memory accociated with a thread
- ; inputs a = Thread ID
- FreeThreadMem:
- push af
- push bc
- push de
- push hl
- ld hl,UserRAM
- ld d,a
- FTMLoop ld a,(hl)
- push hl
- pop ix
- cp d
- call z,FreeMem
- _ inc hl
- ld c,(hl)
- inc hl
- ld b,(hl)
- _ inc hl
- djnz -_
- inc hl
- inc hl
- ; compare hl with UserRAMEnd
- ; if hl is smaller then jump back to FTMLoop
- ; otherwise continue
- pop hl
- pop de
- pop bc
- pop af
- ret
Add Comment
Please, Sign In to add comment