home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / programming / a196_1 / !Monitor / !Help next >
Text File  |  1992-12-02  |  12KB  |  261 lines

  1. Monitor release version 1.00 ___________
  2.  
  3.         *** Monitor 1.00 30-Nov-1992 © Steven Kramer ***
  4.         At the time of writing I was in rather a hurry (and cold), so
  5.         minimal documentation is provided here. More to follow later.
  6.         
  7.         I can be reached for anything relating to this package (and more)
  8.         by (e)mailing me: 
  9.  
  10.         Steven Kramer
  11.         Hoogte Kadijk 21-BII
  12.         1018 BE Amsterdam
  13.         (Netherlands)
  14.  
  15.         e-mail: kramer@ohm.phys.uva.nl
  16.         
  17.  
  18. Copyright notice________________________
  19. (Well everybody has one, and I want one too)
  20.  
  21.         The Monitor program consists of this file, and all the files in
  22.         this directory.
  23.         This program, and everything in it, is © Steven Kramer. However,
  24.         copies of the program may be made freely on these conditions:
  25.         1) The files in the program may never be distributed seperately.
  26.         2) This program may never be copied or distributed if it has been
  27.            modified in any way.
  28.         3) This program may not be part of a commercial or promotional
  29.            package without the written consent of the author.
  30.  
  31. Please note I do not object to modifications, but the modified program may not
  32. be distributed anymore. If you think your modification is useful please send
  33. me the updated files.
  34.  
  35.  
  36.  
  37. Money matters___________________________
  38.  
  39. Yes, I would very much appreciate it if I would get any money from users of
  40. this program. Why would you do THAT?
  41.  
  42. - I started this program about one year ago. I wrote it entirely from scratch
  43. (and all in BASIC and assembler, so no easy C libraries). This brings me to the
  44. following point. The program is decidedly illegal in trapping errors, because
  45. at the time of writing I had no documentation at all except lots of magazines,
  46. so two Acorn User articles on the window manager was about it. Why is everything
  47. from Acorn (like the Programmer's Reference Manuals) so expensive? Then again,
  48. to Acorn's credit, I think the flexibility and user friendliness of RISC OS are
  49. proven by the existence of this program (remember the 'without documentation'?)
  50.  
  51. - I think this program is useful for any programmer, from beginners to experts.
  52. So think about this, when you all are using it: How long would it take you to
  53. come up with something similar?
  54.  
  55. - I would like to think that some people actually appreciate this program, so I
  56. did not spend all the time (which was a lot) on it just for my own little
  57. utility. This will, of course, also give me some motivation to keep updating
  58. the program.
  59.  
  60. - You. A point about you. First of all, this program is NOT shareware. What I
  61. mean by that is that I don't make registration compulsory in any way. If you
  62. do not use this program more than once every aeon, why would you spend any money
  63. on it? But if you use it a lot, it might actually be fair to send me some money
  64. for doing all your work...
  65.  
  66. So register yourself! This means sending me a small amount of money (it's up to
  67. you how much a small amount is, but do not make it too small) which entitles you
  68. to the new versions (i.e bugfree) and better documentation when they appear.
  69. This will also give you a slightly cleaner conscience (needed to advance in the
  70. evolution of your cosmic being).
  71.  
  72. And if you think that I must think a lot of this program to have the nerve to
  73. ask for money... you are right, I do.
  74.  
  75.  
  76.  
  77. About the program_______________________
  78.  
  79.         Monitor allows you to disassemble/assemble/search/execute
  80.         machine code programs. Two modes are provided for a program,
  81.         internal and external. In external mode the unpaged memory
  82.         can be examined (e.g. RMA, ROM), in internal mode a file is
  83.         loaded in a Wimp memory slot. Monitor allows you to open
  84.         windows on this program containing either a hex-dump or the
  85.         disassembled listing. The file can be edited by entering new
  86.         instructions or typing new data. By setting the environment values
  87.         a program can be 'soft' relocated, i.e. ADR instructions and
  88.         relative STR/LDR's will be relocated. This also affects the
  89.         assembler.
  90.  
  91.  
  92. Disassembler____________________________
  93.  
  94.         Not too much to say about this. Shows the program listing,
  95.         allows you to open new windows by double clicking on B[L] or ADR
  96.         instructions.
  97.         
  98. Options Word value - show instruction's word value.
  99.         Address offset - Off:all relative addressing replaced by ADR
  100.         Caps on - display in capital letters
  101.  
  102. Notes   Doesn't allow for coprocessor instructions.
  103.         Does a whole lot of other things I can't remember.
  104.  
  105.  
  106. Assembler_______________________________
  107.  
  108.         Allows you to edit programs. All 'standard' keypresses have the
  109.         usual effects. Also allows you to automatically relocate the
  110.         program when inserting a new instruction. Escape restores the
  111.         original text.
  112.  
  113. Options Insert - Toggles insert/overwrite mode for text
  114.         Auto relocate - relocates the program after pressing Return
  115.         Clear new line - clears the instruction text after Return
  116.  
  117. Notes   Doesn't allow for coprocessor instructions at all.
  118.         Automaticallly swaps registers in illegal multiplies.
  119.         Recognises 'PC' for R15, and ADR pseudo-instruction.
  120.         Lots more uninteresting things. (like SWI names or numbers)
  121.  
  122.  
  123. Find____________________________________
  124.  
  125.         Allows you to search for certain (combinations of certain)
  126.         instructions. Use by setting the search mask in the instruction 
  127.         windows -accessed from the Find menu (press F1)- and pressing the
  128.         Find button. Now the find window will be opened showing all 
  129.         occurrences of the Find instruction. Open the find options window,
  130.         by setting the region value you can specify how much instructions
  131.         'above' and 'below' the found instruction will be displayed. Now
  132.         enter a new Find pattern and press the XRef button. The region will
  133.         be searched for the new pattern.
  134.  
  135. Options Word value, address offset, Caps on - see Disassemble
  136.         Blank line - insert a blank line between regions
  137.         Region up, down - see above
  138.  
  139. Notes   Double clicks open code windows on the instruction.
  140.         Searches for ADR's and PC relative STR/LDR's can be done by
  141.         entering a numeric value in the LHS register list.
  142.         No more than 256 occurrences.
  143.         Weird things will happen when you change the environment.
  144.         And yes, you are right about the coprocessor. It's not.
  145.  
  146.  
  147. Execution_______________________________
  148.  
  149.         This is the most inconsistent part of the program. It is utterly
  150.         unreliable, so be warned! It allows you to execute (parts of) the
  151.         program, in normal or step mode. What happpens is this:
  152.         
  153.         Normal:
  154.         All the registers will be filled with the values from the register
  155.         list window whose buttons are set. The program branches to the
  156.         address in R15, with all processor flags set according to the
  157.         switches. Control is returned when one of the hardware vectors is
  158.         called (i.e. branch through zero, address exceptions) or directly
  159.         by jumping to the return address. If a button is not set for a
  160.         register it will not be updated, and not be filled on entry. For
  161.         three registers defaults will then be used:
  162.         R13 --> points to a 1024 byte full down stack
  163.         R14 --> points to the return address
  164.         R15 --> points to the first instruction
  165.         
  166.         Step:
  167.         Essentially the same procedure as above, except each instruction
  168.         will be executed by the program, and not the ARM. This allows you
  169.         to execute a limited number of steps (0 means continous run), to
  170.         run programs that are not relocatable and to stop the execution at
  171.         a certain point (see the breaklist) or in a certain area. Execution
  172.         can be stopped by pressing Escape. Everything that has been said
  173.         about normal execution also holds for step execution.
  174.         
  175.         Execution output can be saved in two ways, the first (grab vdu)
  176.         intercepts all OS_WriteC calls and buffers them. The second tries
  177.         to grab the end result (i.e. when the program retakes control) as
  178.         a sprite. The buffer is grabbed from the Wimp pool.
  179.  
  180. Options Lots...
  181.  
  182. Notes   You are not allowed to set r13_Sup, r13_IRQ or r13_FIQ from the
  183.         register list.
  184.         Step mode is always executed in USR mode...
  185.         ...so no register banking
  186.         One exception is made in step mode (see also 'special hacks'), in
  187.           that SWI instructions are carried out literally for speed. This has
  188.           its consequences though!
  189.  
  190.  
  191. Things that don't fit___________________
  192.  
  193. -->     Save from code window --> Code saves the code as a memory block
  194.                               --> Text saves the code as a source file
  195.  
  196. -->     The data window allows --> F4 (or select from menu) text search
  197.                                --> Higlight + inverse video display of
  198.                                    control characters only in <256 colours.
  199.  
  200.  
  201. Special hacks___________________________
  202.  
  203.         For all the incredibly intelligent programmers out there...
  204.         Because SWI's are executed as pure instructions there is a problem
  205.         with relocatability. For instance, what happens with OS_Write0, which
  206.         gets passed a relative address in R0? The answer is simple, it fails.
  207.         I have tried to solve this by allowing any or all of the registers to
  208.         have its value transformed to the absolute value. See the file SWIlist
  209.         for examples, but note that registers are modified again on exit!
  210.         There is however one more problem with SWIs... Yes, it is the elusive
  211.         OS_WriteS. There is no way this could be implemented except for writing
  212.         your own routine, which is exactly what has to be done. See the file
  213.         GenSWI for information on how this is done. Note that any changes to
  214.         SWIList and GenSWI have to be made permanent (in the file SWITable) by
  215.         running GenSWI.
  216.  
  217.  
  218.  
  219. Copyright notice________________________
  220. (Well everybody has one, and I want one too)
  221.  
  222. This program, and everything in it, is © Steven Kramer. However, copies of the
  223. program may be made freely on these conditions:
  224. 1) This program, and all the files in it, may never be distributed seperately.
  225. 2) This program, and all the files in it, may never be copied or distributed
  226.    if they have been modified
  227. 3) This program, and all the files in it, may not be part of a commercial
  228.    or promotional package without the consent of the author.
  229.  
  230.  
  231.  
  232.  
  233. Things that don't even have the slightest bit to do with the actual program
  234.  
  235. Things done since ...
  236.      v0.00 Basically written the entire program
  237.      
  238.  
  239. Things to do (maybe, order of likeliness)
  240.      Get rid of loading so many windows
  241.      ---> At present you can't have more than two Monitors running, the window
  242.           count is about twentyish. This will happen when I get the Interface
  243.           thingy.
  244.      Allow non-relocatable code to run
  245.      ---> Either by creating a new shell, and moving the program to the new
  246.      environment or maybe simpler just by paging memory with the MEMC.
  247.      
  248.      Implement register banking in step mode
  249.      ---> Not hard, but a lot of work and little reward
  250.      
  251.      Step SWIs
  252.      --> Simple actually, especially when the register banking is done.
  253.          A lot of SWI's still will give a lot of trouble I am sure.
  254.  
  255.      Multiple files in memory
  256.  
  257.      Receive some money
  258.  
  259. Recommended cd : The Geto Boys - The Geto Boys
  260.      And remember, the Dutch invented the CD, so I should know!
  261.