News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

assembling code

Started by xxxx, January 30, 2005, 06:36:44 PM

Previous topic - Next topic

xxxx

this code is taken from a book that from what i can tel,is using macro assembler version 5.10:


.MODEL SMALL
.STACK 64
.DATA
.CODE

MAIN PROC FAR
        MOV AX,@DATA
        MOV DS,AX
        MOV AH,4CH
        INT 21H
MAIN ENDP
        END MAIN


i know that this is a 16-bit dos program so it won't compile on MASM32 right?i alredy have a linker and all i need is an assembler but i can't locate MASM 5.1.so could anyone suggest an alternative assembler that would compile the code?

thanks



00100b

You can compile 16-bit with Masm 6.x.  If you've got the 16-bit linker, then you should be fine.

xxxx

i've got MASM 6.15.8803 and the linker is microsoft incremental linker version 6.00.8168.i entered the exact same code using notepad and save it as myasm.and then i went to the command prompt to assemble it by typing 'ml c:\myasm.txt'
and here's what i got:


C:\>ml c:\myasm.txt
Microsoft (R) Macro Assembler Version 6.15.8803
Copyright (C) Microsoft Corp 1981-2000.  All rights reserved.

Assembling: c:\myasm.txt
Microsoft (R) Incremental Linker Version 6.00.8168
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

/z2
"myasm.obj"
"myasm.exe"
NUL
LINK : warning LNK4044: unrecognized option "z2"; ignored
LINK : error : Segment reference in fixup record
myasm.obj : fatal error LNK1123: failure during conversion to COFF: file invalid
or corrupt


what's the problem?is the code incomplete?


xxxx

thanks.just curious,what do those errors mean?