8 lines
318 B
Text
8 lines
318 B
Text
MULTIPLY: STX MULN ; 6502 has no "acc += xreg" instruction,
|
|
TXA ; so use a memory address
|
|
MULLOOP: DEY
|
|
CLC ; remember to clear the carry flag before
|
|
ADC MULN ; doing addition or subtraction
|
|
CPY #$01
|
|
BNE MULLOOP
|
|
RTS
|