hi, i'm very new to asm, and tried to compile this code which i found in a tute with masm:
but it gave these errors:
:shock:
why is this happening?
thanx for any help.
DOSSEG
.MODEL SMALL
.STACK 200h
.DATA
OurString DB "This is a string of characters. "
DB "Do you lack imagination? Put something interesting here!$"
.CODE
START:
MOV AX, SEG OurString ; Move the segment where OurString is located
MOV DS, AX ; into AX, and now into DS
MOV DX, OFFSET OurString ; Offset of OurString -> DX
MOV AH, 9h ; Print string subfunction
INT 21h ; Generate interrupt 21h
MOV AX, 4C00h ; Exit to DOS sufunction
INT 21h ; Generate interrupt 21h
END START
but it gave these errors:
End of file encountered on input file
Test.asm(21) : error 85: End of file, no END directive
Test.asm(1) : error 10: Syntax error
Test.asm(2) : error 10: Syntax error
Test.asm(3) : error 10: Syntax error
Test.asm(4) : error 10: Syntax error
Test.asm(6) : error 86: Data emitted with no segment
Test.asm(7) : error 86: Data emitted with no segment
Test.asm(9) : error 10: Syntax error
Test.asm(11) : error 62: No or unreachable CS
Test.asm(12) : error 43: Operand must have segment
Test.asm(13) : error 86: Data emitted with no segment
Test.asm(15) : error 86: Data emitted with no segment
Test.asm(16) : error 86: Data emitted with no segment
Test.asm(17) : error 86: Data emitted with no segment
Test.asm(19) : error 86: Data emitted with no segment
Test.asm(20) : error 86: Data emitted with no segment
End of file encountered on input file
Test.asm(21) : error 85: End of file, no END directive
:shock:
why is this happening?
thanx for any help.
you must use MASM to assemble this source. From the error numbers in your log I can tell that it isnt MASM what you are using (at least not MASM 5-7).
i downloaded masm38 v8 and assembled the above program in it, but it gives these errors now:
:sad:
i'm really new 2 asm, please help!
Assembling: C:\MASM32\Test.asm
C:\MASM32\Test.asm(1) : warning A4015: directive ignored with /coff switch
C:\MASM32\Test.asm(12) : error A2004: symbol type conflict
C:\MASM32\Test.asm(21) : warning A4023: with /coff switch, leading underscore re
quired for start address : START
_
Assembly Error
:sad:
i'm really new 2 asm, please help!
That's 16-bit asm there - I strongly recommend you start up from 32-bit.
16-bit code will only make you give up ASM, since 16-bit has no fun in it, isn't well-supported on Win2k & WinXP, and generally has a million limitations.
The MASM32 package, that you downloaded, has enough examples and tutes on writing 32-bit asm code.
Start by studying the \masm32\EXAMPLE1\MINIMUM\minimum.asm
16-bit code will only make you give up ASM, since 16-bit has no fun in it, isn't well-supported on Win2k & WinXP, and generally has a million limitations.
The MASM32 package, that you downloaded, has enough examples and tutes on writing 32-bit asm code.
Start by studying the \masm32\EXAMPLE1\MINIMUM\minimum.asm
> 16-bit code will only make you give up ASM, since 16-bit has no fun in it
I would suggest to ignore such remarks, geek@02. Whether 16-bit is fun or not depends on many things.
About your error: if your version of MASM is >= 7, try command line option -omf
I would suggest to ignore such remarks, geek@02. Whether 16-bit is fun or not depends on many things.
About your error: if your version of MASM is >= 7, try command line option -omf