The MASM Forum Archive 2004 to 2012

Miscellaneous Forums => 16 bit DOS Programming => Topic started by: baghdadi13 on January 02, 2007, 12:15:17 AM

Title: buil 16-bit Masm program with masm32
Post by: baghdadi13 on January 02, 2007, 12:15:17 AM
Hi

I'm new with masm32
I have programs for 16-bit masm (I use masm 6.11)
I tried one of them , but it doesn't work
Do I have to make some changes on my 16-bit masm programs to build them with masm32
or there is an other solution !!!


code    Segment
addition proc far
        mov dl,5
        add dl,3

        add dl,48

        mov AH,2
        int 21h

        mov ah,4ch
        int 21h

addition  endp
code     ends
         end addition


this is a sample code for 16-bit masm ,,, but it doesn't work on masm32
Title: Re: buil 16-bit Masm program with masm32
Post by: baghdadi13 on January 02, 2007, 01:06:45 AM
I saw an other post  (a problem similar to my problem)
the solution was to use the 16-bit linker

is there any other way to make my 16-bit programs work directly

I get this message when I Link from the qedit


LINK : warning L4017: /SUBSYSTEM : unrecognized option name; option ignored
LINK : warning L4017: /OPT : unrecognized option name; option ignored
Run File [c:1.exe]:
..........
.........
2.obj : fatal error L1101: invalid object module
Object file offset: 1 Record type: 4c





what does it mean ?????
Title: Re: buil 16-bit Masm program with masm32
Post by: MichaelW on January 02, 2007, 02:01:43 AM
In addition to using a 16-bit linker, you must use different command lines for ML and the linker. Using these command lines in a batch file, with copies of ML.EXE, ML.ERR, and LINK16.EXE in the current directory, I was able to assemble and link your source, with a no-stack-segment warning, and run the result, which displayed "8" and terminated:

ML /c baghdadi13.asm
pause
LINK16 baghdadi13.obj;
pause
baghdadi13
pause
Title: Re: buil 16-bit Masm program with masm32
Post by: baghdadi13 on January 02, 2007, 10:36:01 AM
yes it works
thank you   :U

but is it possible to the same thing from the quick editor
i.e : I write the prograam and then assemble it by clicking on assemble
and link it by clicking link and then tun it

and in the same time be able to link a 32bit program?


Title: Re: buil 16-bit Masm program with masm32
Post by: MichaelW on January 02, 2007, 07:41:47 PM
Yes, this should be possible. The menus are programmable, and you could create your own batch file(s) to do whatever you require.