The MASM Forum Archive 2004 to 2012

Miscellaneous Forums => 16 bit DOS Programming => Topic started by: vijaysutar_1988 on January 30, 2011, 04:32:53 AM

Title: Need Help in Running this program...........
Post by: vijaysutar_1988 on January 30, 2011, 04:32:53 AM
I just now installed masm32 and in editor i have written this code...
bt now i dont know how to assemble and link this code in masm32...

can anybody help me to make it work....

the program which i written is....

DATA SEGMENT
DP1 DB 09H
DP2 01H
DATA ENDS

CODE SEGMENT
ASSUME CS:CODE, DS:DATA
MOV AX,DATA
MOV DS,AX

MOV AL,OP1
MOV DL,AL
ADD DL,30H
MOV AH,02H
INT 21H

MOV BL,OP2
MOV DL,BL
ADD DL,30H
MOV AH,02H
INT 21H

ADD AL,BL
MOV DL,AL
ADD DL,30H
MOV AH,02H
INT 21H

MOV AH,4CH
INT 21H
CODE ENDS
END





please anybody help me to sort out this....
Title: Re: Need Help in Running this program...........
Post by: MichaelW on January 30, 2011, 05:05:34 AM
The labels in your data segment do not match the labels in your code segment, and in the data segment there is a missing DB on the second declaration. You can use the MASM32 version of ML to assemble it, but you must use the 16-bit linker to link it. Assuming the source file is named test.asm, the command lines can look like this:

\masm32\bin\ML /c test.asm
\masm32\bin\Link16 test.obj;


Title: Re: Need Help in Running this program...........
Post by: vijaysutar_1988 on January 30, 2011, 05:25:42 AM
okay thanx for helping me..........