From: Joshua Wise Date: Mon, 7 Apr 2008 06:50:15 +0000 (-0400) Subject: Don't print A until we have to. X-Git-Url: http://git.joshuawise.com/fpgaboy.git/commitdiff_plain/7e4f4505e544aaefc0fb3f6d9cd50fcdffc6f677?ds=sidebyside Don't print A until we have to. --- diff --git a/diag.asm b/diag.asm index 28fce99..786052e 100644 --- a/diag.asm +++ b/diag.asm @@ -13,7 +13,8 @@ main: ld hl, $DF81 xor a - ld [hl], a + ld [hli], a + ld [hli], a ld hl, signon call puts @@ -44,10 +45,13 @@ irqhand: ld c, $0F ; ack the irq ld [c], a + ld hl, $DF82 + ld a, [hld] + cp 0 + jr z, .noprint ld a, $41 ; print A call putc - - ld hl, $DF81 +.noprint: ld a, [hl] add 1 ld c, $51 @@ -138,6 +142,10 @@ puthex: ; Put two hex nibbles to the serial console. waitsw: ld hl,waitswstr call puts + + ld hl,$DF82 + ld a, 1 + ld [hl], a ld c, $51 xor a