From 7e4f4505e544aaefc0fb3f6d9cd50fcdffc6f677 Mon Sep 17 00:00:00 2001 From: Joshua Wise Date: Mon, 7 Apr 2008 02:50:15 -0400 Subject: [PATCH 1/1] Don't print A until we have to. --- diag.asm | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) 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 -- 2.43.0