more sane directory name, updated binaries

This commit is contained in:
FeralChild64 committed 2020-06-26 19:44:01 +02:00
1 parent d4d32095d1
commit 76aaf298b8
697 files changed
+56 -56

No files matched your search

+77
View File
@@ -0,0 +1,77 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Helper routine, based on code by djmips from:
// - https://codebase64.org/doku.php?id=base:8bit_multiplication_16bit_product_fast_no_tables
//
// input: .A (and Zero flag set according to .A), INDEX+3
// output: .X (high byte), .A (low byte), carry always clear
//
mul_FAC2_FAC1_8x8:
// Special case (optimization) - handle 0 in INDEX+2
beq mul_FAC2_FAC1_8x8_zero
sta INDEX+2
lda #$00
dec INDEX+3 // decrement because we will be adding with carry set for speed (an extra one)
ror INDEX+2
bcc !+
adc INDEX+3
!:
ror
ror INDEX+2
bcc !+
adc INDEX+3
!:
ror
ror INDEX+2
bcc !+
adc INDEX+3
!:
ror
ror INDEX+2
bcc !+
adc INDEX+3
!:
ror
ror INDEX+2
bcc !+
adc INDEX+3
!:
ror
ror INDEX+2
bcc !+
adc INDEX+3
!:
ror
ror INDEX+2
bcc !+
adc INDEX+3
!:
ror
ror INDEX+2
bcc !+
adc INDEX+3
!:
ror
ror INDEX+2
inc INDEX+3
tax
lda INDEX+2
clc
rts
mul_FAC2_FAC1_8x8_zero:
lda #$00
tax
clc
rts