I wanted to see if my understanding is correct on this... I figured out multiplication, but I'm not quite sure how division would work. Please correct any mistakes.
Code:
Code:
[/code]
Code:
Rla Multiplication
a * b
1. RRA B
2. Push the flags (af)
3. RLA A, DEC B
4. Repeat 3 until B=0
5. Pop the flags (af)
6. If c, then add the original a to a. If nc, you are done.
Code:
Rra Division
a / b
1. RRA B
2. Push the flags (af)
3. RRA A, DEC B
4. Repeat 3 until B=0
5. Pop the flags (af)
6. If nc, you are done. If c, [what would I do here?]