Skip to content

Instantly share code, notes, and snippets.

@devinacker
Created August 11, 2018 23:57
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 devinacker/b4e2ca9796eacf2c86e0111743c53a03 to your computer and use it in GitHub Desktop.
Save devinacker/b4e2ca9796eacf2c86e0111743c53a03 to your computer and use it in GitHub Desktop.
.p816
.code
main:
sei
stz $4207 ; IRQ at H=0
stz $4208 ; (leave IRQ disable flag set so it only resumes after WAI)
lda #%00010000
sta $4200
wai
bit $4211
ldx #0
: lda #0
: wai ; go back to sleep
bit $4211 ; hit the snooze button
sta $2180,x ; hit something else
inc
bne :-
inx
bpl :--
stp
.segment "BOOT"
.addr main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment