summaryrefslogtreecommitdiff
path: root/main.asm
blob: 6863d3dbbd5e6ceb05719e5145231239125c9299 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
	processor	65c816

	option  output-file,"main.lib"
	option	output-format,lib

	option	snes-irq,vbl,vbl_handler
	option	snes-irq,irq,irq_handler

	; Initialise SNES 
	;
	org	$8000
	bank	0

	include	init.asm

	; Set the background color to green.
	sep     #$20        ; Set the A register to 8-bit.
	lda     #%10000000  ; Force VBlank by turning off the screen.
	sta     $2100
	lda     #%11100000  ; Load the low byte of the green color.
	sta     $2122
	lda     #%00000000  ; Load the high byte of the green color.
	sta     $2122
	lda     #%00001111  ; End VBlank, setting brightness to 15 (100%).
	sta     $2100

	; Loop forever.
Forever:
	jmp Forever


; IRQ vectors
;

vbl_handler:
	rti

irq_handler:
	rti