If you're looking for a hardware reference for Intel 32 bit CPUs, this is it! It's much more than just a detailed instruction set description. It tells you more about the 386 than you'll ever want to know! I highly recommend it, for any kind of assembly language programming. I've had the TXT version for years, and was happy to find an HTML version. You can read it online, or download it, from here: http://www7.informatik.uni-erlangen.de/~msdoerfe/embedded/386index.htm This message was edited by S/390, on 1/29/2001 4:30:33 AM
S/390, The only problem with the reference material you have suggested is that the technology has changed a lot and there are many better instructions available in the later reference material. http://developer.intel.com/design/PentiumIII/manuals/ This link will give you the recent technology in Intel processors that makes heaps of difference in speed and convenience, things like instruction pairing for dual pipelines, instructions to avoid etc.. Regards, firstname.lastname@example.org
Hi hutch, Yea, I know it's old, but it's classic stuff. Parts of it, like the systems programming section, are hardly for the newbie. Heck, even an advanced programmer doesn't deal with that stuff, unless they're going to write an OS. But the application section does a great job of describing the "new" x86 architecture, IMHO. And it is "the bible" for instruction specs. The 386 was the first 32 bit CPU, but it's instruction set is still the foundation for current processors. They have added new instructions since then, but from the application programmer's view, not much has changed. At least as far as the basics go, and then some... Many enhancements to newer processors are transparent to the programmer. Things like faster clocks, reducing the number of clocks needed to execute an instruction, or a wider data bus, helps every program, and doesn't require any code changes. Yes, there are things you can do to optimize for the pipeline, and many of those techniques are good general programming practice. But the fact is that good old "386 code" that doesn't know what a pipeline is, still runs pretty darn good on a P-III. I've got mixed feelings on using "new technology". On one hand, I want to write the best, smallest, fastest code that I can. That's why I'm into assembly to begin with. And computers are my hobby, not just my job. I WANT to know how the latest and greatest gizmo works. But on the other hand, from a commercial programmer's point of view, I've got to consider my potential audience. The more "new" features that I use, the fewer "old" computers can run my code. Look at MMX for example. It can be quite handy in certain vector processing situations that have nothing to do with "multi media". But I can't use it on an older Pentium-1, or a 486, or a 386... And if I go to the next level, and start using the new P-III SIMD instructions, you can add the Pentium-II to the list of machines that can't run the code. Yea, I can test for this stuff, but if it isn't there, I'll still have to do things the old fashioned way. In a few applications, it pays to use it if it's there. In most, it doesn't matter much No, there aren't many 386's left, and with today's prices, everyone should have at least a P-III. But it isn't like that in the real world. There are lots of P-IIs and P-Is and even 486s still out there, still running Windows/95. And if you look at the side of the Win/95 box, it says "Minimum requirements - 386 processor". Microsoft raised the bar to a 486 with Windows/98 and finally to a Pentium with Win/ME. So if you are going to write something that is designed to run only on ME, then I say by all means, take the extra time to do things like optimize for the pipelines, and use the new Pentium instructions. But if you want something that runs anywhere, without worrying about testing for this or that CPU feature, stick with the 386 model. You can still do things like arrange instructions to take advantage of the pipeline, if it's there. But even if you don't, all of those other transparent enhancements that have occured over the generations, are going to make the code run "almost as well" as optimized code. After all, it's still 32-bit assembly language, and even crappy ASM beats the pants off of any HLL. I guess that's why I still write .386 code. But I write it very well, having had many years of practice... Anyway, I could argue about this for hours, but this is the beginner's forum, and I think we're going a little beyond that here. Besides, I didn't come here to argue. I just like the book... ;)
S/390, If you like the book and its useful to you, fine but I am trying to seduce you into the next generation because there are a lot of advantages in doing it. I grew up in 8088 code in MASM and it took me a while to lose the particular mindset that went with it but the effort was profitable. A 386 architecture was the last of the old stuff where a 486 was the first of the new generation. It introduced a single pipeline and was faster than the cycle speed difference to a 386. The instruction set grew bigger and the performance was different. On a 386, LOOP/LOOPCXZ ran OK but it is very slow in comparison to alternative methods on a 486 & later. LEA had a heart transplant and is both fast and very powerful in combining addressing and calculation in a single instruction. String instructions on a 386 ran OK, like a fast 8088 but on a 486 up, there is better and much faster equivelents, the only exception is REP MOVSD, can be improved on but only by about 5%. Now its true that the Intel manuals are no joy but they have so much good technical data in them, they would have to be counted as a must, much the same with Agner Fog's Optimisation manual which show some really fast techniques. Regards, email@example.com
Well, for a basic introduction to 32bit x86, 386intel.txt *is* good. And it's *much* smaller than the newer PDFs. So for dialup users who have to pay for their online time, I'd recommend 386intel.txt before the PDFs. Sure, they're not up to date, and you might end up using some bad instructions like loop and friends. But 386intel.txt is also faster to search. Ever searched through a >700 page PDF file? Even on an athlon700 it's pretty slow.