::/ \::::::.
:/___\:::::::.
/| \::::::::.
:| _/\:::::::::.
:| _|\ \::::::::::.
:::\_____\:::::::::::................................ASSEMBLY.TECHNIQUES
80x86 Register Equates
by te987
[email protected] Have you ever had to debug a program where most of the data was
contained in registers? (As it should be in a good assembly program.)
Have you gone crazy trying to trace register usage? (Yeah, I know that
being crazy helps when writing assembly programs!) The following
technique makes tracing register usage easy...
Simply create an equate for each register. Place the equates in an
include file and "include register.inc" at the top of every file.
Now, assemble your program using the following Turbo Assembler
command line:
tasm /l/c somefile
The /l switch instructs TASM to generate a listing, and the /c says
to create a cross reference.
(An aside: I also use MASM 6.xx, but have never been able to find
the correct switch(es) in either MASM.EXE or ML.EXE to make it
generate a cross reference. "masm /l/c somefile" generates a symbol
table, but it doesn't give the LINE NUMBERS where the symbol is used.
Most useless... If anyone knows how to do so, I would appreciate
hearing from you...)
The following three files show how to use register equates. First,
the include file:
;====== start of register.inc ================================