Article View: comp.os.os2.programmer
Article #2903Re: 32-bit programming using MASM 6.00b
From: Kai Uwe Rommel
Date: Wed, 16 Dec 1992 22:37
Date: Wed, 16 Dec 1992 22:37
57 lines
2018 bytes
2018 bytes
In article <1992Dec14.131817.14808@athena.mit.edu> jawetzel@athena.mit.edu (The Rottweiler) writes:
>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.
What probably happens is, that you call the *16-bit* DOS calls in your
program. The 32-bit ones are prefixed with Dos32 instead of Dos, i.e.
Dos32Write and so on. Working example:
----------------------------------------------------
.386
.model flat
.stack 04000H
includelib doscalls.lib
.data
message byte 13, 10, "Hello, world.", 13, 10
.data?
count dword ?
.code
extern DOS32WRITE:proc
extern DOS32EXIT:proc
start proc
push offset count
push lengthof message
push offset message
push 1
call DOS32WRITE
push 27
push 1
call DOS32EXIT
start endp
end start
----------------------------------------------------
Kai Uwe Rommel
--
/* Kai Uwe Rommel Muenchen, Germany *
* rommel@jonas.gold.sub.org Phone +49 89 723 4101 *
* rommel@informatik.tu-muenchen.de Fax +49 89 723 7889 */
DOS ... is still a real mode only non-reentrant interrupt
handler, and always will be. -Russell Williams
Technical Details
Message-ID:
<724545477rommel.root@jonas.gold.sub.org>Path:
arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!asuvax!chnews!hfglobe!imutm1.de.intel.com!gold.sub.org!jonas.gold.sub.org!rommelReferences:
<1992Dec14.131817.14808@athena.mit.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!asuvax!chnews!hfglobe!imutm1.de.intel.com!gold.sub.org!jonas.gold.sub.org!rommel From: rommel@jonas.gold.sub.org (Kai Uwe Rommel) Newsgroups: comp.os.os2.programmer Subject: Re: 32-bit programming using MASM 6.00b Distribution: world Message-ID: <724545477rommel.root@jonas.gold.sub.org> Sender: root@jonas.gold.sub.org Date: Wed, 16 Dec 92 23:37:57 MET References: <1992Dec14.131817.14808@athena.mit.edu> Organization: Private Lines: 57