From 839330edb326ad2b7fbcf25f9886d9d14696280d Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sun, 5 Feb 2023 15:14:24 -0800 Subject: [PATCH] fixes --- mandel.s | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/mandel.s b/mandel.s index 1a153de..097b700 100644 --- a/mandel.s +++ b/mandel.s @@ -772,13 +772,14 @@ loop_sx: jsr mandelbrot jsr pset + ; check if we should update the counters ; ; count_pixels >= width? update! inc count_pixels lda count_pixels cmp #width - bpl update_status + bmi update_status ; count_frames >= 120? update! lda count_frames @@ -820,14 +821,13 @@ update_status: ; FR0 *= ms_per_frame ldx #.lobyte(ms_per_frame) ldy #.hibyte(ms_per_frame) + jsr FLD1R jsr FMUL - ; FR1 = total_ms + ; FR0 += total_ms ldx #total_ms ldy #0 jsr FLD1R - - ; FR0 += FR1 jsr FADD ; total_ms = FR0 @@ -835,12 +835,10 @@ update_status: ldy #0 jsr FST0R - ; FR1 = total_pixels + ; FR0 /= total_pixels ldx #total_pixels ldy #0 jsr FLD1R - - ; FR0 /= FR1 jsr FDIV ; convert to ASCII in INBUFF