1
0
mirror of https://github.com/safiire/n65.git synced 2024-12-12 00:29:03 +00:00
n65/examples/beep.asm

25 lines
526 B
NASM
Raw Normal View History

; Create an iNES header
.ines {"prog": 1, "char": 0, "mapper": 0, "mirror": 1}
; Here is the start of our code
.org $C000
start:
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
forever:
JMP forever
nmi:
RTI
.org $FFFA ; Here are the three interrupt vectors
.dw nmi ; VBlank non-maskable interrupt
.dw start ; When the processor is reset or powers on
.dw $0 ; External interrupt IRQ