]> Joshua Wise's Git repositories - fpgaboy.git/blobdiff - diag.asm
Wire switches back up and remove cclk.
[fpgaboy.git] / diag.asm
index 68ea3f8e9e42ebe67e66a67e594202f182a61070..004935ab0dc80372af5aed45621ee2fc2bc66304 100644 (file)
--- a/diag.asm
+++ b/diag.asm
@@ -7,20 +7,64 @@ main:
        
        ld sp, $DFF0
        
        
        ld sp, $DFF0
        
+       ld c, $07
+       ld a, $04       ;start timer, 4.096KHz
+       ld [c], a
+
+       ld hl, $DF81
+       xor a
+       ld [hl], a
+       
        ld hl, signon
        call puts
        ld hl, signon
        call puts
+       
+       ei
 
        call memtest
 
        call insntest
 
        call waitsw
 
        call memtest
 
        call insntest
 
        call waitsw
+       
+       di
 
        jr main
 
 signon:
        db $0D,$0A,$1B,"[1mFPGABoy Diagnostic ROM",$1B,"[0m",$0D,$0A,0
 
 
        jr main
 
 signon:
        db $0D,$0A,$1B,"[1mFPGABoy Diagnostic ROM",$1B,"[0m",$0D,$0A,0
 
+       section "fuq",HOME[$100]
+irqhand:
+       PUSH AF
+       PUSH BC
+       PUSH DE
+       PUSH HL
+       
+       xor a
+       ld c, $0F       ; ack the irq
+       ld [c], a
+       
+       ld a, $41       ; print A
+       call putc
+       
+       ld hl, $DF81
+       ld a, [hl]
+       ld b, 1
+       add b
+       ld c, $51
+       ld [c], a
+       ld [hl], a
+
+
+       POP HL
+       POP DE
+       POP BC
+       POP AF
+       RETI
+       db $18,$FE,$18,$FE,$18,$FE,$18,$FE,$18,$FE,$18,$FE,$18,$FE,$18,$FE
+       db $18,$FE,$18,$FE,$18,$FE,$18,$FE,$18,$FE,$18,$FE,$18,$FE,$18,$FE
+       db $18,$FE,$18,$FE,$18,$FE,$18,$FE,$18,$FE,$18,$FE,$18,$FE,$18,$FE
+
 ; Memory tester: writes h ^ l to all addresses from C000 to DF80.
 memtest:
        ld hl,memteststr
 ; Memory tester: writes h ^ l to all addresses from C000 to DF80.
 memtest:
        ld hl,memteststr
This page took 0.023362 seconds and 4 git commands to generate.