TERSE Tid Bits

This Tid Bit shows how a very common assembly language function is greatly simplified by using TERSE. 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:

Mov ax,0A000h Mov es,ax

With TERSE you express this single thought with a single statement. The following TERSE statement performs the exact same thing:

es = ax = 0A000h;

This example uses ax as a work register. The work register concept is used throughout TERSE to simplify your programming. If you wanted to set both ds and es to point to video memory you would write it like:

ds = es = ax = 0A00h;

which generates an additional:

Mov ds,ax

This is just one example of how TERSE will make your code simpler to write, read, and maintain. Come back next week for another TERSE Tid Bit.

* * * *

[TERSE Tip of the Week]
[Return to Table of Contents]
[Order My Copy of TERSE]

* * * *

Copyright © Jim Neil. All Rights Reserved.
The word OPTOMIZED, the name TERSE, and the TERSE logo are Trademarks of Jim Neil.