a guest Jul 12th, 2018 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- LAST_ENTRY SET $00 ; initially set to 0/null
- ;; probably getting the syntax wrong
- defword MACRO
- CUR_ENTRY SET @ ; stash address of current entry
- dw LAST_ENTRY ; lay down previous address
- db \1 ; lay down argument
- LAST_ENTRY SET CUR_ENTRY ; update prev address
- ;; if code starts at address $100
- defword 'test'
- defword 'test2'
- defword 'test3'
- ;; should result in
- dw $00
- db 'test'
- dw $106 ; pointer to 'test' entry
- db 'test2'
- dw $10D ; pointer to 'test2' entry
- db 'test3'
RAW Paste Data