🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.os2.programmer
Article #3473

Re: MASM and `model os_os2'

#3473
From: Michael D Kretzer
Date: Tue, 12 Jan 1993 23:10
35 lines
2368 bytes
From article <1993Jan12.170532.17948@olymp.informatik.uni-bonn.de>, by greve@rs1.thch.uni-bonn.de (Thomas Greve):
> After i found out that my masm 5.1 also has an OS/2 version, i tried
> to assemble some of the asm-samples of the toolkit, but masm choked on
> `model large,os_os2'. The `large' is not unusual, but the `os_os2'
> obviously is unknown to it. What does it mean (well, i can imagine it
> halfway), and what happens if i leave it out?

The OS_OS2 parameter to the .MODEL simplified segment directive instruction
indicates how .STARTUP and .EXIT behave.  If you don't use .STARTUP and
.EXIT, then OS_OS2 is not necessary.  .STARTUP and .EXIT are the macros
for startup and exit code respectively (DOS requires a program to set up
the DS and SS registers to point to its data and stack areas...OS/2 does
this for you automatically).

If you are compiling the device driver samples, you can delete os_os2
with no ill effects...,the .STARTUP and .EXIT macros are not used in
the code at all.

The OS_OS2 parameter to .MODEL was added with MASM 6.0.  The assembly
examples in the toolkit compile under MASM 6.0 with no modifications.

> Is masm 5.1 seriously useable for OS/2 2.0?

Yes, although I would suggest upgrading to MASM 6.0, because it adds
the ability to create 32-bit programs when using the FLAT model (also
several language extentions were added...plus, it's only $49 with
Microsoft's educational discount promotion at the moment).  But MASM
5.1 is definitely useable for OS/2 2.0...well, as far as Assembly language
goes :) :)

I have been using MASM 6.0 to write OS/2 2.0 device drivers for my work,
and MASM 6.0 is a great assembler for OS/2 2.0.  OS/2 2.0 programming
issues are even mentioned in the manual (too bad it's not mentioned on
the box that you can write 32-bit programs, as well as 16-bit OS/2 1.x
executables).
Technical Details
Message-ID: <1ivj4jINNd3k@uwm.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!caen!uwm.edu!csd4.csd.uwm.edu!tanith
References: <1993Jan12.170532.17948@olymp.informatik.uni-bonn.de>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!caen!uwm.edu!csd4.csd.uwm.edu!tanith
From: tanith@csd4.csd.uwm.edu (Michael D Kretzer)
Newsgroups: comp.os.os2.programmer
Subject: Re: MASM and `model os_os2'
Date: 12 Jan 1993 23:10:11 GMT
Organization: University of Wisconsin - Milwaukee
Lines: 35
Message-ID: <1ivj4jINNd3k@uwm.edu>
References: <1993Jan12.170532.17948@olymp.informatik.uni-bonn.de>
Reply-To: tanith@csd4.csd.uwm.edu
NNTP-Posting-Host: 129.89.7.4
Originator: tanith@csd4.csd.uwm.edu