]> Joshua Wise's Git repositories - fpgaboy.git/blame_incremental - flashdiag.asm
Fix POP AF test (from blargg's CPU tests)
[fpgaboy.git] / flashdiag.asm
... / ...
CommitLineData
1 SECTION "wee",HOME[$0]
2 ld sp, $CFFF
3 ld hl, $FF60
4 ld a, $FF
5 ld [hli], a
6 ld [hli], a
7 ld [hli], a
8 ld a, $90 ; device info
9 ld [$FF65], a
10
11 call rn+$FF80
12
13 ld a, [$FF65] ; 0000
14 call puthex + $FF80
15
16 call rn+$FF80
17
18 ld a, [$FF65] ; 0000
19 call puthex + $FF80
20
21 call rn+$FF80
22
23 jp $0000
24
25puthex:
26 push af
27 swap a
28 and $0F
29 ld hl, hexdig+$FF80
30 add l
31 ld l, a
32 ld a, [hl]
33 call putc+$FF80
34 pop af
35 and $0F
36 ld hl, hexdig+$FF80
37 add l
38 ld l, a
39 ld a, [hl]
40 call putc+$FF80
41 ret
42
43hexdig:
44 db "0123456789ABCDEF"
45
46putc:
47 ld c, $53
48 push af
49.waitport:
50 ld a,[c]
51 and $01
52 jr nz,.waitport
53 pop af
54 ld [$FF52],a
55 ret
56
57rn:
58 ld a, 13
59 call putc+$FF80
60 ld a, 10
61 jr putc
62
63
64 section "a", HOME[$7E]
65 nop
This page took 0.020748 seconds and 4 git commands to generate.