Compare commits
1 commit
| Author | SHA1 | Date | |
|---|---|---|---|
| fa0de6dc77 |
1 changed files with 4 additions and 4 deletions
8
mandel.s
8
mandel.s
|
|
@ -588,7 +588,7 @@ bank_switch_table:
|
|||
.macro imul8 dest, arg1, arg2, xe
|
||||
.if xe
|
||||
; using 64KB lookup table
|
||||
; 51-70 cycles
|
||||
; 50-70 cycles
|
||||
; clobbers x, y, dest, ptr
|
||||
.scope
|
||||
output = dest
|
||||
|
|
@ -600,13 +600,13 @@ bank_switch_table:
|
|||
|
||||
; bottom 14 bits except the LSB are the per-bank table index
|
||||
; add $4000 for the bank pointer
|
||||
txa ; 2 cyc
|
||||
and #$3f ; 2 cyc
|
||||
ora #$40 ; 2 cyc
|
||||
sta ptr + 1 ; 3 cyc
|
||||
|
||||
; copy the entry into output
|
||||
lda arg1 ; 3 cyc
|
||||
tax ; 2 cyc
|
||||
and #$fe ; 2 cyc
|
||||
tay ; 2 cyc
|
||||
lda (ptr),y ; 5 cyc
|
||||
|
|
@ -623,13 +623,13 @@ bank_switch_table:
|
|||
;;sta PORTB ; 4 cyc - disabled
|
||||
|
||||
; check that 1 bit we skipped to fit into space
|
||||
lda arg1 ; 3 cyc
|
||||
txa ; 2 cyc
|
||||
and #1 ; 2 cyc
|
||||
beq done ; 2 cyc
|
||||
|
||||
; add arg2 one last time for the skipped bit
|
||||
clc ; 2 cyc
|
||||
txa ; 2 cyc
|
||||
lda arg1 ; 3 cyc
|
||||
adc output ; 3 cyc
|
||||
sta output ; 3 cyc
|
||||
lda #0 ; 2 cyc
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue