Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;Slightly inefficient
- ;zp_base=$80
- ;foo1=zp_base+0
- ;foo2=zp_base+1
- ;foo3=zp_base+2
- ;bar1=zp_base+3
- ;bar2-bar98
- ;bar99=zp_base+101
- ;If you need to add foo4 you have to retype bar1-bar99 :(
- ;Slightly more efficient
- .macro var name
- name=zp_counter
- zp_counter .set zp_counter+1
- .endmacro
- zp_base=$80
- zp_counter .set zp_base
- var foo1
- var foo2
- var foo3
- var bar1
- ;bar2-98
- var bar99
- .org $C000
- LDA foo1
- LDA foo2
- LDA foo3
- .out .sprintf("%d of %d zero page bytes used",zp_counter-zp_base,255-zp_base)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement