2015-03-22 06:42:21 +00:00
|
|
|
; Create an iNES header
|
|
|
|
.ines {"prog": 1, "char": 0, "mapper": 0, "mirror": 1}
|
2015-02-18 11:05:18 +00:00
|
|
|
|
|
|
|
; Here is the start of our code
|
2015-03-22 06:42:21 +00:00
|
|
|
.org $C000
|
|
|
|
.scope main
|
2015-02-18 03:05:37 +00:00
|
|
|
LDA #$01 ; square 1
|
|
|
|
STA $4015
|
2015-03-01 01:43:43 +00:00
|
|
|
LDA #$F8 ; period low
|
2015-02-18 03:05:37 +00:00
|
|
|
STA $4002
|
|
|
|
LDA #$02 ; period high
|
|
|
|
STA $4003
|
|
|
|
LDA #$BF ; volume
|
|
|
|
STA $4000
|
2015-03-22 06:42:21 +00:00
|
|
|
forever:
|
|
|
|
JMP forever
|
2015-02-18 11:05:18 +00:00
|
|
|
|
2015-03-22 06:42:21 +00:00
|
|
|
nothing:
|
2015-02-18 11:05:18 +00:00
|
|
|
RTI
|
|
|
|
|
|
|
|
.org $FFFA ; Here are the three interrupt vectors
|
2015-03-22 06:42:21 +00:00
|
|
|
.dw nothing ; VBlank non-maskable interrupt
|
|
|
|
.dw main ; When the processor is reset or powers on
|
|
|
|
.dw nothing ; External interrupt IRQ
|