Last active
March 9, 2017 22:00
-
-
Save gnacu/5376866faad0cdcfc2d8bb5f5d636c14 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
freemenu bne chkchild | |
lda ptr+1 | |
sta rootpg | |
beq menuend | |
ldy #1 ;Free 1 Page | |
jsr pgfree | |
chkchild ldy #childptr+1 | |
lda (ptr),y ;Get hi childptr | |
beq nextsib | |
#saveptr ptr | |
#moveptr childptr | |
jsr freemenu ;Recurse!! | |
#fetchptr ptr | |
nextsib #moveptr nextptr ;Next sibling | |
jmp freemenu | |
menuend rts | |
.bend |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment