]> Joshua Wise's Git repositories - fpgaboy.git/blame_incremental - rom.asm
It works, but why?
[fpgaboy.git] / rom.asm
... / ...
CommitLineData
1 SECTION "a",HOME
2
3main:
4 ld c, $51 ; Note that we are alive.
5 ld a, $FF
6 ld [c],a
7
8 ld sp, $DFF0
9
10; ld hl, $DF81
11; ld a, $80
12; ld [hl], a
13
14; ld c, $07
15; ld a, $07 ;start timer, 4.096KHz
16; ld [c], a
17;diqs: ei
18; ld a, $80
19; ld c, $51
20; ld [c], a
21; jr diqs
22 call irqhand
23coqs: jr coqs
24
25 section "Diq", HOME[$38]
26fuqed:
27 di
28 jr fuqed
29
30 section "fuq",HOME[$100]
31irqhand:
32 PUSH AF
33 PUSH BC
34 PUSH DE
35 PUSH HL
36
37; ld c, $51
38; ld a, $F0
39; ld [c], a
40
41 xor a
42 ld c, $0F ; ack the irq
43 ld [c], a
44
45 ;ld a, $41 ; print A
46 ;call putc
47
48; ld hl, $DF81
49; ld a, [hl]
50; ld b, 1
51; add b
52 ld a, $08
53 ld hl, $FF51
54; ld c, $51
55 nop
56 nop
57 ld [hl], a
58
59
60; ld c, $51
61; ld a, $0F
62; ld [c], a
63
64 POP HL
65 POP DE
66 POP BC
67 POP AF
68 RETI
69 db $18,$FE,$18,$FE,$18,$FE,$18,$FE,$18,$FE,$18,$FE,$18,$FE,$18,$FE
70 db $18,$FE,$18,$FE,$18,$FE,$18,$FE,$18,$FE,$18,$FE,$18,$FE,$18,$FE
71 db $18,$FE,$18,$FE,$18,$FE,$18,$FE,$18,$FE,$18,$FE,$18,$FE,$18,$FE
This page took 0.026916 seconds and 4 git commands to generate.