第一个:
MULBIN: MOV A,R1
MOV R6,A
MOV R7,#04H
CLEAR: MOV @R1,#00H
INC R1
DJNZ R7,CLEAR
MOV A,R6
MOV R1,A
MUL1: MOV A,R2
MOV B,R4
MUL AB
ACALL ADDM
MOV A,R2
MOV B,R5
MUL AB
ACALL ADDM
MOV A,R3
MOV B,R4
MUL AB
DEC R1
ACALL ADDM
MOV A,R3
MOV B,R5
MUL AB
ACALL ADDM
MOV A,R6
MOV R1,A
RET
ADDM: ADD A,@R1
MOV @R1,A
MOV A,B
INC R1
ADDC A,@R1
MOV @R1,A
INC R1
MOV A,@R1
ADDC A,#00H
MOV @R1,A
DEC R1
RET
第二个:
ORG 4000H
BSUB: MOV DPTR,#3000H
MOVX A,@DPTR
MOV R2,A
INC DPTR
MOVX A,@DPTR
MOV R3,A
INC DPTR
MOVX A,@DPTR
MOV R6,A
INC DPTR
MOVX A,@DPTR
MOV R7,A
LCALL ASUB
MOV A,R4
INC DPTR
MOVX @DPTR,A
MOV A,R5
INC DPTR
MOVX @DPTR,A
ASUB: MOV A,R3
CLR C
SUBB A,R7
MOV R5,A
MOV A,R2
SUBB A,R6
MOV R4,A
RET
RET
------解决方案--------------------
第一个:(R2,R3)*(R4,R5)->@R1
------解决方案--------------------
51单片机的,不是z80的