From 4761a5723f0ed60abf4375937a670d960913c98d Mon Sep 17 00:00:00 2001 From: Ivo van Poorten Date: Thu, 5 Sep 2024 20:50:59 +0200 Subject: [PATCH] dinfo: replace several labels by structured programming macros. binary is identical to previous binary. --- apps/dinfo.asm | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/apps/dinfo.asm b/apps/dinfo.asm index 36543192..aee4a86f 100644 --- a/apps/dinfo.asm +++ b/apps/dinfo.asm @@ -186,12 +186,12 @@ success: ldx #7 .zrepeat lsr A - bcs used - inc val1 - .zif eq - inc val1+1 + .zif cc + inc val1 + .zif eq + inc val1+1 + .zendif .zendif - used: inc count .zif eq inc count+1 @@ -199,11 +199,11 @@ success: pha lda count+1 cmp dsm+1 - bne notyet - lda count - cmp dsm - beq stop \ stop condition - notyet: + .zif eq + lda count + cmp dsm + beq stop \ stop condition + .zendif pla dex .zuntil mi @@ -222,11 +222,10 @@ stop: dex dex stx count \ save bsh-3 for later - beq no_shift - - jsr shift_val1_left_by_x + .zif ne + jsr shift_val1_left_by_x + .zendif -no_shift: lda val1 ldx val1+1 ldy #0 @@ -245,11 +244,10 @@ no_shift: lda dsm+1 sta val1+1 ldx count - beq no_shift2 - - jsr shift_val1_left_by_x + .zif ne + jsr shift_val1_left_by_x + .zendif -no_shift2: lda val1 ldx val1+1 ldy #0