TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Peter Fitzsimmons
from: Mike Bilow
date: 1996-01-25 21:39:06
subject: asm + link problems

Peter Fitzsimmons wrote in a message to Paul Edwards:

PF> What happens if you replace tasm with masm?

 PE> If I change to masm 5.1, and change the ".model flat" to
 PE> ".model small", then I get the same problem, a trap-5.

 PF> Then don't change ".model flat"!  I don't think 5.1 actually
 PF> supports the .flat instruction.   Look on the ddk cdrom for
 PF> megabytes of *.asm samples that all assemble with masm 5.1.

Flat and small model are the same thing when "use32" segments are
in play, as happens by default once the ".386p" directive is
issued, but MASM 5.1 does not understand the keyword "flat."

 PF> I've got a tiny one here I wrote for a no-CRT dll init:

 PF>      .386p

 PF>  _TEXT segment dword public use32 'CODE'
 PF>      assume  cs:_TEXT

 PF>  extrn DllInit:PROC

 PF>  Init proc near
 PF>      jmp DllInit
 PF>  Init endp

 PF>  _TEXT ends

 PF>  end Init

In this code, the label "DllInit" defaults to type "extrn
near use32," as it should in flat model.  MASM 5.1 just does not allow
calling it "flat" model.

 PE> The "-oi" option to tasm is meant to produce "intel
standard"
 PE> object code.

 PF> I think that means the file format -- not the names of the
 PF> segments, or their alignments.

The "-oi" switch produces IBM-format OBJ files.  Intel-format
OBJs are the "standard" format selected by the "-os"
switch.  Similarly, "-op" selects Phar Lap format, while
"-o" selects standard format with overlay-safe linkage.
 
-- Mike


--- 
* Origin: N1BEE BBS +1 401 944 8498 V.34/V.FC/V.32bis/HST16.8 (1:323/107)
SEEN-BY: 50/99 270/101 620/243 711/401 409 410 413 430 808 809 934 955
SEEN-BY: 712/407 515 517 628 713/888 800/1 7877/2809
@PATH: 323/107 170/400 396/1 270/101 712/515 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.