home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
assemblr
/
disasm
/
at86demo
/
read.me
< prev
Wrap
Text File
|
1985-12-04
|
10KB
|
197 lines
Additional Notes on Using Advanced Trace86 - Version 2.0
December 4, 1985
1. There are several sample programs on this disk. They are:
CONSOLE.EXE
CONSOLE2.COM
REDALERT.COM
REDA.COM
MESSAGE.COM
The CONSOLE.EXE program is accompanied by the corresponding assembler
source file (.ASM), the map file (.MAP), the assembler list file (.LST),
a batch file used to compile the program (.BAT), and a macro file (.MAC).
A macro command is defined to load the program labels and the program.
Name and load (LL command) the CONSOLE.MAC file. Then issue the command
"$ab" in AT86 . There is also another command "$xy" which loads the
.MAC file itself and switches automatically to the DISPLAY screen to
display the file contents.
The CONSOLE2.COM file is the same program as CONSOLE.EXE, but was
created with the AT86 assembler. See the last page of the
Version 2.0 supplement material for a listing of this program. Com-
pare it to the listing on page 2-11 of the manual.
For the REDALERT.COM and REDA.COM files, see the discussion on page 9
of the Version 2.0 manual supplement.
MESSAGE.COM is a program written and SAVE'd with AT86. It shows how
to set up a data area for a DOS function call 09 - to display a string.
At this time the pseudo op instruction 'db' is not implemented.
2. The Macro Assembler pseudo op codes "EQU", "DB", "DW", and "OFFSET"
are not implemented.
3. The default radix in the AT86 assembler is hexadecimal. To specify a
decimal number when typing in an instruction, place a decimal point "."
after the number. It will be immediately assembled in, in hex. When-
ever an instruction is brought up for edit or display the values entered
will be displayed in hex, even if a number was entered in decimal or as
an ASCII character.
4. Programs created in AT86 and SAVE'd have a 16 byte header at the front
of each program. The purpose of this header is to set up a data area
in the program by resetting the DS and ES registers to 800h above CS.
When the program is run from DOS or when it is LOAD'ed into AT86, this
header is executed to reset these segment registers. Then, any state-
ments in your program which refer to the program's data segment will
be offsets from cs:800. That is, ds:0 is at cs:800.
If one of these special programs is loaded and run (or traced) to
completion, note that the registers are reset upon completion to values
which would be true if the file were an ordinary .COM file loaded with
the L command. It cannot be rerun, since DS and ES have been reset. The
"RR" command at any time will also reset the registers so that the pro-
gram can no longer continue to be run or traced. It must be reLOAD'ed.
There is a separate page of documentation included with this package
which shows the organization of the CONSOLE2.COM file. Note the 16-byte
header which contains (1) the code to reset DS and ES, as well as (2)
two words that specify the end of the program code area and the length
of the data segment, located at cs:800.
The linked list of code labels, comments, and variables follows after the
code portion of the .COM file, marked with the "FA FF" bytes. Then, "F0
FF" marks the beginning of the label/comment area, "55 FF" marks an area
which was used to resolve undefined labels while a program was being
entered or edited, and "76 FF" which marks the beginning of the area for
variable names. For each of these areas, note that the first word
following the markers are the length of the area. Then follows one or
more entries. Each entry has three items which describe it:
- the relevant offset address from cs (a word)
- the length of the string that follows (a word)
- the string itself (label, comment, variable name)
An area after the code with: "FA FF FO FF 30 04"
would indicate the beginning of the area, the beginning of the label/
comments, and that the size of the label/comment area is 430h bytes long.
That is, this same area of memory in word format: FFFA FFF0 0430
Immediately following these three words might be:
00 01 06 00 61 62 63 64 65 66
This would be one entry: a 6-byte long label for the instruction located
at cs:100. In word/byte format this entry would look like:
0100 0006 61 62 63 64 65 66
5. The built-in calculator. It will now calculate numbers up to 8 meg. The
previous limit was 64k. The converter will still only let you convert
numbers from hex to decimal or vice versa on numbers up to 64k, unless you
have an 8087 installed. With an 8087, numbers up to 8 meg can be
converted.
6. There is a demo program on your disk that can be freely copied and given
to friends who would like to see Advanced Trace86 in action. It is
called DEMOAT86.COM and has a companion file called DEMO.T86. There
is a new command in AT86 which allows console input to be redirected and
taken from a disk file. Examine the DEMO.T86 file to see how such a file
can be created to "drive" Advanced Trace86. You can create your own demos
and macros.
The command syntax is: N<filename
Withing the normal working copy of Advanced Trace86, the demo is invoked
by pressing the <F7> key and then the <A> key.
To interrupt a "command file" that is controlling AT86, press <Esc> twice.
7. There is an additional display command option "d/s",
which displays a list of all the segments defined for the current set of
program labels. After issuing a "d/s" command, you can then use the
"d/seg" command to see the list of labels defined for each of the segments
(read out of a .MAP file). Then you can use the "&label" command for each
label, if you wish, to get the address of each label. (NOTE: "d/v" will
list all the variables and "&var" will show the address for a given
variable "var".)
This "d/s" command can also be used to verify which segment was used by
the LL and LM commands when loading labels and variables. At this time
variables are loaded with an offset only and use whatever value of DS is
current.
8. AT86 is now a .COM file, instead of a .EXE file.
9. LL & LM - If you are tracing a program that is loaded at some special
location in memory and you have a .MAP file, use the "LLseg" command
to load the labels to the appropriate segment where the program is
located.
LL defaults to loading labels at the currently defined value of the
Program Segment Prefix + 10h. That is, if the PSP is at 1700, the
commands "ll" and "ll1710" will do the same thing. For .COM files,
however, "lm" and "ll1700" would be equivalent. (When AT86 is first
booted, or after a "new" command is issued, the CS, DS, ES, & SS are
set to the PSP segment.)
10. LV - To load variable names from a .LST file, the .LST file must first
be edited. With a text editor, select the data segment containing the
list of variables that are defined. You can also merge together the
data segments from other .LST files into one file if you wish. Delete
all other information out of the .LST file (or create a new file). Also
delete any lines in the new file which do not contain a variable name.
If a portion of the .LST file has code merged from an INCLUDE file, delete
the "C"s placed in the file which identifies the lines which have been
included. Be sure to include the beginning and ending data segment
identification lines containing the words "segment" and "ends"
in the edited file. Do not use a .LST file created with the CREF line
numbers in the first column.
Remember that AT86 works with small memory model programs only, with
respect to the data segment. Thus, only the offset address is
important. When merging the variable names with your program code, the
current value of DS will be assumed in matching up the names with your
code.
11. When defining breakpoints using the BS command, be sure not to put a
space between the BS and the breakpoint number. That is "bs1 123"
is okay, but "bs 1 123" is not.
12. Permanently configuring a copy of AT86.COM for a color display is
described in the discussion of the Q commands - "/QN" and the example.
Note: to color configure the stack, do not use a command like "qs1"
This conflicts with another Q command involving changing the video
RAM segment. Instead type in "qs10". The same applies for "qs2"
and "qs3". Also, you can set up a color configuration file on disk
and use the redirect command (i.e., "n<file") to "read in" this file
and set the color parameters.
13. Super Trace Mode Example - To set up a super-trace break condition so
that the trace screen only stops on a INT 21 insruction (DOS function
call), the appropriate one line instruction in the conditional code
(typed in immediately after entering the "T@" command) is:
cmp ax,21cd
This will cause AT86 to trace only when the instruction in memory is the
op-code byte sequence "cd 21" (or, the word "21cd"). Thus, if you wanted
to break on a value of AX which your program may have, you have to test
for [bp-2]. To break when ax=1234, for example, use the following:
cmp [bp-2],1234
See the discussion under the GO command "Conditional Breakpoints". The
same rules apply for the "G@" as well as the "T@" command.
14. HELP command - A new command is now built into AT86, invoked by typing
"help" at the command mode prompt. The text file "at86.hlp" is looked
for on the drive/path AT86 was loaded from and will be displayed a page
at a time. Press <PgDn> key to display the next page. Or, press the
down cursor key to display one more line. Press the <Esc> key to end.
You can customize this file any way you wish.