home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / assemblr / disasm / at86demo / read.me < prev   
Text File  |  1985-12-04  |  10KB  |  197 lines

  1.  
  2.         Additional Notes on Using Advanced Trace86 - Version 2.0
  3.                           December 4, 1985
  4.  
  5. 1.  There are several sample programs on this disk.  They are:
  6.  
  7.                    CONSOLE.EXE
  8.                    CONSOLE2.COM
  9.                    REDALERT.COM
  10.                    REDA.COM
  11.                    MESSAGE.COM
  12.  
  13.     The CONSOLE.EXE program is accompanied by the corresponding assembler
  14.     source file (.ASM), the map file (.MAP), the assembler list file (.LST),
  15.     a batch file used to compile the program (.BAT), and a macro file (.MAC).
  16.     A macro command is defined to load the program labels and the program.
  17.     Name and load (LL command) the CONSOLE.MAC file. Then issue the command
  18.     "$ab" in AT86 .  There is also another command "$xy" which loads the 
  19.     .MAC file itself and switches automatically to the DISPLAY screen to
  20.     display the file contents.
  21.  
  22.     The CONSOLE2.COM file is the same program as CONSOLE.EXE, but was 
  23.     created with the AT86 assembler.  See the last page of the 
  24.     Version 2.0 supplement material for a listing of this program.  Com-
  25.     pare it to the listing on page 2-11 of the manual.
  26.  
  27.     For the REDALERT.COM and REDA.COM files, see the discussion on page 9 
  28.     of the Version 2.0 manual supplement.
  29.  
  30.     MESSAGE.COM is a program written and SAVE'd with AT86. It shows how
  31.     to set up a data area for a DOS function call 09 - to display a string.
  32.     At this time the pseudo op instruction 'db' is not implemented.
  33.  
  34. 2.  The Macro Assembler pseudo op codes "EQU", "DB", "DW", and "OFFSET"
  35.     are not implemented.  
  36.  
  37. 3.  The default radix in the AT86 assembler is hexadecimal.  To specify a
  38.     decimal number when typing in an instruction, place a decimal point "."
  39.     after the number.  It will be immediately assembled in, in hex.  When-
  40.     ever an instruction is brought up for edit or display the values entered
  41.     will be displayed in hex, even if a number was entered in decimal or as
  42.     an ASCII character.
  43.  
  44. 4.  Programs created in AT86 and SAVE'd have a 16 byte header at the front
  45.     of each program.  The purpose of this header is to set up a data area 
  46.     in the program by resetting the DS and ES registers to 800h above CS.
  47.     When the program is run from DOS or when it is LOAD'ed into AT86, this
  48.     header is executed to reset these segment registers. Then, any state-
  49.     ments in your program which refer to the program's data segment will 
  50.     be offsets from cs:800.  That is, ds:0 is at cs:800.
  51.  
  52.     If one of these special programs is loaded and run (or traced) to 
  53.     completion, note that the registers are reset upon completion to values
  54.     which would be true if the file were an ordinary .COM file loaded with
  55.     the L command.  It cannot be rerun, since DS and ES have been reset. The
  56.     "RR" command at any time will also reset the registers so that the pro-
  57.     gram can no longer continue to be run or traced.  It must be reLOAD'ed.
  58.     
  59.     There is a separate page of documentation included with this package 
  60.     which shows the organization of the CONSOLE2.COM file.  Note the 16-byte
  61.     header which contains (1) the code to reset DS and ES, as well as (2)
  62.     two words that specify the end of the program code area and the length
  63.     of the data segment, located at cs:800.  
  64.  
  65.     The linked list of code labels, comments, and variables follows after the
  66.     code portion of the .COM file, marked with the "FA FF" bytes.  Then, "F0
  67.     FF" marks the beginning of the label/comment area, "55 FF" marks an area
  68.     which was used to resolve undefined labels while a program was being
  69.     entered or edited, and "76 FF" which marks the beginning of the area for
  70.     variable names.  For each of these areas, note that the first word
  71.     following the markers are the length of the area.  Then follows one or
  72.     more entries.  Each entry has three items which describe it:
  73.  
  74.                  - the relevant offset address from cs (a word)
  75.                  - the length of the string that follows (a word)
  76.                  - the string itself (label, comment, variable name)
  77.  
  78.     An area after the code with:  "FA FF FO FF 30 04"
  79.     would indicate the beginning of the area, the beginning of the label/
  80.     comments, and that the size of the label/comment area is 430h bytes long.
  81.     That is, this same area of memory in word format:  FFFA FFF0 0430
  82.     Immediately following these three words might be:  
  83.  
  84.                  00 01 06 00 61 62 63 64 65 66
  85.  
  86.     This would be one entry: a 6-byte long label for the instruction located
  87.     at cs:100.  In word/byte format this entry would look like:
  88.  
  89.                  0100 0006 61 62 63 64 65 66
  90.  
  91.  
  92. 5.  The built-in calculator.  It will now calculate numbers up to 8 meg.  The 
  93.     previous limit was 64k.  The converter will still only let you convert
  94.     numbers from hex to decimal or vice versa on numbers up to 64k, unless you
  95.     have an 8087 installed.  With an 8087, numbers up to 8 meg can be
  96.     converted.
  97.  
  98. 6.  There is a demo program on your disk that can be freely copied and given
  99.     to friends who would like to see Advanced Trace86 in action.  It is
  100.     called DEMOAT86.COM and has a companion file called DEMO.T86.  There
  101.     is a new command in AT86 which allows console input to be redirected and
  102.     taken from a disk file.  Examine the DEMO.T86 file to see how such a file
  103.     can be created to "drive" Advanced Trace86.  You can create your own demos
  104.     and macros.
  105.  
  106.     The command syntax is:  N<filename
  107.  
  108.     Withing the normal working copy of Advanced Trace86, the demo is invoked
  109.     by pressing the <F7> key and then the <A> key.
  110.  
  111.     To interrupt a "command file" that is controlling AT86, press <Esc> twice.
  112.  
  113. 7.  There is an additional display command option "d/s",
  114.     which displays a list of all the segments defined for the current set of
  115.     program labels.  After issuing a "d/s" command, you can then use the
  116.     "d/seg" command to see the list of labels defined for each of the segments
  117.     (read out of a .MAP file).  Then you can use the "&label" command for each
  118.     label, if you wish, to get the address of each label. (NOTE: "d/v" will
  119.     list all the variables and "&var" will show the address for a given
  120.     variable "var".)
  121.  
  122.     This "d/s" command can also be used to verify which segment was used by
  123.     the LL and LM commands when loading labels and variables.  At this time
  124.     variables are loaded with an offset only and use whatever value of DS is
  125.     current.
  126.  
  127. 8.  AT86 is now a .COM file, instead of a .EXE file.
  128.  
  129. 9.  LL & LM - If you are tracing a program that is loaded at some special
  130.     location in memory and you have a .MAP file, use the "LLseg" command
  131.     to load the labels to the appropriate segment where the program is
  132.     located.
  133.  
  134.     LL defaults to loading labels at the currently defined value of the
  135.     Program Segment Prefix + 10h.  That is, if the PSP is at 1700, the
  136.     commands "ll" and "ll1710" will do the same thing.  For .COM files,
  137.     however, "lm" and "ll1700" would be equivalent.  (When AT86 is first
  138.     booted, or after a "new" command is issued, the CS, DS, ES, & SS are
  139.     set to the PSP segment.)  
  140.  
  141. 10. LV - To load variable names from a .LST file, the .LST file must first
  142.     be edited.  With a text editor, select the data segment containing the
  143.     list of variables that are defined.  You can also merge together the
  144.     data segments from other .LST files into one file if you wish.  Delete
  145.     all other information out of the .LST file (or create a new file).  Also
  146.     delete any lines in the new file which do not contain a variable name.
  147.     If a portion of the .LST file has code merged from an INCLUDE file, delete
  148.     the "C"s placed in the file which identifies the lines which have been
  149.     included.  Be sure to include the beginning and ending data segment
  150.     identification lines containing the words "segment" and "ends"
  151.     in the edited file.  Do not use a .LST file created with the CREF line
  152.     numbers in the first column.
  153.  
  154.     Remember that AT86 works with small memory model programs only, with
  155.     respect to the data segment.  Thus, only the offset address is
  156.     important.  When merging the variable names with your program code, the
  157.     current value of DS will be assumed in matching up the names with your
  158.     code.
  159.  
  160. 11. When defining breakpoints using the BS command, be sure not to put a
  161.      space between the BS and the breakpoint number.  That is "bs1 123"
  162.      is okay, but "bs 1 123" is not.
  163.  
  164. 12.  Permanently configuring a copy of AT86.COM for a color display is
  165.      described in the discussion of the Q commands - "/QN" and the example.
  166.      Note:  to color configure the stack, do not use a command like "qs1"
  167.      This conflicts with another Q command involving changing the video
  168.      RAM segment.  Instead type in "qs10".  The same applies for "qs2" 
  169.      and "qs3".  Also, you can set up a color configuration file on disk
  170.      and use the redirect command (i.e., "n<file") to "read in" this file
  171.      and set the color parameters.
  172.  
  173. 13.  Super Trace Mode Example - To set up a super-trace break condition so
  174.      that the trace screen only stops on a INT 21 insruction (DOS function
  175.      call), the appropriate one line instruction in the conditional code
  176.      (typed in immediately after entering the "T@" command) is:
  177.  
  178.                     cmp ax,21cd
  179.  
  180.      This will cause AT86 to trace only when the instruction in memory is the
  181.      op-code byte sequence "cd 21" (or, the word "21cd").  Thus, if you wanted
  182.      to break on a value of AX which your program may have, you have to test
  183.      for [bp-2].  To break when ax=1234, for example, use the following:
  184.  
  185.                     cmp [bp-2],1234
  186.  
  187.      See the discussion under the GO command "Conditional Breakpoints".  The
  188.      same rules apply for the "G@" as well as the "T@" command.
  189.  
  190. 14.  HELP command - A new command is now built into AT86, invoked by typing 
  191.      "help" at the command mode prompt.  The text file "at86.hlp" is looked
  192.      for on the drive/path AT86 was loaded from and will be displayed a page
  193.      at a time.  Press <PgDn> key to display the next page.  Or, press the
  194.      down cursor key to display one more line.  Press the <Esc> key to end.
  195.      You can customize this file any way you wish.
  196. 
  197.