Ah that's better
used the appropriate instruction for comparison
This commit is contained in:
parent
f7082ab371
commit
5cf64970c8
1 changed files with 19 additions and 14 deletions
33
mandel.s
33
mandel.s
|
|
@ -398,6 +398,11 @@ viewport_oy:
|
||||||
.dword ($fffe0000 & $3fffffff) << 2
|
.dword ($fffe0000 & $3fffffff) << 2
|
||||||
.dword $ff000000
|
.dword $ff000000
|
||||||
|
|
||||||
|
elapsed_work:
|
||||||
|
.dword 0
|
||||||
|
elapsed_digit:
|
||||||
|
.byte 0
|
||||||
|
|
||||||
; 2 + 9 * byte cycles
|
; 2 + 9 * byte cycles
|
||||||
.macro add bytes, dest, arg1, arg2
|
.macro add bytes, dest, arg1, arg2
|
||||||
clc ; 2 cyc
|
clc ; 2 cyc
|
||||||
|
|
@ -1979,12 +1984,12 @@ update_status:
|
||||||
ldx #.lobyte(total_sec)
|
ldx #.lobyte(total_sec)
|
||||||
ldy #.hibyte(total_sec)
|
ldy #.hibyte(total_sec)
|
||||||
jsr FLD0R
|
jsr FLD0R
|
||||||
; FR0 -> integer -> temp
|
; FR0 -> integer -> elapsed_work
|
||||||
jsr FPI
|
jsr FPI
|
||||||
lda FR0
|
lda FR0
|
||||||
sta temp
|
sta elapsed_work
|
||||||
lda FR0 + 1
|
lda FR0 + 1
|
||||||
sta temp + 1
|
sta elapsed_work + 1
|
||||||
|
|
||||||
;jsr IFP
|
;jsr IFP
|
||||||
;jsr FASC
|
;jsr FASC
|
||||||
|
|
@ -1995,28 +2000,28 @@ update_status:
|
||||||
; count the hours
|
; count the hours
|
||||||
ldx #0
|
ldx #0
|
||||||
countdown_loop:
|
countdown_loop:
|
||||||
lda temp + 1
|
lda elapsed_work + 1
|
||||||
cmp #.hibyte(divisor)
|
cmp #.hibyte(divisor)
|
||||||
bmi countdown_done
|
bcc countdown_done
|
||||||
lda temp
|
lda elapsed_work
|
||||||
cmp #.lobyte(divisor)
|
cmp #.lobyte(divisor)
|
||||||
bmi countdown_done
|
bcc countdown_done
|
||||||
sec
|
sec
|
||||||
lda temp
|
lda elapsed_work
|
||||||
sbc #.lobyte(divisor)
|
sbc #.lobyte(divisor)
|
||||||
sta temp
|
sta elapsed_work
|
||||||
lda temp + 1
|
lda elapsed_work + 1
|
||||||
sbc #.hibyte(divisor)
|
sbc #.hibyte(divisor)
|
||||||
sta temp + 1
|
sta elapsed_work + 1
|
||||||
inx
|
inx
|
||||||
jmp countdown_loop
|
jmp countdown_loop
|
||||||
countdown_done:
|
countdown_done:
|
||||||
lda digits,x
|
lda digits,x
|
||||||
eor #$80
|
eor #$80
|
||||||
sta temp2
|
sta elapsed_digit
|
||||||
lda #.lobyte(temp2)
|
lda #.lobyte(elapsed_digit)
|
||||||
sta INBUFF
|
sta INBUFF
|
||||||
lda #.hibyte(temp2)
|
lda #.hibyte(elapsed_digit)
|
||||||
sta INBUFF + 1
|
sta INBUFF + 1
|
||||||
jsr draw_string
|
jsr draw_string
|
||||||
.endscope
|
.endscope
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue