Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!elroy.jpl.nasa.gov!ames!uhccux!munnari.oz.au!csource!david From: david@csource.oz.au (david nugent) Newsgroups: comp.os.msdos.programmer Subject: Re: Microsoft Assembler Complaints Message-ID: <760@csource.oz.au> Date: 21 Nov 90 14:16:12 GMT References: Distribution: comp Organization: Unique Computing Pty Ltd, Melb, Aust. Lines: 63 In weiss@theory.lcs.mit.edu (Paul G. Weiss) writes: > Problem #1: High level language support > --------------------------------------- > When using the .MODEL directive which provides high level language > support, e.g. > .MODEL SMALL,PASCAL > all procedures are declared public. Yes, a real drag, isn't it? TASM in "ideal" mode doesn't reproduce this bug. :-) > As far as I know there is no > way to inform the assembler that you do not want certain procedures > to be made public. This is a real problem if you are going to be > distributing libraries, as it causes many symbols to be included > in the library index that otherwise would be hidden. I use a macro called pProc and pEndP which do much the same as PROC and ENDP, except that they aren't so smart about setup and breakdown code for the stack. But they produce a nice private routine... Some interesting reference - if you're interested in producing such a macro - is the cmacros.inc that (used to be?) is supplied with MASM. Actually, I found that particular file more enlightening as regards to using macros than the entire manual! I've since done a great deal of work on it though, it seems that as at MASM 5.1, it hadn't been updated for many of the new macro constructs that version introduced, most of which resulted in that file being reduced to around 1/3 it's original size. > Problem #2: .CODE directive > --------------------------------------- > When you specify > .MODEL MEDIUM > or > .MODEL LARGE > you can then give the .CODE directive a name, e.g. > .CODE FOO_TEXT > This will translate into > FOO_TEXT SEGMENT WORD PUBLIC 'CODE' > Unfortunately, if your filename is BAR.ASM, then your > object file will also contain a definition of the > following segment: > BAR_TEXT SEGMENT WORD PUBLIC 'CODE' > Even if you do not place any data in this segment. Makes for lots of empty segments in the .MAP file. BTW, TASM also does this. Again, a real pain, but you can live with it because it's basically harmless. I use it a lot in mixed model programming to force certain code to reside in the same segment, for fast and efficient near calls. - david -- Fidonet: 3:632/348 SIGnet: 28:4100/1 Imex: 90:833/387 Data: +61-3-885-7864 Voice: +61-3-826-6711 Internet/ACSnet: david@csource.oz.au Uucp: ..!uunet!munnari!csource!david