دوستا کسی می تونه این کد رو توضیح بده که چیکار کرده ؟؟
EXTRN MULU32 : FAR
PUBLIC MULS 32
DSEG SEGMENT PARA
′DATA′
NEG_IND DB ?
DSEG ENDS
CSEG SEGMENT PARA
′CODE′
MULS32 PROC FAR
ASSUME CS:CSEG , DS:DSEG
; Initialize the data segment address
PUSH DS ;Save caller’s DS and DI
PUSH DI
MOV DI, DSEG ;Initialize DS
MOV DS , DI
MOV NEG_IND,0 ;Negative indicator=0
CMP DX, 0 ;Multiplicand negative?
JNS CHKCX ;No. Go check multiplier
NOT AX ;Yes.2s-comp.multiplicand
NOT DX
ADD AX,1
ADC DX,0
NOT NEG_IND ;and 1s-comp. Indicator
CHKCX: CMP CX,0 ;Multiplier negative?
JNS GOMUL ;No. Go multiply
NOT BX ;Yes. 2s-comp. Multiplier
NOT CX
ADD BX,1
ADC CX,0
NOT NEG_IND ;and 1s-comp. Indicator
2٤٩
GOMUL: CALL MULU32 ;Perform unsigned multiplication
CMP NEG_IND,0 ;Does product have right sign?
JZ DONE ;Yes. Exit.
NOT AX ;No. 2s-comp. Product
NOT BX
NOT CX
NOT DX
ADD AX,1
ADC BX,0
ADC CX,0
ADC DX,0
DONE: POP DI ;Restore caller’s registers
POP DS
RET
MULS32 ENDP
CSEG ENDS
ENِD