(9160) Mon 29 Nov 93 2:26p By: Jerry Coffin To: Mathieu Bouchard Re: assembly St: <7376 --------------------------------------------------------------------------- On (27 Nov 93) Mathieu Bouchard wrote to Peter Garner... MB> What are the differences 'tween MASM and IDEAL modes? There are quite a few minor differences. The main big difference is that ideal mode allows only one way of writing indirect addressing. In MASM ( the real thing or TASM's MASM mode ) the following are legal ways of saying the same thing: mov ax,bx[2] mov ax,2[bx] mov ax,[bx+2] while ideal mode, only the last of the three is legal. Other areas involve things you typically won't run into very often. For instance, in MASM mode, identifiers are in a different name space from reserved words, so as long as it's clear how a word is being used, you can use it for two different things at times. For instance %.model MODEL,c Means that 'MODEL' is going to be defined on the command line and you're going to use that as the memory model for the code. In ideal mode, this is considered a conflict with the .model directive and you have to invent some other name to mean model, typically 'memmodel' or something similar. Most of the other differences will only become noticeable if you write a lot of macros. While TASM's book makes rather a point of claiming that all of these are "cures" for "bugs in MASM", there are those who've used both and prefer MS' decisions in at least some cases. There are at least a couple other things of note as far as differences between the two. One particularly obvious one is in how the two figure offsets in grouped segments. By default MASM figures offsets within the segment to which a variable belongs, even if that segment is part of a group. This means that most times that you get an offset in MASM, you need to use a group override to get the proper offset. By contrast, TASM normally figures offsets within the group, so you normally get the correct offset without an override. Eg: .data junk dw ? .code ; ... mov dx,offset junk This will NOT normally produce the correct results with MASM. Instead you have to: mov dx,offset DGROUP:junk Note that unless you specifically ask for TASM's QUIRKS mode, that the first version will work correctly without having to enable ideal mode. Later, Jerry. ... The Universe is a figment of its own imagination. --- PPoint 1.70 * Origin: Point Pointedly Pointless (1:128/77.3) @PATH: 128/77 58 12 1 209/209 270/101 260/1 362