home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 454.lha / Exector / exector-doc < prev    next >
Text File  |  1990-12-06  |  13KB  |  250 lines

  1. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2.                                    Exector
  3.                            © 1990 by Doug McLean
  4.  
  5. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  6. WHAT IT IS:
  7.  
  8.     Exector is a program designed to locate and display some of the
  9. system structures that the operating system on the Amiga maintains and
  10. uses (specifically, the Exec structures). If you program on the Amiga and
  11. know what I am talking about, then you will probably be able to put
  12. Exector to good use. If you are learning to program on the Amiga or are
  13. interested in how it works and how it keeps track of everything (like tasks
  14. and memory and devices and a lot more), then Exector could be a valuable
  15. educational aid (along with the appropriate reference and text books). If you
  16. arn't into things like C, Assembler and operating systems at all, then go
  17. download a game or something, Exector will be utterly useless to you. But if
  18. you are interested in this sort of stuff, you will be happy to know that
  19. Exector will display any of the system structures in any of the Exec
  20. header files.
  21.  
  22. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  23. HOW IT WAS MADE:
  24.  
  25.     The gadget images were designed in Deluxe Paint III then saved as
  26. brushes. Power Windows 2.0 was used to make the custom screen and windows,
  27. the menu, and actual gadgets, and to generate the C structures for these.
  28. The program was written and compiled with Lattice C 5.04. It was written
  29. on an Amiga 500 with 1 meg of memory and two floppy drives, running
  30. KickStart 1.2. Exector has not been tested with any add on products such as
  31. accelerator/processor cards or memory expansion (but it should work fine if
  32. the manufacturer followed Commodore's rules).
  33.  
  34. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  35. COPYRIGHT, UPDATES, AND BUGS:
  36.  
  37.     Exector, and any associated files and documantation are CopyRight
  38. 1990 by Doug McLean. All rights are reserved.
  39.  
  40.     You are granted permission to distribute and use Exector provided
  41. that you comply with the following terms and conditions:
  42.  
  43.     [1] You may only distribute Exector in it's original archived
  44.         form, intact, complete, and unmodified. If the program is
  45.         distributed as part of a collection of software on disk,
  46.             it must be either in it's original archived form, or complete
  47.             with all files and documentation in it's own directory.
  48.     [2] Exector may not be sold, and no fee may be charged for the
  49.         program except where the fee is:
  50.         [a] the normal download fee charged by information services and
  51.             some BBSs, and such fee is applied to all downloads,
  52.         [b] a nominal disk copying fee charged by a non-profit users
  53.         group, and Exector is part of a collection of software on
  54.         that disk.
  55.     [3] If you use Exector for non-commercial purposes, you must send
  56.          a $25 registration fee to the author at the address below.
  57.     [4] If you use Exector at all for any commercial purpose, you must
  58.         send a $50 registration fee to the author at the address below.
  59.  
  60.     The author accepts no responsibility for the performance or lack
  61. thereof of this program. 
  62.  
  63.     Updates, if I decide to update Exector, will be available ONLY to
  64. registered users. I am making no promises to update Exector, but if I do,
  65. upgraded versions will be available ONLY to registered users. Users who
  66. have registered will be able to obtain any upgrades as they are released
  67. either from my BBS or via mail (you will have to supply a disk, envelope,
  68. and postage). Whether I upgrade Exector or not will depend largly on how
  69. may people register.
  70.  
  71.     As for bugs, at release time I haven't found any, but that doesn't
  72. mean anything. If you find any, please report them to me either via mail
  73. or my BBS. NOTE that it is possible to guru your system with Exector, this
  74. is not the programs fault. Just don't try to look at any of the hardware
  75. i/o registers or the system or current program stack (these stacks can
  76. want change as you look at them, and sometimes the system doesn't like
  77. this).
  78.  
  79.     Please send registration fees, bug reports, comments, suggestions,
  80. and any old computer hardware that you have lying around to:
  81.  
  82. Doug McLean Jr.
  83. 145 Bedell Ave.
  84. Saint John, N.B.
  85. Canada, E2K 2C3
  86.  
  87. BBS: The Mad Scientist's BBS  (506) 648-9196 12/2400 8/N/1
  88.  
  89. Note that the BBS is down when I need the computer for something else
  90. (like programming), and I may answer the phone voice.
  91.  
  92. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  93. USAGE:
  94.  
  95. run exector
  96.  
  97.     Sorry, this doesn't run in the backround like I wanted it to. The
  98. linker is giving me problems with this (it never did before), it says
  99. "reference to unmerged data item" and tells me to compile with -b0. That
  100. didn't help, and neither did declaring the item in question (_BackgroundIO)
  101. far. I'll work on it if I do another version, but for now, please start
  102. Exector with the run command.
  103.  
  104. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  105. A BIT OF INFO:
  106.  
  107.     The operating system in the Amiga is mostly a group of libraries
  108. that handle the various aspects of the Amiga's operation. Dos handles files
  109. and related things, Intuition handles screens, windows, gadgets, etc, and
  110. Exec handles tasks, memory, interrupts, and a host of related things.
  111. Clearly, the Exec is essential to the Amiga's operation.
  112.  
  113.     The "root" structure for the Exec is called ExecBase. It contains
  114. pointers to linked lists of tasks, devices, memory, and to other data and
  115. code. It also contains a fair amount of actual data (as opposed to pointers)
  116. within the structure. ExecBase is THE main structure in the Amiga's
  117. operating system, everything starts here. From here you can find other
  118. libraries, tasks, memory, devices, and whatever else the Exec keeps track
  119. of. There are many excellent reference books on this, and several public
  120. domain/shareware/freeware/comercial programs that will help. Of particular
  121. note are are ExecDiss © 1989 by Markus Wandel and Xoper 2.2 © 1989 by
  122. Werner Gunther. ExecDiss will disassemble and comment the part of the
  123. Amiga's ROM that contains the Exec. The comments are plentiful and 
  124. informative. Xoper is a system monitor that shows just about everything
  125. the Amiga is doing (or waiting to do, or knows about). It can provide
  126. pointers to many of the structures you may wish to examine with Exector.
  127. Another good place to look for info is in your C or assembler header files,
  128. they are usually heavily commented.
  129.  
  130. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  131. USING EXECTOR:
  132.  
  133.     When Exector starts up, after a brief wait you will see the top part
  134. of your ExecBase structure (the system only has one of these, but there are
  135. numerous occurances of the other structures). Above the structure display
  136. are the gadgets. There is one gadget for each type of structure defined
  137. in the Exec header files, as well as a hex dump gadget. When you use one of
  138. these gadgets, you must tell Exector the base address of the structure you
  139. wish to examine. There are two ways to do this:
  140.  
  141.     [1] Click first on a valid address in the display window, then
  142.         on the appropriate structure gadget. Valid addresses are any
  143.         address on the left of the screen in the address column, or
  144.         any address PRECEEDED BY A * on the right of the screen in
  145.         the value column. YOU are responsible for ensuring that the
  146.         structure you wish to examine is actually present at the
  147.         address you select, the program doesn't check this in any
  148.         way. The address you select will appear in the control
  149.         window next to the hex input string gadget. You may not
  150.         select a null pointer in this way.
  151.     [2] Click first on the structure gadget and then enter a hex
  152.         address in the hex input string gadget. The input must be an
  153.             8 digit hex address (a 32 bit unsigned long). LEADING ZEROS
  154.         MUST BE INCLUDED or your input will not be accepted.
  155.  
  156.     Using the information in ExecBase, you should be able to find just
  157. about anything the Exec looks after. However, to make things a bit easier,
  158. I have included the ability to list tasks, devices, libraries, message
  159. ports, memory, and resources. These lists are accessed from the menu bar.
  160. Select the list you wish to view, then click on the address associated
  161. with the structure you wish to view, then on the structure type gadget.
  162. Future versions may have expanded support in this area (more info in the
  163. lists and more lists).
  164.  
  165.     Whenever you view a structure, it's structure type and address are
  166. placed on an internal stack. This stack will hold up to 512 structure/
  167. address pairs. Select the Bk (back) gadget to move back one in the stack.
  168. The structure you were previously looking at will be shown, and the stack
  169. pointer will be lowered. You can back up all the way to ExecBase. Note
  170. that as things change rapidly in the Amiga's memory, this stack may not
  171. always be valid (although I have found that it usually is).
  172.  
  173.     Another important gadget is the No Exp/Expand gadget. This gadget
  174. is a toggle gadget that selects expanded or normal structures. When set
  175. on Exoand, all embedded structures are expanded and shown in the display
  176. in their correct place within the overall structure that you are viewing.
  177. Since many structures contain a node structure as their first element,
  178. expanded structures make it very easy to follow a list of structures
  179. through memory: get the first structure in the linked list (usually from
  180. a list structure within the ExecBase structure), select expanded structures,
  181. then click on the pointer to the next node and then the structure type gadget
  182. as long as there are nodes to follow. The last node in the list is a dummy
  183. node (identified by a null pointer to it's successor), so when you get here
  184. you will want to hit Bk once to get to the last real node. You can toggle
  185. expanded structures on and off as you please. Structure members that are
  186. part of a sub-structure within the current structure have their names
  187. preceeded by a > in the display. Sorry, I didn't do anything to show
  188. how deep a member might be within sub-structures, just that it is part
  189. of some sub-structure.
  190.  
  191.     Here is what all the gadgets do:
  192.  
  193. Structure Type Gadgets: selects structure types (includes Hex gadget).
  194.             See above.
  195. Hex Input Gadget      : allows entry of a 32 bit hex address. Activated by
  196.             and used with structure type gadgets. See above.
  197. Bk                    : The back gadget moves you back one in the internal
  198.             stack. See above.
  199. Icon               : this puts the program to sleep and places a small
  200.             gadget in a small window on your workbench screen.
  201.             Select it to awaken Exector. Your stack is not
  202.             disturbed, as things change often in the Amiga,
  203.             you may wish to select reset after awakening
  204.             Exector.
  205. Reset                 : This clears the stack, and returns you to startup
  206.             conditions (the expand gadget is not affected). It
  207.             is necessary to select this if the internal stack
  208.             fills up, or if you want to start over.
  209. Up and Down Arrows    : These move the display up or down one half screen,
  210.             if the current buffer is longer than one screen.
  211. Again                 : This displays the current structure over again.
  212.             Use it when the structure you are examining changes
  213.             frequently (for example, a running task), or after
  214.             looking at a list from the menu if you want to
  215.             re-display the current structure.
  216. File                  : This will send whatever is in the current display
  217.             buffer to whatever file you choose (ram:exec, prt:,
  218.             etc). The file is opened in append mode. Select
  219.             this gadget, enter the file name in the string
  220.             gadget next to it, then hit return.
  221.  
  222. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  223.  
  224. HINTS, TIPS, AND NOTES:
  225.  
  226.  - Remember that the Amiga is a multi-tasking system. You can use other
  227.    programs (like Xoper, mentioned way above) to provide pointers to
  228.    structures.
  229.  - You can use Exector to get pointers to code locations (such as
  230.    interrupts or ROM) and dis-assemble the code with a dis-assembler in
  231.    another window.
  232.  - It is easier to view ExecBase non-expanded, and view any sub-structures
  233.    alone rather than as part of ExecBase. Use ExecBase to get to the
  234.    first structure in a list, and display this structure. Now select
  235.    expanded and you can follow the node links to the next structure in
  236.    the list. Remember that the last node in the list is a dummy node, and
  237.    not a structure of the type you are viewing.
  238.  - If you wish to see the text pointed to by a character pointer, select
  239.    the pointer in the value column, then the Hex gadget. Hex and text will
  240.    be displayed. Then use Bk to get back to your structure.
  241.  - When viewing expanded structures, offsets are displayed as an offset
  242.    from the start of the structure which they are directly part, not the
  243.    overall structure. Expand ExecBase and scroll through it to see what I
  244.    mean.
  245.  - You are responsible for ensuring that the structure you expect is at the
  246.    address you specify. To the program, whatever is found in the address
  247.    you specify is just more data, and it will try to display it as the
  248.    structure you specify. Specifying a bad address could cause a guru!
  249.  
  250.