Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;put multiplicand into mult1
- ;put multiplier into "multiplier"
- lda #077h
- sta mult1
- lda #055h
- sta multiplier ;multiply 77h by 55h
- lda #0
- ldx #8
- - asl ;shift result left + multiplicand
- rol mult1
- bcc + ;if multiplicand bit is 0, we don't add multiplier to result
- clc
- adc multiplier ;add multiplier to result
- bcc +
- inc mult1 ;add 1 to result if we get a carry
- + dex
- bne - ;loop 8 times to do all 8 bits
- sta mult0
- result is now in mult1/mult0
Add Comment
Please, Sign In to add comment