Article View: comp.os.os2.programmer
Article #282532-bit programming using MASM 6.00b
From: The Rottweiler
Date: Mon, 14 Dec 1992 13:18
Date: Mon, 14 Dec 1992 13:18
84 lines
1944 bytes
1944 bytes
Is there anyone out there who has experience assembling 32-bit OS/2 v2.0 programs using Microsoft's MASM 6.00b. I thought that I could use the flat memory model but LINK386 chokes on the object code. LINK386 does not complain if I use the normal segmented model but the EXE created generates a 000E trap. Any pointers would be greatly appreciated. Jake ------------- hello.asm ------------------------ title filecomp.asm .386 INCLUDE hello.inc cr equ 0dh lf equ 0ah stdin equ 0 stdout equ 1 stderr equ 2 DGROUP group _DATA _DATA segment dword public use32 'DATA' testmess db cr,lf,'Hello World',cr,lf testmess_len equ $-testmess wlen dw ? _DATA ends _TEXT segment dword public use32 'CODE' main proc near push stdout push ds pushd offset DGROUP:testmess push testmess_len push ds pushd offset DGROUP:wlen call DosWrite or eax,eax jnz error push 1 push 0 call DosExit error: push 1 push 1 call DosExit main endp _TEXT ends end main ------------- hello.inc ------------------------------------ externdef DosWrite:near externdef DosExit:near ------------- hello.def ------------------------------------ NAME HELLO WINDOWCOMPAT DESCRIPTION "OS/2 2.0 Test Program" PROTMODE STACKSIZE 4096 ------------- assemble commands -------------------------- ml /c /Zi /W3 hello.asm link386 /NOE /NOD /ALIGN:16 /M /DE hello,,,c:\os2\doscalls,hello;
Technical Details
Message-ID:
<1992Dec14.131817.14808@athena.mit.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!enterpoop.mit.edu!bloom-picayune.mit.edu!jawetzelShow Full Headers
Complete Article Headers
Newsgroups: comp.os.os2.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!enterpoop.mit.edu!bloom-picayune.mit.edu!jawetzel From: jawetzel@athena.mit.edu (The Rottweiler) Subject: 32-bit programming using MASM 6.00b Message-ID: <1992Dec14.131817.14808@athena.mit.edu> Sender: news@athena.mit.edu (News system) Nntp-Posting-Host: indra.mit.edu Organization: Massachusetts Institute of Technology Date: Mon, 14 Dec 1992 13:18:17 GMT Lines: 86