]>
Commit | Line | Data |
---|---|---|
616eebe0 | 1 | SECTION "a",HOME |
20204e79 | 2 | |
616eebe0 | 3 | main: |
20204e79 | 4 | ld c, $51 ; Note that we are alive. |
616eebe0 JW |
5 | ld a, $FF |
6 | ld [c],a | |
62940da0 | 7 | |
9c834ff2 JW |
8 | ld sp, $DFF0 |
9 | ||
5bac4cf0 JW |
10 | ; ld hl, $DF81 |
11 | ; ld a, $80 | |
12 | ; ld [hl], a | |
9c834ff2 JW |
13 | |
14 | ; ld c, $07 | |
5bac4cf0 | 15 | ; ld a, $07 ;start timer, 4.096KHz |
9c834ff2 | 16 | ; ld [c], a |
5bac4cf0 JW |
17 | ;diqs: ei |
18 | ; ld a, $80 | |
19 | ; ld c, $51 | |
20 | ; ld [c], a | |
21 | ; jr diqs | |
22 | call irqhand | |
23 | coqs: jr coqs | |
20204e79 | 24 | |
5bac4cf0 JW |
25 | section "Diq", HOME[$38] |
26 | fuqed: | |
31833112 | 27 | di |
5bac4cf0 | 28 | jr fuqed |
20204e79 | 29 | |
5bac4cf0 | 30 | section "fuq",HOME[$100] |
31833112 JW |
31 | irqhand: |
32 | PUSH AF | |
33 | PUSH BC | |
34 | PUSH DE | |
35 | PUSH HL | |
9c834ff2 JW |
36 | |
37 | ; ld c, $51 | |
38 | ; ld a, $F0 | |
39 | ; ld [c], a | |
40 | ||
31833112 JW |
41 | xor a |
42 | ld c, $0F ; ack the irq | |
43 | ld [c], a | |
9c834ff2 JW |
44 | |
45 | ;ld a, $41 ; print A | |
46 | ;call putc | |
47 | ||
5bac4cf0 JW |
48 | ; ld hl, $DF81 |
49 | ; ld a, [hl] | |
9c834ff2 JW |
50 | ; ld b, 1 |
51 | ; add b | |
5bac4cf0 JW |
52 | ld a, $08 |
53 | ld hl, $FF51 | |
54 | ; ld c, $51 | |
55 | nop | |
56 | nop | |
57 | ld [hl], a | |
9c834ff2 JW |
58 | |
59 | ||
60 | ; ld c, $51 | |
61 | ; ld a, $0F | |
62 | ; ld [c], a | |
63 | ||
31833112 JW |
64 | POP HL |
65 | POP DE | |
66 | POP BC | |
67 | POP AF | |
68 | RETI | |
5bac4cf0 JW |
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 |