home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 029.lha / amibug.doc < prev    next >
Text File  |  1987-04-02  |  5KB  |  107 lines

  1.               AMIBug for the Amiga
  2.         Copyright © 1987 by W.R.Perkins, PCM Associates
  3.               (Alpha release .01)
  4.                   Usage Notes
  5.  
  6.      AMIBug is an MS-DOS Debug like utility written specifically for the
  7. Commodore Amiga 1000 system. It provides a look into the 68000 microprocessor,
  8. and (almost) any program you care to run.
  9.  
  10.      AMIBug provides the following features:
  11.  
  12.     o memory display/edit
  13.     o register display/edit
  14.     o user program single-step mode
  15.     o a built-in disassembler
  16.  
  17.  
  18.     To get a list of commands, type ?<return>. This debugger is set up for
  19. the 68000 microprocessor ONLY! I have not yet implemented a check for the
  20. 68010, nor the code to handle the different stack frame.
  21.  
  22.     Most commands take the form CMD <start> <end>. Spaces between
  23. the command and <start> and <end> are required. A few of the commands are of
  24. the form CMD<b|w> <start> <end> where b specifies byte and w specifies word.
  25. the b or w is optional, and AMIBug remembers which you were last at.
  26.  
  27.  
  28.     Following is a list and description of the commands currently
  29. available in AMIBug:
  30.  
  31.     B <address> - sets base address for the program counter. When single-
  32. stepping or unassembling sections of code, it is often useful to be able to
  33. view the program counter relative to the user program start address, or to a
  34. routine's start address, so you can follow a listing from the assembler as you
  35. debug your code. Register displays (<R>eg command or the <S>tep command,
  36.  see below) will display the program counter relative to the base address you
  37. enter. The <G>o to breakpoint command will also work in the relative mode.
  38.  
  39.     D<w | b> <start> <end> - display memory in word or byte format:
  40. Displays a block or a line of memory data in hex and ascii formats, a word or
  41. a byte at a time.
  42.  
  43.     E<w | b> <address> <data, data,...> - edit memory:
  44. Allows you to change bytes or words in memory. If you enter hex data after
  45. the address (absolute 32-bit address, no relative mode here) then AMIBug will
  46. simply put the data into memory and prompt you for the next command. If you
  47. type in an address only, AMIBug will display the address and the current data
  48. at that address, display a '-', and allow you to enter another value. If you
  49. don't want to change the data, just type <return> and AMIBug will go back to
  50. the prompt.
  51.  
  52.     G <address> - go from current PC to address:
  53. Runs the loaded program from the program counter address to the specified
  54. address. When the user program exits, AMIBug gets control again (hopefully) and
  55. displays the program exit code.
  56.  
  57.     I - information:
  58. Displays the AMIBug task structure address, the user stack top, and
  59. the location of the first instruction of the user program in hex.
  60.  
  61.     L [program name] - load user program:
  62. Loads the program into system memory (uses the AmigaDOS LoadSeg function) and
  63. displays the start address of the first program segment. This command Unloads
  64. any previously <L>oaded program before loading the new one.
  65.  
  66.     P - proceed:
  67. Used when you come to a jsr or bsr instruction, will automatically set a break-
  68. point at the next instruction after the current one, and execute the branch or
  69. jump to subroutine. This is so you won't have to step through a known working
  70. subroutine, or follow a dbra-type instruction through millions of iterations.
  71.  
  72.     Q - quit AMIBug:
  73. Unloads the user program (if one is Loaded) and exits back to AmigaDOS.
  74.  
  75.     R - registers:
  76. R<return> will display the current register set, the current instruction, and
  77. the current flags. RD0 <hex data> will alter data register 0, RA6 will change
  78. address register 6, etc. If no data is given, the register is cleared. RA8
  79. is used to change the program counter.
  80.  
  81.     S - single step:
  82. Executes the instruction displayed in the current Register set, and displays
  83. the resulting registers and flags.
  84.  
  85.     U <start> <end> - unassemble:
  86. Will unassemble memory from <start> to <end>, or a screenfull (24 lines or so)
  87. of memory. Typing U<return> will unassemble from the current PC (if you just
  88. Stepped), or from the instruction following the last Unassemble.
  89.  
  90.  
  91.  
  92.     Some notes:
  93.  
  94.   This is a "first time out" onto Compuserve with a program that I myself have
  95. written from scratch. I am interested in hearing about any problems, comments,
  96. criticisms, and/or complaints you may have about this program, and I will try
  97. to fix any bugs that are found. I hope to release bigger and better versions
  98. of AMIBug in the near future. So far, I have located one Exec function that
  99. seems to get AMIBug hopelessly lost: ExitIntr (FFE2) in the Exec Library.
  100. So far, I have found no mention of it in any of the RK manuals, nor in any of
  101. the books about how to use Amiga functions. It is apparantly used by the Aztec
  102. C compiler (I found it in Melt) but it seems to serve no useful purpose (I
  103. changed the program counter when I came to it, and went ahead, the screen
  104. melted just like it was supposed to) but you cannot Proceed or breakpoint
  105. around it. To report bugs and such, use EMAIL (I am 72245,710) to reach me. I
  106. will try to answer any and all correspondance I get. Meanwhile, enjoy.
  107.