Advertisement
Guest User

Untitled

a guest
Jul 11th, 2019
399
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     ZP_LOCALS .SET $200 ;Start of free zero page memory
  2. .MACRO LOCAL arg
  3.     .DEFINE arg ZP_LOCALS
  4.     ZP_LOCALS .SET ZP_LOCALS+1
  5. .ENDMACRO
  6.  
  7. start:
  8.     LOCAL i
  9.     LOCAL j
  10.     LDA #5
  11.     STA i   ;WRONG!
  12.     ;i is replaced with "ZP_LOCALS" ($202) rather than $200, the value at expansion
  13.     STA j   ;WRONG
  14.     ;i is replaced with "ZP_LOCALS" ($202) rather than $201, the value at expansion
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement