Skip to content

Instantly share code, notes, and snippets.

@nurpax
Created July 25, 2019 22:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nurpax/5cbb8438e12add2d8cd1723c7459e0ec to your computer and use it in GitHub Desktop.
Save nurpax/5cbb8438e12add2d8cd1723c7459e0ec to your computer and use it in GitHub Desktop.
!include "c64.asm"
+c64::basic_start(entry)
!let zp = {
tmp0: $20,
tmp1: $22,
sprite_idx: $24
}
!let zpi = {
tmp0: $10,
tmp1: $12,
sprite_idx: $14
}
!macro set_sprite(zp, idx) {
lda #idx
sta zp.sprite_idx
}
entry: {
lda #0
; main thread OK
+set_sprite(zp, 0)
; for use in IRQs (no overlapping zero-page)
+set_sprite(zpi, 0)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment