forked from brooke/mandel-6502
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 $ff000000
|
||||
|
||||
elapsed_work:
|
||||
.dword 0
|
||||
elapsed_digit:
|
||||
.byte 0
|
||||
|
||||
; 2 + 9 * byte cycles
|
||||
.macro add bytes, dest, arg1, arg2
|
||||
clc ; 2 cyc
|
||||
|
|
@ -1979,12 +1984,12 @@ update_status:
|
|||
ldx #.lobyte(total_sec)
|
||||
ldy #.hibyte(total_sec)
|
||||
jsr FLD0R
|
||||
; FR0 -> integer -> temp
|
||||
; FR0 -> integer -> elapsed_work
|
||||
jsr FPI
|
||||
lda FR0
|
||||
sta temp
|
||||
sta elapsed_work
|
||||
lda FR0 + 1
|
||||
sta temp + 1
|
||||
sta elapsed_work + 1
|
||||
|
||||
;jsr IFP
|
||||
;jsr FASC
|
||||
|
|
@ -1995,28 +2000,28 @@ update_status:
|
|||
; count the hours
|
||||
ldx #0
|
||||
countdown_loop:
|
||||
lda temp + 1
|
||||
lda elapsed_work + 1
|
||||
cmp #.hibyte(divisor)
|
||||
bmi countdown_done
|
||||
lda temp
|
||||
bcc countdown_done
|
||||
lda elapsed_work
|
||||
cmp #.lobyte(divisor)
|
||||
bmi countdown_done
|
||||
bcc countdown_done
|
||||
sec
|
||||
lda temp
|
||||
lda elapsed_work
|
||||
sbc #.lobyte(divisor)
|
||||
sta temp
|
||||
lda temp + 1
|
||||
sta elapsed_work
|
||||
lda elapsed_work + 1
|
||||
sbc #.hibyte(divisor)
|
||||
sta temp + 1
|
||||
sta elapsed_work + 1
|
||||
inx
|
||||
jmp countdown_loop
|
||||
countdown_done:
|
||||
lda digits,x
|
||||
eor #$80
|
||||
sta temp2
|
||||
lda #.lobyte(temp2)
|
||||
sta elapsed_digit
|
||||
lda #.lobyte(elapsed_digit)
|
||||
sta INBUFF
|
||||
lda #.hibyte(temp2)
|
||||
lda #.hibyte(elapsed_digit)
|
||||
sta INBUFF + 1
|
||||
jsr draw_string
|
||||
.endscope
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue