## Search Hot search: Activities Personals Discuz

# Reward for a compilation question

Newbie Credits
3.00 China Post time: 2020-9-28 13:30:01
| Show all posts |Read mode
 Enter two arbitrary four-digit decimal numbers to multiply, and display the result! ! Thank you for taking a look! !

Newbie Credits
13.00 China Post time: 2020-9-30 09:45:01
| Show all posts
 0 ascii -> bin 1 mul 2 bin -> ascii

Newbie Credits
3.00 China Author| Post time: 2020-9-30 20:30:01
| Show all posts
 Is there any expert to solve it?

Newbie Credits
5.00 China Post time: 2020-9-30 21:30:01
| Show all posts
 4-digit decimal, up to 9999, two bytes are enough, that is, two bytes multiplied by two bytes, double-byte binary unsigned number multiplication: ; Entry conditions: the multiplicand is in R2 and R3, and the multiplier is in R6 and R7. ;Exit information: the product is in R2, R3, R4, R5. ; Affected resources: PSW, A, B, R2 ~ R7 Stack requirements: 2 bytes MULD: MOV A, R3; calculate R3 and multiply R7 MOV B, R7 MUL AB MOV R4, B; Temporarily store partial product MOV R5,A MOV A, R3; calculate R3 by R6 MOV B, R6 MUL AB ADD A, R4; accumulate partial product MOV R4,A CLR A ADDC A,B MOV R3,A MOV A, R2; calculate R2 multiplied by R7 MOV B, R7 MUL AB ADD A, R4; accumulate partial product MOV R4,A MOV A, R3 ADDC A,B MOV R3,A CLR A RLC A XCH A, R2; calculate R2 by R6 MOV B, R6 MUL AB ADD A, R3; accumulate partial product MOV R3,A MOV A, R2 ADDC A,B MOV R2,A RET