home *** CD-ROM | disk | FTP | other *** search
/ The CDPD Public Domain Collection for CDTV 3 / CDPDIII.bin / pd / utilities / monitors / scypmon / scypmon_english.doc < prev    next >
Text File  |  1992-09-29  |  22KB  |  540 lines

  1.  
  2.             Description for Scypmon V1.6 (Update 09/30/92)
  3.             \============================================/
  4.  
  5. Release:
  6. --------
  7.  
  8. (C) by Jörg Bublath 1989-1992
  9.  
  10.   Developing this program took me a long time, so I'd appreciate a little
  11. financial support. Because I hate all those "crippled unregistered versions",
  12. I won't do this myself to get my DM 5,- (about US$3) shareware fee (that
  13. really isn't much, is it ?), but I appeal to all those users out there to be
  14. honest ! I know it costs a big pile of money to pay or all those shareware-
  15. programs that one has. So I would like to suggest a new shareware concept:
  16. I call it "you share me - I share you", which means that all authors of
  17. shareware-programs let me use their programs for free, and they mine, but all
  18. those who don't write any useful programs can begin doing so - or pay!
  19. Update-services, which would cost money of course, aren't included in
  20. the "share each other" concept. All those guys who helped me with ideas,
  21. test-reports and routines to make Scypmon better, don't have to pay
  22. shareware either (but I don't mind when they do :-))
  23.  
  24.   I prohibit changes to the program (incl. source) and documentation.
  25.  
  26.   Scypmon has to be delivered in the complete package. The following files
  27. must be included:
  28.  
  29.   -ScypmonV1.6
  30.   -Scypmon_deutsch.doc (German documentation)
  31.   -Scypmon_english.doc (English documentation)
  32.    extra: dis.library by Tobias Walter
  33.  
  34.   Registered Users will receive updates and sourcecodes if they send a disk
  35. including return postage.
  36.  
  37.   Public Domain series may use this program if this disk is filled with
  38. many other programs (min. 80%) and the price is below $2 !
  39.  
  40. Special thanks to:
  41.   Berhard Möllemann, for many bug-reports and some code,
  42.   Tobias Walter, for as many reports and the dis.library and other code,
  43.     and many other that helped with ideas!
  44.   MrScary, for help with the english documentation.
  45.  
  46. General Information:
  47.  
  48.   This monitor uses a full-screen-editor with or without automatic
  49. insertion and an additional command-history of 1K. The cursor can be
  50. moved using the cursor-keys or by positioning it with your mouse.
  51. If you leave the screen up or down, the screen will be scrolled in the
  52. opposite direction. If the status-line is inverted, then the monitor is
  53. active. The headline also shows if you are in insert or overwrite mode.
  54. When you use the scrolling and there is an output-line of the "m", "i"
  55. or "d"-command on the screen the next logical line of this command will
  56. appear instead of the empty line.
  57.  
  58.   Using the cursor-keys with shift will cause scrolling by one full screen.
  59.  
  60. Some other keys that are used in a special way:
  61.  
  62.   HELP (=CTRL-l)          : Clear Screen + Cursor Home
  63.   Shift + HELP (CTRL-K)   : Clears the rest of the line starting at the
  64.                             actual cursor-position.
  65.   Shift + DEL             : Inserts one blank
  66.   On the numeric keypad:
  67.   Shift + 7               : Cursor home (upper left corner)
  68.   Shift + 1               : Cursor end (lower left corner)
  69.   Shift + 0               : Switch between insert and overwrite mode
  70.   Shift + .               : Del
  71.   F1                      : Jsr-dissassemble in
  72.   Shift + F1              : Switch mode "m" and "d" in full-screen display
  73.   F2                      : Jsr-dissassemble out (explained later)
  74.   Alt + Cursor Up         : Previous command-history entry
  75.   Alt + Cursor Down       : Following command-history entry
  76.  
  77. During screen-output:
  78.  
  79.   SPACE                   : Stop screen-output, continue: SPACE again
  80.   CTRL-C                  : Break screen-output
  81.   Left mouse-button       : Hold to stop screen-output
  82.  
  83. Exceptions:
  84. -----------
  85.  
  86.   All exceptions except #08 (privelege violation) and the trap #0x - commands
  87. will not cause a guru, but instead a monitor output stating "exception #xx at
  88. xxxxxx" if the "-p"-option to patch the exceptions is activated. In addition
  89. you will receive some detailed information about the task that crashed (see
  90. "e"-command) and it should no longer be in the task-list. If you crash your
  91. machine totaly there will be certainly only one help for you :
  92. ctrl + amiga + amiga !
  93.  
  94. Calling the monitor from CLI:
  95. -----------------------------
  96.  
  97. You can call the monitor by typing:
  98.  
  99. scypmon [!] [-bdp] [-s <pubscreen>] [-f <fontname> <fontsize>] [batchfile]
  100.  
  101.  
  102. "!"  which, if used, always has to be the first option disables the
  103.      detaching. This is necessary if you use "WShell 2.0", because its
  104.      startup-handling isn't ok.
  105.  
  106. "-b" will make the monitor start itself in background, which means that its
  107.      window will not be activated at startup.
  108.  
  109. "-p" will patch the exception vectors to catch gurus. If this option is
  110.      not used, Amiga-Dos will do what ever it likes with crashes.
  111.  
  112. "-d" Tries to use the dis.library to disassemble, which means that Scypmon
  113.      will know 68030-commands. Assembling is still only possible for
  114.      68000, and even this will sometimes cause trouble with the dis.library
  115.      because of a slightly different syntax.
  116.  
  117. "-s" Running 2.0+ you are able to have public-screen. This option makes it
  118.      possible to open the scypmon on any public screen.
  119.  
  120. "-f" For use of other than the fonts (systemfont) defined with preferences.
  121.  
  122.   This batchfile may be any textfile eg. edited with "ed" that contains a
  123. list of monitor commands. This option is very useful for absolute
  124. programming, when you need to load graphic or sound data into memory.
  125.  
  126. eg.:
  127. {
  128. o 60000 7f000 00
  129. l "graphic.data" 70000
  130. l "sound.data" 60000
  131. l "sinus-table" 7e000
  132. x
  133. }
  134.  
  135. This batchfile will clear the memory from 60000 to 7f000, load the three
  136. programs absolutely into memory and leaves the monitor afterwards.
  137.  
  138. A clarification to the memory allocations:
  139.  
  140.   To prevent allocmem-chaos, the monitor organizes memory-allocations in
  141. its own way. You have 8 segments (0-7) that can be used for allocations.
  142. If you use one segment twice then the old memory allocated in this
  143. segment will be freed. When you leave the Monitor all segments will be
  144. given back to Amiga-Dos. This prevents a chaos like in c-mon when you
  145. load several programs and don't know afterwards where and how much, so
  146. you have to reset to have a clean memory again.
  147.  
  148. Menus
  149. ------
  150.  
  151.   The options "-p" and "-d" can also be changed while the monitor is
  152. running by using the menus. You also can leave scypmon by menues or
  153. call up a helpwindow.
  154. The help-window is just a short overview over the command and no
  155. replacement for the doc-file.
  156.  
  157. The commands (in alphabetical order):
  158. --------------------------------------
  159.  
  160. All Values (in assemble/dissamble,too !) have to be entered hexadecimal (you
  161. don't have to use $xxx - only xxx) !
  162.  
  163. [ ]    : Expressions in these brackets are optional
  164. ( )    : Expressions in round brackets have to be entered
  165. start  : Is a hex-expression that indicates a start-adress
  166. stop   : Is a hex-expression that indicates an end-adress
  167. target : Is a hex-expression that indicates a target-adress
  168. name   : Is an ASCII-string
  169. segment: A memory segment between 0 and 7
  170.  
  171. When dealing with hex-adresses you can use the variables ^(a-z) in most
  172. cases.
  173. ----------------------------------------------------------------------------
  174. [?] (expression)                        : Calculate
  175.  
  176.   The expression will be calculated and printed out decimal, hexadecimal,
  177. binary and as 4-char ASCII string. Inside the expression you have to use a
  178. "$" to indicate a hex-number, a "#" or nothing to indicate a decimal number,
  179. a "%" to indicate a binary-number and max. 4 ASCII chars "<str>" or '<str>'.
  180. In addition, you can get the value of a hex-address with "&(hexaddress)",
  181. use uservariables with "^(a-z)" and the following systemvariables:
  182. ^s    = Startadress of last load
  183. ^e    = Endadress of last load
  184. ^S0-7 = Startadress of segment 0-7
  185. ^L0-7 = Length of segment 0-7
  186.  
  187.   For calculation you may use "+", "-", "*" and "/". You can also use
  188. brackets - The calculation will be done in mathematical order (first "*"
  189. and "/" then "+" and "-")
  190.  
  191. eg.: ? $1000-(#100+%010)*2
  192. ----------------------------------------------------------------------------
  193. ^(a-z)=(expression)                     : set variable
  194.  
  195.   This sets one of the 26 user-variables to the given value (compare "?")
  196. Caution: The variables ^s and ^e are used by the monitor to indicate
  197. the last start- and end-address of absolute loading.
  198.  
  199.  
  200. eg.: ^a=^a+$20-(1+4)*5
  201. ----------------------------------------------------------------------------
  202. <b (blocknr) (start) [len] [!]          : Block Load
  203. >b (blocknr) (start) [len]              : Block Save
  204.  
  205.   Loads/Saves (len) bytes from disk starting with block number (blocknr).
  206. If you don't give a [len] , $200 bytes = 1 sector will be loaded/saved.
  207. As device will be used the one fixed the with "V"-command.
  208. Attention: You have to enter all values in hex !
  209. The "!"-Option overrides the memory check, to overload memory already
  210. allocated by DOS.
  211.  
  212. eg.: <b 1a2 70000
  213. ----------------------------------------------------------------------------
  214. <t (tr) (hd) (sc) (start) [len] [!]     :Track Load
  215. >t (tr) (hd) (sc) (start) [len]         :Track Save
  216.  
  217.   Loads/Saves [len] bytes from disk starting at track, head, sector. If you
  218. don't give a [len] the default of $1400 bytes = 1 side of a track will
  219. be loaded/saved.
  220. As device will be used the one fixed the with "V"-command.
  221. Attention: You have to enter all values in hex !
  222. The "!"-Option overrides the memory check, to overload memory already
  223. allocated by DOS.
  224.  
  225.  
  226. eg.: <t 0a 01 06 70000
  227. ----------------------------------------------------------------------------
  228. a (start)                               : Assemble
  229.  
  230.   Will cause an output of a "," followed by the given adress and sets the
  231. cursors to the right tab-position to assemble. Instead of using this
  232. command you can simply dissassemble the adress and overwrite it.
  233.  
  234. eg.: a 70000
  235. ----------------------------------------------------------------------------
  236. A (segment) (start) (len)               : Allocate Absolute
  237.  
  238.   Uses AllocAbs (-204) to allocate memory and remembers the memory in the
  239. segment-list.
  240.  
  241. eg.: A 0 70000 1000
  242. ----------------------------------------------------------------------------
  243. A (segment) (len)                       : Allocate Memory
  244.  
  245.   If you don't give a alloc-adress allocmem (-198) will be used and the
  246. memory remembered in the segment-list.
  247.  
  248. eg.: A 0 1000
  249. ----------------------------------------------------------------------------
  250. b (start)                               : Boot Checksumm
  251.  
  252.   Calculates the checksum of a bootblock ($0400 bytes !) and inserts it.
  253.  
  254. eg.: b 70000
  255. ----------------------------------------------------------------------------
  256. B (stop)                                : Breakpoint
  257.  
  258.   A breakpoint will be set to the adress (stop), then the program will start
  259. according to the entered PC at the "r"-command. After execution the
  260. breakpoint will be cleared and the register will be given out.
  261.  
  262. eg.: B 70200
  263. ----------------------------------------------------------------------------
  264. c (start) (stop) (target)               : Compare
  265.  
  266. T  he memory (start) to (stop) will be compared with the (target) and all
  267. differing bytes will be reported.
  268.  
  269. eg.: c 70000 71000 72000
  270. ----------------------------------------------------------------------------
  271. C (start)                               : Calc Block CheckSumm
  272.  
  273.   Calculates the checksum of a normal diskblock and inserts it.
  274.  
  275. eg.: C 70000
  276. ----------------------------------------------------------------------------
  277. d (start) [stop]                        : Dissassemble
  278.  
  279.   The given memory will be disassembled. Before each output-line there will
  280. be printed a "," as a marker for the scroll-function and for assembling (so
  281. you can assemble when overwriting).
  282.  
  283. eg.: d 70000 70020
  284. ----------------------------------------------------------------------------
  285. D [name]                                : Directory
  286.  
  287.   If no name is given, the actual directory will be printed out, otherwise
  288. the given path will be used.
  289.  
  290. eg.: D df0:c
  291. ----------------------------------------------------------------------------
  292. DC [name]                               : Directory Change
  293.  
  294.   The actual Path will be set to [name].
  295.  
  296. eg.: DC df0:c
  297. ----------------------------------------------------------------------------
  298. e "(taskname)"                          : Examine Task
  299. e (taskadress)
  300.  
  301.   The given task is searched and will be printed with name, adress, priority,
  302. signals and stackusage (and CLI-command).
  303.  
  304. e.g.: e "Scypmon 1.4"
  305. ---------------------------------------------------------------------------
  306. f (start) (stop) (v1) [v2...] [!]       : Find
  307.  
  308.   This command searches after a expression that can be defined as a mixture
  309. out of hexnibbles, "*", or strings. When nibbles are replaced by the
  310. joker "*" then the command will find any possible matches.  If the "!" is
  311. added then it will be a not-find, that means if you search for "00 !" you
  312. will find all places where no 00 exists.
  313.  
  314. eg.: f 70000 80000 01 "hello" 0* 4a3b "xx" 00
  315. ----------------------------------------------------------------------------
  316. fd (start) (stop) (v1) [v2...] [!]      : Find and disassemble
  317.  
  318.   Like the normal find-command, but if something is found it will be dis-
  319. assembled if it stands on an even adress - then the monitor waits for any
  320. key. If you press 'ESC' you will exit find-mode, otherwise the search will
  321. be continued and if found the next line will be disassembled. If you are
  322. only interested in the arguments of a command, the necessary number of
  323. jokers ('*') has to be put in front if you want a sensible output.
  324.  
  325. eg.: fd 70000 80000 **** 00dff180
  326. ----------------------------------------------------------------------------
  327. fr (start) (stop) (target)              : Find Relative
  328.  
  329.   Searches for a word between (start) and (stop) that points relatively to
  330. (target). This word can lie between (target)-$8000 to (target)+$8000.
  331. Very useful to find branches and xxxx(pc)-adressmodes. Won't find
  332. short-branches.
  333.  
  334. eg.: fr 70000 72000 71000
  335. ----------------------------------------------------------------------------
  336. F (segment)                             : Free Memory
  337.  
  338.   The given segment will be freed by using freemem (-210) or UnLoadSeg.
  339.  
  340. eg.: F 0
  341. ----------------------------------------------------------------------------
  342. g (ziel)                                : Goto
  343.  
  344.   The program will be started at the given address under use of the at "r"
  345. defined stacks and registers and return after "rts" into the monitor.
  346.  
  347. eg.: g 70000
  348. ----------------------------------------------------------------------------
  349. h                                       : Show history
  350.  
  351.   The command-history will be displayed on the screen.
  352.  
  353. e.g.: h
  354. ----------------------------------------------------------------------------
  355. i (start) [stop]                        : ASCII Dump
  356.  
  357.   The given memory will be printed as ASCII-dump. As a marker for scrolling
  358. a ";" is used.
  359.  
  360. eg.: i 70000 70020
  361. ----------------------------------------------------------------------------
  362. l ["](name)["] (start) [!]              : Load absolute File
  363.  
  364.   The given file is loaded at the given adress. Using the "M"-command the
  365. monitor looks up how many bytes of memory are free, and loads only that
  366. many bytes. If you want to overload memory allocated by DOS you can
  367. cancel this control with "!".
  368. The start- and end-address will be saved into the variables ^s and ^e for
  369. further use, especially in batchfiles.
  370.  
  371. eg.: l "program.obj" 70000
  372. ----------------------------------------------------------------------------
  373. ld ["](name)["] (segment)               : Load Dos-File
  374.  
  375.   Load an Amiga-Dos file using the LoadSeg-Command, allocs the memory and
  376. inserts it into the segment-list.
  377.  
  378. eg.: ld "dir" 0
  379. ----------------------------------------------------------------------------
  380. m (start) [stop]                        : Memory Dump
  381.  
  382.   The given memory will be printed as a hex-dump. Each line will be marked
  383. by a ":" for scrolling and overwriting.
  384.  
  385. eg.: m 70000 70020
  386. ----------------------------------------------------------------------------
  387. M (start)                               : Show Free Memory
  388.  
  389.   Looks up how many bytes of free memory there are, starting at the given
  390. address, and print the amount.
  391.  
  392. e.g.: M 30000
  393. ----------------------------------------------------------------------------
  394. o (start) (stop) (v1) [v2...]           : Occupy
  395.  
  396.   The memory between (start) and (stop) will be filled with the given values.
  397.  
  398. eg.: o 70000 71000 01 23 45
  399. ----------------------------------------------------------------------------
  400. O [name]                                : Set Output Device
  401.  
  402.   Here you can enter the device/filename that is used with the "p"-command.
  403. If you don't give a name you will see the actual device.
  404. (Default: prt:)
  405. The outputfile will be opened at the first use of the "p"-command and
  406. closed when you leave the monitor or specify a new output-file.
  407.  
  408. e.g.: O df0:testfile
  409. ----------------------------------------------------------------------------
  410. p (any command)                         : Print using Output Device
  411.  
  412.   You can add a "p" as prefix before every command to have an output on
  413. screen and chosen output-device (eg.: printer).
  414.  
  415. eg.: pd 70000 70200
  416. ----------------------------------------------------------------------------
  417. P (start)                               : Print Text
  418.  
  419.   Prints a text in memory on the screen. The text should be ended by a $00.
  420. The output can be paused by space and stopped by CTRL.
  421.  
  422. eg.: P 70000
  423. ----------------------------------------------------------------------------
  424. r                                       : Register
  425.  
  426.   Give you all processor-registers (used at "goto" or "trace"). You can
  427. change them by overwriting.
  428.  
  429. eg.: r
  430. ----------------------------------------------------------------------------
  431. s ["](name)["] (start) (stop)           : Save absolute File
  432.  
  433.   The given memory will be saved.
  434.  
  435. eg.: s "objectcode" 70000 72000
  436. ----------------------------------------------------------------------------
  437. S [segment]                             : Segment List
  438.  
  439.   Print the data of the given segment - if it is an Amiga-Dos File you will
  440. get a list of all segments of this file.
  441. If no segment is given, you will get a general list of all 8 segments.
  442.  
  443. eg.: S 0
  444. ----------------------------------------------------------------------------
  445. t (start) (stop) (target)               : Tansfer
  446.  
  447.   The memory from (start) to (stop) will be transfered to (target).
  448.  
  449. eg.: t 70000 71000 71000
  450. ----------------------------------------------------------------------------
  451. T [start]                               : Trace
  452.  
  453.   Starting at [start] (or if not given at the defined PC) the monitor will
  454. dissassemble one command. You can start tracing now, using the following
  455. keys:
  456.         return: execute this command and show next
  457.         x:      leave the trace-mode
  458.         r:      show registers
  459.         n:      set a breakpoint on the next command and start program.
  460.                 useful to escape from "dbf"-loops.
  461.         j:      the next command will be executed, then one longword will
  462.                 be taken from the stack and a breakpoint will be set to
  463.                 the adress that is defined by the longword.
  464.                 Effect: if the actual command is a jsr/bsr the whole
  465.                 subroutine will be executed before returning to trace-
  466.                 mode. Otherwise the program will come back to trace-
  467.                 mode at the next "rts". Be careful: if something is
  468.                 taken from the stack before "rts" you will have a
  469.                 nice crash !
  470.         g:      will behave like goto (leave trace-mode)
  471.  
  472. eg.:    T 70000
  473. ----------------------------------------------------------------------------
  474. V <devicename>                          : Device
  475.  
  476.   Changes the device used with the track-commands (default: df0).
  477.  
  478. eg.: V df0
  479. ----------------------------------------------------------------------------
  480. w (start) ["](name)["]                  : Write ASCII
  481.  
  482.   The given string will be written as ASCII-code into memory.
  483.  
  484. eg.: w 70000 "hello world"
  485. ----------------------------------------------------------------------------
  486. x                                       : Exit
  487.  
  488.   Leaves Scpymon. Allocated Memory will be restored.
  489.  
  490. eg.: x
  491. ----------------------------------------------------------------------------
  492.  
  493. Jsr-Disassemble
  494. ----------------
  495.  
  496.   This option is useful to trace a program by brain. When the F1-Key is
  497. pressed the assembly-expression in the actual cursor-line will be
  498. calculated (source-part) and the actual dissassemble-adress will be
  499. pushed on a roundstack for 16 values. Afterwards, if the actual
  500. command was a jsr/jmp or branch-command, the memory at the calculated
  501. adress will be disassembled, otherwise it will be printed using the
  502. "m"-command. The jsr-disassembler knows the following expressions:
  503. $xxxx,$xxxx(pc),$xx(ax),$xx(ax,dx),$xx(ax,ax). As registers the actual
  504. defined one will be taken.
  505.   If the actual cursorposition is on a "m"-line, the next 8 digits will
  506. be taken as long adress and shown by "m"-command again.
  507. If you are on any other line, the hexadress at cursorposition will be
  508. scanned and shown by "m" (Attention: You can't use F2 to go back here!)
  509.   If you have seen enough about your subroutine/data you can press f2 to get
  510. back to your starting point.
  511.   The data will be saved on a round-stack, which means that you can
  512. press F1 as often as you want and don't have to worry about a stack overflow,
  513. but you can only take the last 16 "f1"s back with f2.
  514. If you are not happy about the mode the monitor chose while pressing
  515. f1 ("m" or "d"), you can change this by pressing shift+F1.
  516.  
  517. News since V1.5:
  518. ----------------
  519.  
  520.   Window! Sizable! Fonts! Public-Screen! More compatible! Better
  521.   Trackloading....
  522.  
  523. Final Remarks
  524. -------------
  525.  
  526.   The fact that I didn't recover bugs when testing, doesn't mean that there
  527. are no bugs at all, so if you have new ideas or find bugs, feel free to send
  528. your them to my address, including a disk and the return-postage for sending
  529. you a new version.
  530.  
  531. Jörg Bublath
  532. Holzheimerstr. 4, E07
  533. W-8390 Passau
  534. Germany
  535.  
  536. Or just contact me by email:
  537. "bublath@kirk.fmi.uni-passau.de" or
  538. "bublath@eva.fmi.uni-passau.de" or
  539. "rzbublat@ibm.rz.uni-passau.de"
  540.