;;MSB OF RESULT IN BX REGISTER AND LSB IN AX ;;REGISTER
DATA SEGMENT
INST DW 0FF01H,0ACFH
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA
START:
MOV AX,DATA
MOV DS,AX
LEA SI,INST
MOV CX,[SI]
MOV AX,0000
ADD AX,[SI+2]
JNC DOWN
INC BX
DOWN:LOOP UP
INT 3
CODE ENDS
END START
END
DATA SEGMENT
INST DW 0FF01H,0ACFH
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA
START:
MOV AX,DATA
MOV DS,AX
LEA SI,INST
MOV CX,[SI]
MOV AX,0000
ADD AX,[SI+2]
JNC DOWN
INC BX
DOWN:LOOP UP
INT 3
CODE ENDS
END START
END
could u explain this?
ReplyDeleteYou have given program for multiplication of two 16 bit numbers NOT two 32 bit numbers. If you use MUL instruction the program will be simpler
ReplyDelete