This Tid Bit shows how a very common assembly language function is greatly simplified by using . As I'm sure you are aware, the x86 has no facility for loading a constant value directly into a segment register. This situation comes up often, like when trying to access video memory. In assembly this is typically accomplished with the following two statements:
With you express this single thought with a single statement. The following statement performs the exact same thing:
This example uses
ax as a work register. The
work register concept is used throughout to simplify your programming. If you
wanted to set both
es to point
to video memory you would write it like:
which generates an additional:
This is just one example of how will make your code simpler to write, read, and maintain. Come back next week for another Tid Bit.
© . All Rights
The word OPTOMIZED, the name TERSE, and the logo are Trademarks of .