Is this in the FX update?There's 16 bit multiplication in the new VERA
I'm not sure if this would be useful in my case. I'd need both add, sub, mul and div both signed and unsigned.
Is this in the FX update?There's 16 bit multiplication in the new VERA
Code: Select all
.macro math_ADD_16_16 operand, result
clc
lda result
adc operand
sta result
lda result+1
adc operand+1
sta result+1
.endmacro
.
Code: Select all
macro math_SUB_16_16 minuend, result
sec
lda result
sbc minuend
sta result
lda result+1
sbc minuend+1
sta result+1
.endmacro
Code: Select all
.macro math_SHIFT_DOWN_16 num_bits, addr16
phx
ldx num_bits
beq :++ ; Do nothing if 0 bits
:
clc
lda addr16+1
ror
sta addr16+1
lda addr16
ror
sta addr16
dex
bne :-
:
plx
.endmacro
I would love to take a look at your files and regarding the "expert" thing, I haven't done any real work in asm since 1994 in 16bit x86 asm in DOS, so in any case you'd be an expert compared to me : )Also, before you say "Send me your macros!" (Which I would gladly do.) Bear in mind that while I have decades of experience with C, I'm only been using the 65c02 in any serious capacity since last November, So I should not be considered an "expert."