The MASM Forum Archive 2004 to 2012

Miscellaneous Forums => 16 bit DOS Programming => Topic started by: xellos on August 09, 2009, 10:02:30 PM

Title: warnings when compilling
Post by: xellos on August 09, 2009, 10:02:30 PM
i always get warning when compilling code
but im 100% sure that the code is correct.

this are the warnings

link : warning LNK4044: unrecognized option "z2" ignored
link : warning LNK4044: unrecognized option "t" ignored
text.obj : warning LNK4033: converting object format from OMF to COFF
text.obj : fatal error LNK1190: invalid fixup found, type 0x0001

how do i solve them?
Title: Re: warnings when compilling
Post by: dedndave on August 09, 2009, 11:45:21 PM
we have not a clue - lol
we see no code
we see no batch file to show us how it is assembled and linked
we are damn good, but we are not Karnac the Magnificent
Title: Re: warnings when compilling
Post by: xellos on August 10, 2009, 08:36:53 AM
im sorry this is the code



.model small
.stack 100h
.data

    string db 20,0,21 dup('$')

.code

start: 

    mov dx, offset string
    mov ah, 0ah
    int 21h

    mov dx, offset string
    mov ah, 09h
    int 21h
   
    mov ah, 4ch             ; exit program.
    int 21h   

end start


but i have no batch
Title: Re: warnings when compilling
Post by: dedndave on August 10, 2009, 12:21:24 PM
oh - that is 16-bit code and you are trying to assemble and link it as 32-bit code
you need to acquire lnk563.exe and place it in the "\masm32\bin" folder
ftp://ftp.microsoft.com/softlib/mslfiles/lnk563.exe

also, many of us use a batch file to assemble and link
for 16-bit code...

@echo off
if "x%1"=="x" goto ascusage
if exist %1.asm goto ascasm
:ascusage
echo Usage: asc asmfile
echo "asmfile" = asmfile.asm
goto batchexit
:ascasm
if exist %1.obj del %1.obj
\masm32\bin\ml /c %1.asm >\masm32\bin\asmbl.txt
if errorlevel 1 goto showtxt
if exist %1.exe del %1.exe
\masm32\bin\Lnk563 %1.obj; >>\masm32\bin\asmbl.txt
:showtxt
if exist %1.obj del %1.obj
type \masm32\bin\asmbl.txt
:batchexit
dir %1.*