Welcome to the Assembly Gems Pages.
My name is John Eckerdal, and I decided to make this page to collect all small and very useful snippets, Gems, I could find on the Internet. These so called Gems are small bits of programs that optimizes certain operations. They are very helpful for various operations. There exist millions of these Gems, and if You have one, feel free to contact me. The word Gem was used, and perhaps founded, in Imphobia Disk Magazine Coding Corner. Several Gems do come from that disk magazine.
Here you will find Gems for two processor types: Intel x86 series and compatible. The other type is Motorola 680x0 and compatibles. I was not to put Motorola Gems here at first, but a since there is no other page like this (which I have found), and some comments about the lack of such a page from a friend made me decide to include such a section here. Many of the Gems therefor exists on both pages.
The information on these pages are free to use, but is not always free to publish on another page. Where this applies a note will be present. If you find any incorrect information, please contact me - not the author. The author may know that I have presented code he has written, but that is not always the case. It makes things a lot easier for me if you contact me. I can correct the error here and your name will be added to the Gem and the Contributor list.
The Gems presented may not be the most optimal, for speed or for size, they may not work correctly and there may be spelling mistakes in the text. If this is so, complain to me. Not the author. If a Gem corrupts data on drive, destroys any of your hardware or otherwise, the author or I may not be held responsible. You use any Gem presented on these pages at your own risk. Here the word Gem includes all information you may find on these pages.
Every Gem presented has an author. This author may not be the correct one (with two exceptions, read below). I will however not change the author presented. Most of the common gems have been invented so many times by many different people, so I decided to use the name where I first found the Gem. The more complicated and not so common Gems usually have the correct author since I found the Gem attached with a name - most often in comp.lang.asm.x86.
When I find a useful Gem with no author I put my name there. I will not change this either, unless conclusive evidence is given that someone else is the correct author. The Gem text for such a gem normally tells you that it was written by an unknown author. The main reason for presenting my name as the author is because I feel that every Gem should have an author/report address attatched to it.
All Intel Gems are presented in Turbo Assembler (TASM) IDEAL mode style. This style include brackets
memory variables and registers used in memory access ([REG]
),
it also includes putting PROC
before procedure names instead
of after (the same goes for segmentation and several other things too). IDEAL mode includes several more
things but does mostly not concern these Gems. When a Gem is not written using IDEAL style I usually
rewrite it. I tend to use lower case notation for code presented and upper case for mnemonics and
registers in snippets of text.
All update times are presented in CET (Central European Time - GMT+1).
The pages uses Client Side Imagemaps and Frames. If no support for Client Side Imagemaps exist, the menu will not work. If your browser does not support frames the pages will look very messy. This version was designed for Netscape Communicator.
The recommended lowest resolution for viewing these pages are 800x600 in 32k colours. You can use a lower resolution, however I do not recommend it. Using fewer colours will look very badly.