Does specifying .586 in ur program enables u to use some extra asm commands? Whats the diif if i specify .386 or .586 in my program?
Posted on 2001-06-17 09:04:00 by MovingFulcrum

 .586 = Pentium
 .386 = 80386

 specifying .586 enables you to use more instruction (instruction
 that belongs to Pentium).

 i've decided to use .586 now on, (but when creating dos app, i
 go for .386 always).

 some decided to use .386 for life. because .386 has little
 instruction, but those liitle instruction when combines with
 others instruction can do something that .586 can. but the diff
 is that 586 require one instruction (some instruction) to do
 some task, whereas .386 requires more. and it depends.

Posted on 2001-06-17 11:39:00 by disease_2000
but whats the use i wanna know. When i dont use any of the special instructions in the pentium processor whats the use of specifying 586 instead of 386?
Posted on 2001-06-17 13:22:00 by MovingFulcrum
One thing I can think of is the instruction timings added to the listing when you specify the /Sc switch. They do change depending on .386 .486 .586... Except for that, I don't think there is any difference if you don't actually use any newer instructions. You may want to use older models to insure compatibilty with older processors. For exapmle, a 486 doesn't know what an MMX instruction is, so if you want your program to be able to run on a 486, you can have MASM "flag" any instructions that the 486 CPU doesn't know, like MMX. The other option here is to determine which CPU you are on at run time, and have different routines that do the same thing, like one with MMX, and one without. But as far as the "basic instruction set" goes, no difference. :)
Posted on 2001-06-17 16:52:00 by S/390
MovingFulcrum, There are a few subtle differences, if you specify .386, you can only use "align 4" and if you try "align 16", the processor model will not allow it. Some instructions became available on a 486 that were not there on a 386 like BSWAP and a few others so to write safe code that will run on anything that can run 32 bit windows, use the .486 directive as a minimum. If you want to run MMX or XMM instructions, it is wise to select the processor AND the additional instruction set that you wish to use. .586 .MMX for example. Regards,
Posted on 2001-06-17 20:13:00 by hutch--
The directive ".386" will not prevent the assembler from assembling Pentium opcodes which are invalid on the 386. It is also unsafe to trust the "machine- required" field in the PE file header. The Pentium manual (volume 2 of 3) from Intel spells out which generation of cpu is needed for each of the Pentium opcodes. One big difference between the chips is that in 386, only ebx and ebp may be used as base registers, and only esi and edi as index regs. On a 386 there is no such thing as: mov al, mov al, mov al, but you may do: mov al, mov al, mov al,.
Posted on 2001-06-17 21:49:00 by Larry Hammick
That's odd. The 386 manual I have at home describes those extra addressing modes such as , complete with encodings.
Posted on 2001-06-19 20:18:00 by tank
Yes, for , and some others, because ebx is a legitimate base register and esi is a legitimate index register on the 386. But you can't use e.g. or on a 386.
Posted on 2001-06-19 20:25:00 by Larry Hammick