data segment
num1 dw 1111h
num2 dw 2222h
prod dw 2 dup (0)
data ends
code segment
assume cs:code,ds:data
start:
mov ax,data
mov ds,ax
mov ax,num1
mul num2
lea si,prod
mov [si],ax
add si,2
mov [si],dx
mov ah,4ch
int 21h
code ends
end start
Thursday, October 29, 2009
Subscribe to:
Post Comments (Atom)
DATA SEGMENT
ReplyDeleteMT DW 1234H, 1234H
MR DW 1111H, 1111H
PD DW 4 DUP(0)
DATA ENDS
CODE SEGMENT
ASSUME DS:DATA, CS:CODE
START: MOV AX,DATA
MOV DS,AX
CLC
MOV DX,0000H
MOV BX,0002H
MOV CL,02H
MOV SI,0002H
RPT: MOV AX,MT[SI]
MUL MR[BX]
ADD PD[SI+4],AX
ADC PD[SI+2],DX
CLC
DEC SI
DEC SI
DEC CL
JNZ RPT
CLC
DEC BX
DEC BX
MOV CL,02H
MOV SI,0002H
CONT: MOV AX,MT[SI]
MUL MR[BX]
ADD PD[SI+2],AX
ADC PD[SI],DX
CLC
DEC SI
DEC SI
DEC CL
JNZ CONT
INT 3H
CODE ENDS
END START
correct it.........its challenge
hint hexa multiplication.....
halaaaaaaaaaaaa
ReplyDeletewjah ki ya ??
ReplyDeleteif u dont make correct code then why are u doing this type of idiot things???
bastard
ReplyDeletechwl admi
ReplyDeletecoder mango lainay gaye hain aap kay
ReplyDeletesahe code nahe ata
behn nu L....
l means light :)
ReplyDelete