Assembly Language Programming Tips, Tricks, and Traps

High level languages are easy to use, simple to debug, and (usually) powerful enough to write most programs in, but when the last bit of speed is required, or a few undocumented APIs are needed to finish the work, assembly language comes into its own. I don't (as yet) have a C compiler capable of producing OS/2 code, so I tend to do more in pure assembly than other people might; as a result I have burnt more fingers than perhaps I would have when working through a compiler.

From the burnt fingers, as is usual when fingers are burnt, knowledge was gained. In the hope that someone else is as crazy as I am, I hereby publish this list. This is released to the world, for anyone to use, copy, distribute, and plin plon platty ploo, on condition that all copies be maintained intact, including the version number and link below. This document is copyright, and may not be distributed in modified form without the author's permission. However, any changes which anyone can suggest, particularly answers to the questions asked below, will be looked into carefully and probably included for the next version.

This version of ALPTTT is dated 20020216. The latest version can always be found at http://www.kepl.com.au/esstu/alpttt.html.

Most of these tips apply to 32-bit programs. They may also apply to 16-bit programs, and may not. The reason for this emphasis on 32-bit code is that my docs are mostly about 16-bit programming, so I didn't burn my fingers there :-).