I try to write a multiply code from c to assembly from 1 to 50 like:
1 MUL 1
2 MUL 2
and so on but when its 4 MUL 4
doesn't give a right number it give me the character @
.
I wrote it in assembly 8086 code can you help me to know where is the problem cause I am new at it
.MODEL SMALL
.DATA
Y DW 50 DUP (?)
.CODE
MOV AX,@DATA
MOV DS,AX
MOV WORD PTR SI,OFFSET Y
MOV Cx,1
L1:
MOV Ax,Cx
IMUL Ax
ADD Ax,30H
MOV [SI],Ax
MOV Dx,[SI]
ADD SI,2
MOV Ah,02H
INT 21H
INC Cx
CMP Cx,51
JE L2
JMP L1
L2:
.EXIT
END