Advertisement
Guest User

Untitled

a guest
Jul 12th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. LAST_ENTRY  SET $00 ; initially set to 0/null
  2.  
  3. ;; probably getting the syntax wrong
  4.  
  5. defword    MACRO
  6. CUR_ENTRY SET @    ; stash address of current entry
  7.     dw LAST_ENTRY  ; lay down previous address
  8.     db \1          ; lay down argument
  9. LAST_ENTRY SET CUR_ENTRY  ; update prev address
  10.     ENDM
  11.  
  12. ;; if code starts at address $100
  13. defword 'test'
  14. defword 'test2'
  15. defword 'test3'
  16.  
  17. ;; should result in
  18.     dw $00
  19.     db 'test'
  20.  
  21.     dw $106   ; pointer to 'test' entry
  22.     db 'test2'
  23.  
  24.     dw $10D   ; pointer to 'test2' entry
  25.     db 'test3'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement