home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 109 / EnigmaAmiga109CD.iso / software / sviluppo / cop / cop.doc < prev    next >
Text File  |  1999-12-20  |  141KB  |  2,847 lines

  1. $VER: COP Doc 1.23 (25.11.99) (c) THOR 
  2. *****************************************************************************
  3. **                                                                         **
  4. ** ___________                                                             **
  5. ** \        */                                                             **
  6. **  /-----------     #######     #######    ########                       **
  7. **  |    ^ |        ##      ##  ##     ##   ##     ##                      **
  8. **  |      _\       ##          ##     ##   ##     ##  Version 1.83        **
  9. **  |      |        ##          ##     ##   ########                       **
  10. **  |    --|        ##          ##     ##   ##                             **
  11. **  +-----/         ##      ##  ##     ##   ##                             **
  12. **   |   |           #######     #######    ## (c) 1993-1999 THOR-Software **
  13. **                                                                         **
  14. **                                                                         **
  15. **              A Low Level Debugger for all Amiga Systems                 **
  16. **                                                                         **
  17. *****************************************************************************
  18.  
  19.                                     by
  20.  
  21.      _______         _____  _____           __     _
  22.         /    /    / /    / /    /         \/_/    //_/_
  23.        /    /____/ /    / /____/   ___    /  ____// /        _      __
  24.       /    /    / /    / /   \           /  /|/ /  /  /   /_/ / /\_/_/
  25.      /    /    / /____/ /    /         _/__/_/ /__/|_/_/_/ /_/_/  /_
  26.                                               /                   
  27.  
  28.  
  29.  
  30. +-----------------------------------------------------------------------+
  31. |                                                                       |
  32. |       You are free to copy this program, as long as:                  |
  33. |                                                                       |
  34. | - All files in this drawer are included.                              |
  35. | - ALL COMERCIAL USE IS STRICTLY PERMITED :                            |
  36. |       DON'T SELL WITHOUT PERMISSION OF THE AUTHOR !                   |
  37. |       DON'T INCLUDE IN COMMERCIAL PRODUCTS OR ARCHIVES WITHOUT        |
  38. |       PERMISSION OF THE AUTHOR !                                      |
  39. |                                                                       |
  40. | This  program  is  provided "as is" without warranty of any kind.     |
  41. | The entire risk  of using it is to the user himself.  In no event I   |
  42. | will be liable  for  direct or indirect damage, loss of data or       |
  43. | criminal actions done due to the use of this program.                 |
  44. | If you do not agree with this, you must not use COP.                  |
  45. |                                                                       |
  46. +-----------------------------------------------------------------------+
  47.  
  48. _____________________________________________________________________________
  49.  
  50.                          The THOR-Software Licence (v2, 24th June 1998)
  51.  
  52.  
  53. This License applies to the computer programs known as "COP". The "Program", 
  54. below, refers to such program. The "Archive" refers to the the original and 
  55. unmodified package of distribution, as prepared by the author of the Program.
  56.  
  57.  
  58. The Program and the data in the archive are freely distributable
  59. under the restrictions stated below, but are also Copyright (c)
  60. Thomas Richter.
  61. Distribution of the Program, the Archive and the data in the Archive by a
  62. commercial organization without written permission from the author to any
  63. third party is prohibited if any payment is made in connection with such
  64. distribution, whether directly (as in payment for a copy of the Program) or
  65. indirectly (as in payment for some service related to the Program, or
  66. payment for some product or service that includes a copy of the Program
  67. "without charge"; these are only examples, and not an exhaustive enumeration
  68. of prohibited activities).
  69.  
  70.  
  71. However, the following methods of distribution involving payment shall not 
  72. in and of themselves be a violation of this restriction:
  73.  
  74.  
  75. (i) Posting the Program on a public access information storage and
  76. retrieval service for which a fee is received for retrieving information
  77. (such as an on-line service), provided that the fee is not
  78. content-dependent (i.e., the fee would be the same for retrieving the same
  79. volume of information consisting of random data).
  80.  
  81.  
  82. (ii) Distributing the Program on a CD-ROM, provided that
  83.  
  84. a) the Archive is reproduced entirely and verbatim on such CD-ROM, including
  85. especially this licence agreement;
  86.  
  87. b) the CD-ROM is made available to the public for a nominal fee only,
  88.  
  89. c) a copy of the CD is made available to the author for free except for
  90. shipment costs, and
  91.  
  92. d) provided further that all information on such CD-ROM is redistributable
  93. for non-commercial purposes without charge.
  94.  
  95.  
  96. Redistribution of a modified version of the Archive, the Program or the
  97. contents of the Archive is prohibited in any way, by any organization,
  98. regardless whether commercial or non-commercial. Everything must be kept
  99. together, in original and unmodified form.
  100.  
  101.  
  102.  
  103.  
  104. Limitations.
  105.  
  106.  
  107. THE PROGRAM IS PROVIDED TO YOU "AS IS", WITHOUT WARRANTY. THERE IS NO
  108. WARRANTY FOR THE PROGRAM, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
  109. LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
  110. PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE ENTIRE
  111. RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD
  112. THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY
  113. SERVICING, REPAIR OR CORRECTION.
  114.  
  115.  
  116. IF YOU DO NOT ACCEPT THIS LICENCE, YOU MUST DELETE THE PROGRAM, THE ARCHIVE
  117. AND ALL DATA OF THESE ARCHIVE FROM YOUR STORAGE SYSTEM. YOU ACCEPT THIS
  118. LICENCE BY USING OR REDISTRIBUTING THE PROGRAM.
  119.  
  120.  
  121.                                                         Thomas Richter
  122.  
  123. _____________________________________________________________________________
  124.  
  125.  
  126. I) Who should use COP ?
  127. ------------------------
  128.  
  129. - If you prefer working with the workbench or if you write programs in
  130.   pascal or (ARGH) basic, if you do not know how to use an assembler 
  131.   or are not familiar with bits and bytes, if you hate command interpreters 
  132.   and like funny gadgets and colorful menus, if you do not know the ASCII
  133.   character codes by heart :
  134.   
  135.   **======================================================**
  136.   || FORGET IT ! STOP NOW ! YOU WON'T BE HAPPY WITH COP ! ||
  137.   **======================================================**  
  138.  
  139.   To make it short: COP is intended to be used by REAL MEN ! (-;
  140.   (or WOMEN...)
  141.  
  142.         (Suggested: "Real men don't eat quiche" available on
  143.          in good networks...)
  144.   
  145. II) COP Features
  146. ----------------
  147.  
  148. Let's start with the bad ones:
  149.  
  150.         o)      it looks like an old-time debugger and feels like one, too
  151.         o)      there's no graphic user interface
  152.         o)      it's based on a command interpreter
  153.         o)      it's hard to learn
  154.         o)      it should support almost all MC68xxx, although I
  155.                 haven't tested it
  156.         o)      some features are available only with additional
  157.                 hardware, e.g. a MC68010 or higher or an external
  158.                 terminal
  159.         o)      some commands are available only with the 2.0 roms or better
  160.         o)      the build-in terminal emulation isn't a fast one
  161.                 and uses non-standard command sequences
  162.         o)      it does not handle fragmented memory models in a
  163.                 good way, although it's getting better
  164.         o)      there is no trackdisk or harddisk support and there
  165.                 never will be
  166.         o)      it does not use task switching, but busy-waits
  167.                 (ARGHH!)
  168.                 
  169.         Some of the points WILL change in the future, I promise...
  170.  
  171.                 
  172. ...and now the good ones:
  173.         o)      it does support all members of the MC68000-family,
  174.                 at least it should...
  175.                 (MC680000 thru MC68060 including FPUs, and MMUs)
  176.         o)      it supports the MMU partially.
  177.         o)      it provides a break key that can be assigned to
  178.                 any (well, almost any) key on the keyboard
  179.                 and that breaks almost everthing everytime.
  180.         o)      it uses hardware resources as less as possible
  181.                 (e.g. no blitter acesses, no copper on request)
  182.         o)      COP can be used to remote-debug a system over a
  183.                 serial connection, leaving the display and keyboard
  184.                 hardware to other programs
  185.         o)      COP catches almost all system crashes ("GURUs")
  186.         o)      COP can be used to debug almost all code, even 
  187.                 interrupts are NO problem (is there a second
  188.                 debugger that can ?)
  189.         o)      it can be made resident to debug startup code
  190.         o)      it supports symbols in its own language and
  191.                 the symbols in object modules. Source level
  192.                 debugging, however, is not supported.
  193.         o)      it has a funny documentation in broken english
  194.                 (speak you english ?)
  195.         o)      this new release supports printers, connected either to
  196.                 the parallel port of your Amiga or to an external terminal,
  197.                 provided it supports the new COP 5 terminal standard
  198.                 (see terminal.doc in this archive for more information)
  199.         o)      it can be loaded to a memory position of your choice,
  200.                 although the arguments are a bit tricky 
  201.         o)      it's free, at least this release...
  202.         o)      it steps thru everything, even interrupt code and
  203.                 supervisor programs. YES, exec's task scheduler is
  204.                 NO PROBLEM AT ALL.
  205.         o)      it can be used as a shell calculator and
  206.                 as a label database.
  207.         o)      it supports symbols in standard overlay segments
  208.                 (which other debugger does ?)
  209.         o)      it supports debugging of CLI/WB progs in C and BCPL
  210.                 thru a simplified interface
  211.         o)      it works in really almost all situations, even
  212.                 with execbase broken...
  213.         o)      it supports the ShapeShifter 
  214.         o)      it is compatible to the Enforcer and SegTracker if used 
  215.                 with a MC68020 or MC68030, and to "MuForce" for all
  216.                 processors. It might be compatible to Cyberguard, even
  217.                 though I won't recommend this program.
  218.         o)      supports the "Picasso96" graphics system. It's currently in the 
  219.                 "works fine for me" state, feedback welcome.
  220.  
  221.  
  222.         ...and if I say "almost all" I mean: more than any other
  223.         debugger can, but I am honest: There are situations where
  224.         COP CAN crash, but they are VERY rare.        
  225.  
  226.  
  227. III) Before you start, you need to provide...
  228. -----------------------------------------------------------------------------
  229. (or, in other words: NOT included in this package...)
  230.  
  231. - a lot of good will and your brain. COP is not easy to use...
  232. - this manual. Or to make it clear : READ THIS FIRST BEFORE YOU
  233.   START PLAYING WITH COP. There's a good chance you'll crash your
  234.   system.
  235. - an amiga computer with at least 512K. The more memory, the better.
  236. - If you want that magic break feature : A processor MC68010 or
  237.   higher would be fine. The break key does not work in all situations
  238.   with the standard MC68000.
  239. - If you need all commands (e.g. task capture and task freeze), you need
  240.   commodore's 2.0 roms or better.
  241. - If the program to debug requires the display subsystem, you need at least
  242.   an external serial tty terminal - this is the recommended way to debug
  243.   programs anyways.
  244. - If you want a fancier and better user interface, the external terminal
  245.   should understand type-3 terminal commands or better. Cause this is
  246.   a private format, there are not many... :-)
  247.   You may write your own terminal, or use the one supplied in this
  248.   package, see "terminal.doc".
  249. - If you need printer output, you need either a printer connected to the
  250.   parallel port of your Amiga or a printer connected to an external type-5
  251.   terminal or tty-terminal with printer-support. Any printer will do, COP
  252.   outputs only plain 7-bit ASCII.
  253.   Use the following configuration for your printer:
  254.         
  255.         o) data input from parallel interface
  256.         o) Auto-LF on, CR disabled (Auto-CR does not care)
  257.  
  258.   This is, however, the most common setting, so just try. The normal setting
  259.   will work in most situations without any change.
  260.  
  261.   If you MUST use the Amiga parallel port, use the command line switch
  262.   BUILDINPRT or the IOCD.Q command to disable external printing.
  263.  
  264.   The current version of COP is not able to debug a program via the parallel
  265.   port, though. It's exclusively reserved for printer output. If your program
  266.   requires the serial port, use the build-in terminal emulation.
  267.    
  268.  
  269. IV) Installing COP in your system
  270. -----------------------------------------------------------------------------
  271.  
  272. If you want to remote-debug your system: connect an external ASCII-terminal
  273. to the serial plug. Set the external terminal to the following parameters:
  274.  
  275. 9600 baud, 8 bit, 1 stop bit, no parity,
  276. no auto LF, no auto CR, non-erasing BS
  277.  
  278. If your external terminal supports printers, connect the printer to THIS
  279. terminal, not to the Amiga; if not, connect the printer to the parallel port
  280. of the Amiga and use the IOCD.Q command or the command line option 
  281. BUILDINPRT to tell COP to use the build-in printer-routines.
  282.  
  283. Copy the COP file to the C:-drawer of your system disk and, if you like to
  284. start COP from the workbench, copy the COP-icon anywhere you want (this is
  285. not required, only a nice feature ).
  286.  
  287. Copy the shell scripts "Debug","WBDebug" and "Calc" to the S: drawer,
  288. put this file in a save place wherever you want.
  289.  
  290. If you have commodore's V40 includes, copy the default data description
  291. table "Startup.DDT" to S:. You might want to modify it a bit, for example
  292. to correct the paths. This file currently expects the FD files in a
  293. device FD:, and the includes in INCLUDE:
  294.  
  295. If you want to run COP with the shapeshifter, copy the file "Mac.DDT" to
  296. S:, too.
  297.  
  298. Insert in your startup-sequence DIRECTLY FOLLOWING to the "SetPatch"-command
  299. (this is the second line for most systems) a command like the following:
  300.  
  301. COP keymap usa display resident ddt s:startup.ddt pre s:startup.pre
  302.  
  303. If you own a 040 or 060 based system, you should specify the "NOMMU" and
  304. "NOEMU" options as well.
  305.  
  306. What does this mean:
  307. -The build-in terminal uses the keymap "usa". If you prefer a different
  308.  keymap, change "usa" to your favourite keymap - it must be present in
  309.  the DEVS:keymaps drawer of your system.
  310.  YOU CAN'T CHANGE THAT KEYMAP WITH A "SETMAP" or "SETKEYBOARD" or the 
  311.  PREFERENCE PROGRAM LATER !
  312.  COP OPERATES INDEPENDED FROM THE REMAINDING SYSTEM !
  313.  
  314. -The "display" command tells COP to use the build-in terminal instead of an
  315.  external one. You can debug programs with the amiga keyboard on the amiga
  316.  monitor. If you want to remote-debug, use "serial" instead. If you've got
  317.  an external tty, I would suggest to do so.
  318.  
  319. -The "resident" keyword tells COP to stay resident even after reset. If
  320.  you do not need this feature: drop this argument. Loading COP as resident
  321.  program has the advantage that you can debug boot code.
  322.  
  323. -The "ddt" keyword loads the standard labels placed in the ddt-file and
  324.  commodore's include files into COP. If you don't have them:
  325.  Never mind, just delete the the last two arguments.
  326.  
  327. -The "pre" keyword instructs COP to build a pre-compiled image of the "ddt"
  328. file on first startup - they are faster to load and speed up booting. If
  329. you're low on disk space, drop this argument.
  330.  
  331. -The "nommu" keyword for 040 and 060 systems tell COP not to touch the MMU
  332. unnecessary. The MMU is required for these systems to guarantee reliable
  333. DMA access.
  334.  
  335. - The "noemu" keyword avoids catching of emulator traps for unimplemented
  336. 040 and 060 FPU instructions.
  337.  
  338. More about the command argument line later... (chapter XI)
  339.  
  340. You should also start the workbench with the "-debug" option to have COP
  341. ready in all situations.
  342.  
  343. For professional debugging, you should also install "MuForce" by the
  344. same author, and "SegTracker" and "MungWall", all by Michael Sinz. "MuForce" 
  345. is supported by COP, bus errors are routed thru COP, though. The "SegTracker"
  346. is used by COP to find the segment/offset information of a crashed program.
  347.  
  348. Save the modified startup-sequence and reboot your system. Not much to
  349. see? O.K., that's normal. COP is NOT a standard debugger and is only
  350. INSTALLED by the command line, but not STARTED.
  351.  
  352.  
  353.  
  354. V) How to start COP
  355. -----------------------------------------------------------------------------
  356.  
  357. There are many ways to begin a debug session with COP:
  358. -Double-click the COP-Icon, if you copied it to your system.
  359. -Enter in the shell the command:
  360.  
  361.         COP go
  362.  
  363. -Select the "ROMWack" (or "Debug") menu of the workbench. COP replaces
  364.  the old wack completly, if there was one installed in your ROM.
  365.  (Commodore removed the old ROM-Wack from the 3.1 Roms and replaced it
  366.  with the "SAD" debugger.)
  367. -Press the BREAK-key. In the build-in terminal - if you gave the
  368.  "display" argument above - this is the decimal dot of the numeric key-
  369.  pad. On external terminals, it's ESC. However, you may change that key
  370.  with an additional argument, see chapter XI.
  371. -Use the shell-scripts "Debug" and "WBDebug" to load programs,
  372.  symbols and start a debug session like with every other debugger.
  373.  Up to eight arguments are allowed here as CLI arguments, resp. one as
  374.  an extended selection icon "shift-selected" with the main icon.
  375. -The least pleasant way : Your system crashes and COP is entered auto-
  376.  matically. There are NO GURUs any longer, COP catches them all !
  377.  (Well, almost all... A special DOS crash isn't routed thru the standard
  378.   system requesters and can't be captured by COP - sigh.)
  379.  If you supply a data description file (see below), you even get the
  380.  guru codes in a readable language. If you installed "SegTracker", too, 
  381.  COP will also present the name, the segment number and the segment offset
  382.  of the code that crashed.
  383.  
  384.  
  385. VI) How to leave COP
  386. -----------------------------------------------------------------------------
  387.  
  388. Enter GOPG in the COP command line and press RETURN. This should start
  389. the program interrupted.
  390. If you entered COP by a guru, you should first debug the system or will
  391. get just another guru in mostly all cases. There's no good strategy to
  392. accomplish this task....
  393.  
  394. You may also start the old ROMWack from inside COP with the EXIT command.
  395. Starting with ROM versions 3.0, the system debugger has changed to the
  396. (more primitive ? different ?) SAD.
  397. See the autodocs how to use this thing...
  398.  
  399.  
  400. VII) A word about COP-terminals
  401. -----------------------------------------------------------------------------
  402.  
  403. You will normally use COP's build-in terminal to debug code, but this
  404. terminal will, of course, need some of the hardware systems - the display
  405. system, i.e. the copper and the display DMA channels (not the blitter),
  406. and the keyboard, also the parallel port if you want to print.
  407. I tried to implement the terminal as best as possible, but this may
  408. conflict with other programs which want to use the same hardware resources.
  409. For this reason COP can also be used to debug a system via the serial port.
  410. All you need - for the minimum configuration - is an external
  411. ASCII-terminal,e.g. a second amiga with a standard terminal program will
  412. do it.
  413.  
  414. In this case, choose the following transfer options:
  415.  
  416. 9600 baud, 8 bit, 1 stop bit, no parity
  417.  
  418. no auto CR, no auto LF, nonerasing BS
  419.  
  420.  
  421. However, things are much easier if you use a terminal program providing
  422. COP's private terminal formats, here called "type-3" or better terminals.
  423. The terminal transfer standard is documented in the "Terminal.doc" file
  424. in this drawer, if you want to write your own program. There are only
  425. two ready made programs supporting this standard:
  426.  
  427. -THOR's "Terminal" program for all Amigas provides a type-4 terminal
  428.  emulation and is included in this drawer.
  429.  
  430.  Enable the "COP Terminal Emulation" from the menu Settings/Protocol.
  431.  You also need to supply a null-modem connector, but you should know
  432.  how to build one...
  433.  
  434. -THOR's "DASB" terminal is a full type-5 terminal, working on
  435.  Atari 800XL computers with a serial interface box. It's included
  436.  in the package.
  437.  There are no settings to be made, DASB is written exclusively to communicate
  438.  with COP, but does not support a printer. This drawback arises from the
  439.  Atari XL hardware.
  440.  
  441. If you want to write a COP terminal on your own (e.g for a C64) you
  442. are welcome! Please send me an email in this case (address below).
  443.  
  444. The build-in terminal for non-remove debugging is of course a full
  445. type-5 terminal.
  446.  
  447.  
  448. Here a word about the keyboard processor of the build-in terminal:
  449.  
  450. I tried to write a keyboard parser not conflicting with other
  451. applications, i.e. it does not read the IRQ-registers of the CIA-
  452. chips and is able to work even with all interrupts disabled. However,
  453. there are "some" drawbacks of this magic stuff : Sometimes a key
  454. may "leak thru" the keyboard parser to other applications. Because
  455. the corresponding key-up event is missing, the keyboard device will
  456. then activate the auto-repeat loop and generate a stream of key-events.
  457. If this happens, leave COP and press the repeating key to stop it.
  458. Even worse, you won't recognise this bug if the affected key is a 
  459. control key like "Ctrl" or "Shift". If, after leaving COP, the key-
  460. board seems to be out of order, try pressing all this keys first to
  461. send their key-up events. I tried hard to fix this bug, but it looks
  462. like there's no better way to write a magic keyboard parser. If you
  463. want to use COP the professional way, you should work with an external
  464. terminal anyhow.
  465.  
  466.  
  467. VIII) How to enter commands, the line editor
  468. -----------------------------------------------------------------------------
  469.  
  470. Once you've entered COP, it presents you the prompt "COP >" and is ready
  471. to accept debug commands. Below the special keys used for line editing:
  472.  
  473. -The backspace key erases the last character entered and moves the
  474.  cursor backwards one line ("Delete" on some terminal). On some terminals,
  475.  Ctrl-H must be used as a substitution.
  476. -The delete key ("rub-out" on some terminals, Ctrl-Backspace with
  477.  DASB, not available on all terminals) deletes the character under the
  478.  cursor and scrolls the rest of the line backwards.
  479. -The return key starts the execution of the command ("Enter" on some
  480.  keyboards)
  481. -Ctrl-C aborts the execution of a command.
  482. -Ctrl-U re-displays the last command entered - there's only a two-line
  483.  history for commands, identical and empty lines will not enter the history.
  484. -The decimal dot on the numeric keypad (for the build-in terminal) or
  485.  the ESC-key on external terminals stops execution of code and enters
  486.  COP. However, this break feature wouldn't work if all interrupts are
  487.  disabled or, if you use the MC68000, the interrupt vectors are messed
  488.  up.
  489. -The cursor-forward-key moves the cursor forward one character (only
  490.  type-3 or higher terminals)
  491. -The cursor-backward-key moves the cursor backwards one character
  492.  (only type-3 and better)
  493. -The cursor-up key moves the cursor to the begin of the line (type-3
  494.  and better only)
  495.  As a replacement, Ctrl-A can be used for this task with TTY-terminals.
  496. -The cursor-down key moves the cursor to the end of the line (type-3
  497.  and better only)
  498.  A replacement for this key is Ctrl-E.
  499. -The Alt-Del key or Ctrl-Clear (with DASB) erases the whole line 
  500.  (type-3 only). This feature is available with Ctrl-B on all ASCII
  501.  terminals.
  502. -The TAB-key has a special meaning while entering data sequences and
  503.  is described below.
  504.  
  505.  
  506. IX) The COP commands and expressions
  507. -----------------------------------------------------------------------------
  508.  
  509. Each COP command looks like the following:
  510.  
  511. - a semicolon ";" followed by a comment, or 
  512.  
  513. - a four character command base name or a one character short-cut
  514. - optionally a dot and an extension that determinates a specific
  515.   sub-command of a larger command class
  516. - optional arguments each separated by space(s)
  517. - optionally a semicolon followed by a comment
  518.  
  519. ALL numbers accepted by COP MUST BE GIVEN IN HEXADECIMAL, all arguments
  520. may contain simple calculations with numerical operators. This will be
  521. called an EXPRESSION in the following, abbreviated with <expr>.
  522. Here all supported operators, listed by their priority from low to high
  523. (higher priorities are evaluated FIRST, please note that the priorities
  524.  differ from C - in special the shift operators):
  525.  
  526. $               trap operator
  527.                 a$b returns a if b is faulty, else a.
  528.                 NOTE: You cannot enclose $ in brackets, so expressions like
  529.                 (2$a+b)-3 are ILLEGAL !
  530.                 The reason for this is that COP can't continue to evaluate
  531.                 expressions with illegal syntax that will be trapped by $
  532.  
  533. ?,:             C-style condition operator:
  534.                 a?b:c returns b if a is not equal, else c
  535.  
  536. =,<>            equal, not equal: returns -1 if expressions to the
  537.                 right and left are equal (resp. not equal) or 0 otherwise.
  538.  
  539. >,>=,<,<=       signed greater, greater equal, smaller, smaller equal.
  540.                 Returns -1 if the condition is true.
  541.  
  542. |               binary or
  543. !               binary or
  544. ^               binary exclusive or (XOR)
  545. &               binary and
  546.  
  547. +,-             addition, subtraction
  548.  
  549. >>,<<           shift left or right. The left expression is shifted
  550.                 times the right expression
  551.                 
  552. *,/,%           multiplication, integer division, modulo
  553.  
  554. [..]            indirect operator: the value is the (long) content of
  555.                 the address specified by the expression between the
  556.                 braces, e.g. [4] is ExecBase.
  557. [..].l          same as [..]
  558. [..].w          indirect operator, returns the (sign extended) value of 
  559.                 the word at the address in braces
  560. [..].b          indirect operator, returns the (sign extended) value of
  561.                 the byte at the given address
  562. [..].o          the operator size is determinated by the instruction under
  563.                 the program counter.
  564.  
  565.                 NOTE: There is a slight difference if you read a word or a
  566.                 long from an even or odd address. Reading from an even
  567.                 address is only ONE memory access, but reading from an odd
  568.                 one are TWO or FOUR accesses. While not a problem to normal
  569.                 memory, this is a difference for hardware registers !
  570.  
  571. (..)            normal brackets: expression in the brackets is
  572.                 evaluated first
  573. -               unary minus, i.e. change of sign
  574. ~               unary not
  575. >               unary greater. This symbol contains the last address
  576.                 affected by COP and is called the "here" address pointer.
  577.                 It is affected by almost all commands and can be used
  578.                 for saying the new command should "work on the same
  579.                 address" as the last one.
  580. *               unary star. This symbol contains the program counter of
  581.                 the CPU and is equivalent to ".pc"
  582. .b,.w,.l,.o     Sign extension operators. Will interpret the preceding ex-
  583.                 pression as byte, word or long and sign-extend it.
  584.                 So $ff.b is -1, but $ff.w is $000000ff.
  585.                 The .o is again the sign-extension to the operator size
  586.                 of the instruction under the PC.
  587.                 There is a small, but noticable difference between
  588.                 [adr].b and ([adr]).b ! The first will read only ONE BYTE
  589.                 from memory, the later FOUR BYTES but throwing away three
  590.                 of them. This DOES make a difference if you read a
  591.                 hardware-register !
  592. .reg
  593.  or
  594. 'reg            The content of the CPU register .reg
  595. or              Valid registers are .d0 to .d7 for CPU data registers,
  596. reg             .a0 to .a7 for address registers - note that the
  597.                 meaning of .a7 changes with the supervisor bit -
  598.                 .ssp and .usp for the two stack pointers 
  599.                 .pc (same as *) for program counter and .sr for the
  600.                 status register (there is NO .ccr, use proper masking). 
  601.                 Also, there are 16 COP internal counter registers
  602.                 .c0 to .cf. They are incremented each time they are
  603.                 read and can be used to implement counter breakpoints.
  604.                 For some commands .fp0 to .fp7 are valid and address
  605.                 the eight FPU registers, if a FPU is installed and
  606.                 used by the program debugged.
  607.                 All other CPU/MMU/FPU registers are available in the same
  608.                 way, with one tiny exception for the MMU "root pointer"
  609.                 registers. These two registers are 64 bit wide for the
  610.                 68020/68851 and 68030 CPU/MMU and only the lowest long word
  611.                 containing the base address of the MMU table is read.
  612.                 If any of the MMU root pointers are written to, the high
  613.                 long word is set to $80000002, i.e. to setup a short 
  614.                 descriptor MMU table. This is the standard way how the MMU
  615.                 is used and I haven't seen any program that uses MMU
  616.                 tables with long descriptors.
  617. .sr,.se,.so
  618. .dr,.de,.do
  619.                 These pseudo registers refer to the source and
  620.                 destination effective address of the command under
  621.                 the program counter.
  622.  
  623.                 .sr     is the contents of the source register under
  624.                         the PC, if available
  625.                 .se     is the effective address of the source operand,
  626.                         if available
  627.                 .so     is either the content of the source register or
  628.                         the CONTENT of the effective source address 
  629.                 .dr,.de,.do
  630.                         Same for destination effective address
  631.                 You may alter all these registers to effect the source 
  632.                 or destination operand of an instruction. Although not
  633.                 causing an error, changing .se and .de does nothing
  634.                 usefull.
  635.  
  636.                 (Note: This feature is not yet implemented).
  637.  
  638.                 Additional, all supervisor registers of the 680x0 series
  639.                 can be viewed, as long as your CPU does support them,
  640.                 and will be written back as well as soon as you restart
  641.                 the program. However, read the special caveats about the
  642.                 MMU root pointers above. (Except that you shouldn't mess
  643.                 with the MMU anyways except you're perfectly sure what
  644.                 you're doing.)
  645.  
  646.                 A new special register .vvbr has been introduced 
  647.                 in release 1.32:
  648.  
  649.                 The .vbr register refers always to the VBR of the CPU,
  650.                 but since COP needs this register to operate properly,
  651.                 you should not change VBR this way. Whenever possible,
  652.                 check the value of VBR, and if it has changed, write
  653.                 the new value not to VBR. Use the VVBR instead, and 
  654.                 restore VBR to the value of the label COPVBR. COP will 
  655.                 then filter out its own exceptions and pass the unused 
  656.                 back to the system thru VVBR as if the VBR has been set. 
  657.  
  658.                 The change of VBR will now be detected by COP if the
  659.                 interupt check (ENVI.I) is turned on, and the VBR register
  660.                 can be restored by SETR.V. The autovector table can be
  661.                 rebuild automatically using the IRQ-copyback mode, enabled
  662.                 with the ENVI.C command.
  663.                 
  664. \character      The ASCII-code of the character following
  665.  
  666. $               Unary $. The number following is given in hexadecimal
  667.                 AS THIS IS THE DEFAULT, THIS SYMBOL DOES NOTHING
  668.  
  669. #               The number following is given in decimal, i.e.
  670.                 #16=$10=10
  671.  
  672. %               The next number is a binary number, i.e.
  673.                 %1000=$4=#4=4
  674.  
  675. label           A known label will be evaluated. By default there are
  676.                 only four labels:
  677.  
  678.                 AbsExecBase     will contain the value 4, thus is
  679.                                 pointing to the pointer of the system
  680.                                 library.
  681.                 Version         Will contain the version of COP as
  682.                                 Version<<16+Revision
  683.                 COPVBR          will contain the interal vector base
  684.                                 setup by COP. VBR should contain this
  685.                                 value.
  686.                                 DO NOT ALTER COP's vector base, use
  687.                                 VVBR instead.
  688.                 COPVVBR         will contain the default position of
  689.                                 COPs virtual vector base.
  690.  
  691.         Some read-only expressions follow:
  692.         (Not starting with a dot -> Not a (pseudo) register -> not alter-
  693.          able !)
  694.  
  695. l0              Left button of mouse or fire on joysticks connected to
  696.                 port 0, returns 0 if released or -1 if pressed
  697. l1              same for port 1
  698.                 l0 and l1 might be quite useful as conditions in
  699.                 breakpoints
  700. r0,r1           Right button of mouse in port 0 or 1
  701. m0,m1           Middle button of mouse in port 0 or 1
  702.         WARNING ! Some hardware limitation cause that it takes max.
  703.         20 msecs to read r0,r1,m0,m1. This COULD be made somewhat faster,
  704.         but nevertheless r0,r1,m0,m1 ARE NOT FAST ENOUGH TO BE USED IN
  705.         CONDITIONED BREAKPOINTS.
  706.         Reading them causes also the POTGO-hardware register to be trashed.
  707.         There is no way to save this register back, although
  708.         there is a POTGO-read register - this is a hardware limitation.
  709.  
  710. su,sr           Information about addressing mode under the PC. su and du are
  711. du,dr           TRUE if the source resp. destination operator of the actual
  712.                 instruction is used, sr and dr return TRUE if it is a register
  713.                 and FALSE if it is in memory.
  714.                 (This is actually not yet implemented)
  715.  
  716. op              Data type of the instruction under the PC, returns
  717.                 0 for byte, 1 for word or 2 for long, so 1<<op is the
  718.                 size in bytes of the operator.
  719.                 (This is actually not yet implemented)
  720.  
  721.  
  722. X) List of all commands
  723. -----------------------------------------------------------------------------
  724.  
  725. Long command    Short command   possible extensions     arguments
  726.  
  727. HELP            ?               none                    none
  728.                 prints all COP commands to the active terminal
  729.                 
  730. EXIT            X               none                    none
  731.                 If execbase valid, COP is terminated and the
  732.                 ROMWack is entered. Note that ROMWack works ONLY
  733.                 with an external terminal (if there is one... it
  734.                 has been removed from the 3.1 - V40 roms).
  735.                 
  736. REGS            R               G,E,C,A                 none
  737.                 Register dump commands
  738.                 
  739.                 Without extension:      Dumps all common CPU
  740.                 registers to the screen, dumps fpu registers
  741.                 if FPU is available and in use.
  742.                 
  743.                 REGS.G                  Dumps the guru number
  744.                 and the address that generated the crash. If COP
  745.                 was entered the normal way, the guru number will 
  746.                 be zero.
  747.                 If a data description table was loaded and 
  748.                 gurus were defined, the full name of the
  749.                 guru will be printed.
  750.                 If the "SegTracker" is available, COP will print the
  751.                 name of the crashing program and the segment/offset
  752.                 location of the PC within this program.
  753.                 
  754.                 REGS.E                  Dumps special purpose 
  755.                 registers of newer members of the MC68000 family as
  756.                 cache-control and MMU-registers. FPU registers will
  757.                 be included if the FPU is available and in use.
  758.                 
  759.                 REGS.C                  Dumps the COP-internal
  760.                 counter registers (without being incremented)
  761.  
  762.                 REGS.A                  Dumps effective address
  763.                 of instruction under PC and memory contents, if
  764.                 available.
  765.  
  766. DUMP            D               B,W,L,C,S,G,H,I,Q,Z,D,X,P,O     <expr>
  767.                 Dump memory. If <expr> is omitted, then the "here"
  768.                 pointer is used as address, otherwise change "here"
  769.                 to the given <expr>.
  770.                 
  771.                 without extension       Dump memory in the last mode
  772.                 used
  773.                 
  774.                 DUMP.B                  dump memory as bytes
  775.                 DUMP.W                  dump memory as words
  776.                 DUMP.L                  dump memory as longs
  777.                 DUMP.G                  dump a sequence of hardware
  778.                                         bytes. The memory manager gets
  779.                                         overridden by mode.
  780.                                         ! This might be somewhat danger-
  781.                                           ous, if you read some toggle
  782.                                           registers !
  783.                 DUMP.H                  dump hardware word
  784.                 DUMP.I                  dump hardware long
  785.                 DUMP.Q                  dump as quad word (=8 bytes)
  786.                 DUMP.Z                  dump as single precision
  787.                                         IEEE-numbers. 
  788.                 DUMP.D                  dump as IEEE double precision
  789.                 DUMP.X                  dump as MC68881 extended precision
  790.                 DUMP.P                  dump as MC68881 packed decimal
  791.                 DUMP.O                  dump memory as size of instruction
  792.                                         under PC
  793.                 
  794.                 DUMP.C                  Dump memory as characters.
  795.                 All unprintable characters are transcribed with a
  796.                 backslash and the numerical hex value followed.
  797.                 
  798.                 DUMP.S                  Dump memory as strings.
  799.                 All unprintable characters are displayed as a dot.
  800.                 
  801.  
  802.                 After dumping a few lines, COP stops and asks you
  803.                 to press RETURN or SPACE to continue. You may press
  804.                 here Q or Ctrl-C to abort dumping.
  805.                                 
  806.                                 
  807. EDIT            E               B,W,L,C,G,H,I,Z,D,X,P,O         <expr>
  808.                 Edit memory or hardware. If <expr> is omitted, then
  809.                 edit the address given by the "here" pointer. Else
  810.                 use the <expr> as address and save it to "here".
  811.                 
  812.                 In the edit mode, COP presents you the old contents
  813.                 of the address given. This value is now ready to be
  814.                 changed with the edit keys (see the last chapter).
  815.                 Press RETURN to accept the changes made or press TAB
  816.                 to undo the changes. Press Ctrl-C to abort editing.
  817.  
  818.                 BE WARNED! The string "d0" means "contents of register
  819.                 d0" not the value "d0", like everywhere in COP. To enter
  820.                 the value "d0", you've to type "$d0". Quite for the same
  821.                 reason we've "cf" as "contents of counter #f, increment it
  822.                 when read" and not "the number $cf". The later is "$cf".
  823.         
  824.         
  825.                 Without extension       use the last edit mode used     
  826.                 EDIT.B                  edit memory as bytes
  827.                 EDIT.W                  edit memory as words
  828.                 EDIT.L                  edit memory as longwords
  829.                 EDIT.Z                  edit as IEEE single precision
  830.                 EDIT.D                  edit as IEEE double precision
  831.                 EDIT.X                  edit as MC68881 extended precision
  832.                 EDIT.P                  edit as MC68881 packed decimal  
  833.                 EDIT.O                  edit memory as size of instruction
  834.                                         under PC
  835.                 
  836.                 EDIT.G                  set hardware as bytes
  837.                 EDIT.H                  set hardware as words
  838.                 EDIT.I                  set hardware as longwords
  839.                 
  840.                 The difference between the first group and the second
  841.                 is that the hardware edit commands do NOT read the
  842.                 hardware registers prior to the user change. Instead,
  843.                 a zero gets displayed. Node that this is necessary because 
  844.                 some hardware registers are WRITE ONLY.
  845.                 In all the modes presented above, you may enter a full
  846.                 <expr> as well as a numeric constant as a new value, 
  847.                 although the length of the <expr> is limited.
  848.  
  849.                 EDIT.C                  edit memory as characters
  850.                 
  851.                 Here, you may edit the memory as ASCII-characters. You
  852.                 may use the backslash followed by a hex number to enter
  853.                 values not available on the keyboard.
  854.                 
  855. EVAL            =               none                    <expr>
  856.                 Evaluate the expression given and print the result.
  857.                 The result might be a simple number, but very complex
  858.                 expressions including labels are valid, too.
  859.                 
  860. UNAS            =               none                    <expr>
  861.                 Unassemble code starting with address <expr> and set
  862.                 "here" to this value. If <expr> is missing, disassemble
  863.                 at address contained in "here".
  864.                 
  865.                 The disassembler knows the obcodes of all members of the
  866.                 Motorola MC68000 family, but the non-MC68000 codes are
  867.                 marked. FPU obcodes are disassembled as well, and numerical
  868.                 constants will be disassembled as decimal floating point
  869.                 expressions.
  870.                 Illegal opcodes or opcodes that can't be used on the Amiga
  871.                 (like the TAS instruction) get marked as well.
  872.  
  873.                 Depending on your enviroment settings - see the ENVI comand
  874.                 - some of the addresses will be expanded to known labels.
  875.                 
  876.                 NOTE: I was unable to test the correct disassembly of the
  877.                 MMU and MC68040 codes, although it SHOULD work.
  878.                 
  879.                 If the address being disassembled is the PC, this line
  880.                 is marked with an asterisk *; if it's the "here" pointer,
  881.                 the line is marked with ">".
  882.                 If the address is affected by a break point, a "B" is 
  883.                 inserted.
  884.                 
  885. NODE            N               L                        <expr>
  886.                 Display the node at address <expr>. If <expr> is not
  887.                 present, use the "here" pointer, otherwise set "here" 
  888.                 to the address of the node.
  889.                 
  890.                 No extensions        The name of the node and its type 
  891.                 is displayed.
  892.  
  893.                 L            Dump the node as before, but print
  894.                 additional information COP can gain about that node. COP
  895.                 knowns most node types defined in the Os and will print
  896.                 additional information contained in the data attached to 
  897.                 the node.
  898.  
  899.                 
  900.                 
  901. LIST            L               M,R,D,I,L,P,T,S,Q,B     <expr>
  902.                 Dump contents of exec-type lists.
  903.                 
  904.                 No extension            Dump the list at given address,
  905.                 set "here" to this address. If <expr> is omitted, use
  906.                 the "here" pointer.
  907.                 
  908.                 B                       Same as without extension, but
  909.                 the list is traversed from the last element to the
  910.                 first. This is sometimes useful if parts of the list
  911.                 are broken.
  912.                 
  913.                 M                       Print exec memory list
  914.                 R                       Print resources
  915.                 D                       Print loaded devices
  916.                 I                       Print software interrupts
  917.                 L                       Print libraries
  918.                 P                       Print ports
  919.                 T                       Print tasks
  920.                 S                       Print semaphores
  921.                 Q                       Print hardware interrupts
  922.                 
  923.                 
  924. FILL            F               M                       <expr>,<expr>
  925.                 Fill memory with byte sequence starting with first <expr>
  926.                 and to last <expr>, exclusive. If one of the <expr> is
  927.                 missing, then "here" is used. Then "here" is set to the
  928.                 first <expr>.
  929.                 
  930.                 without extension       Enter the byte pattern the memory
  931.                 should be filled with. Press TAB to complete one byte, press
  932.                 RETURN to complete the whole sequence and to start filling.
  933.  
  934.                 Again, "d0" is the register, not the value. The number is
  935.                 entered as "$d0".
  936.                 
  937.                 M                       Fill memory thru mask (stencil
  938.                 fill operation).        Enter first the byte sequence
  939.                 as described above, then enter the mask bytes. Each
  940.                 bit set to zero in the mask will protect the corresponding
  941.                 memory bit from a change.
  942.                 
  943.                 You may press Ctrl-C any time to abort the operation.
  944.                 
  945.  
  946. FIND            I               M,I                     <expr>
  947.                 Find byte pattern, masked, or find instruction starting
  948.                 with given address or "here". Set "here" to given
  949.                 expression afterwards.
  950.                 
  951.                 The found values are either dumped in the last mode used
  952.                 by the "dump" command, or disassembled with the "I" mode.
  953.  
  954.                 Furthermore, if the display is split, COP stops the search
  955.                 as soon as something is found and updates the top window
  956.                 of its screen, with the "here" pointer set to the found
  957.                 address. This is most useful for displaying a large area
  958.                 around the found bytes, and can be optained by displaying
  959.                 the output of a command like "d >-8" in the top window.
  960.                 To remind you, ">" is the name for the "here" pointer.
  961.                 More about display splitting is found below.
  962.  
  963.  
  964.                 without extension       Enter the byte pattern byte for
  965.                 byte pressing TAB after each byte and RETURN to complete
  966.                 the sequence you are searching for.
  967.  
  968.                 See above for caveats! "d0" is a register, not a number!    
  969.                 
  970.                 M                       Find masked. Enter the byte pattern 
  971.                 you are searching for and then the mask.
  972.                 Each bit left to zero in the mask will disable the
  973.                 comparision of the corresponding bit in the sequence, i.e.
  974.                 the corresponding bit in the byte pattern will be ignored
  975.                 and will match always.
  976.                 
  977.                 I                       Find instruction. Enter the
  978.                 instruction or part of instruction you want to search
  979.                 for and press RETURN to start the search. Case and extra
  980.                 spaces will be ignored.
  981.                 You should note that all known labels will be expanded
  982.                 by COP unless the enviroment is changed. So you should
  983.                 enter the label names instead of the address if you look
  984.                 for an access to a defined label !
  985.                 
  986.                 You may press Ctrl-C to abort the searching at any time.
  987.                 
  988.                 
  989.                 
  990. MOVE            M               none                    <expr>,<expr>,<expr>
  991.                 Move source memory block starting with first <expr> and 
  992.                 ending with second argument exclusive to destination
  993.                 given by last <expr>. If any of the <expr> is missing,
  994.                 "here" will be used. Afterwards, "here" is set to the
  995.                 start of the source memory block.
  996.                 Overlapping memory blocks will be handled correctly.
  997.  
  998.                 You may press Ctrl-C to abort the operation.                
  999.                 
  1000.                 
  1001. TASK            !               F,W,S                   <expr>
  1002.                 Task commands: display,freeze and warm tasks, send
  1003.                 signals.
  1004.                 
  1005.                 without extension       Display information about the task
  1006.                 if <expr> is omitted and execbase is valid, the active task
  1007.                 will be displayed.
  1008.                 
  1009.                 F                       Freeze the given task (exclude from
  1010.                 execution). If the task to be freezed is the active one,
  1011.                 this command will work with Kickstart releases 2.0 or higher
  1012.                 only.
  1013.                 
  1014.                 W                       Warm the given task (include a
  1015.                 previously freezed task in task switching).
  1016.                 
  1017.                 S                       Send a signal to a task. You need to
  1018.                 supply two arguments, FIRST the signal to be send and
  1019.                 SECONDLY the task affected.
  1020.                 
  1021.                 
  1022.                 
  1023. SETR            S               F,E,D,V                  <expr>,reg
  1024.                 Set <expr> to given CPU register.
  1025.                 
  1026.                 without extension       Move given expression to a
  1027.                 destination register. All CPU registers are valid 
  1028.                 destinations, but only the low long word of the 64 bit
  1029.                 wide MMU registers of the 68851/68030 will be set, their
  1030.                 high-longword will be set to $80000002 always. This
  1031.                 word is just a dummy for the 68040 and 68060, but used
  1032.                 to identify the size of the descriptors and a "limit" value
  1033.                 for the 68851/68030. However, I don't remember any program
  1034.                 that makes actually use of these extensions.
  1035.  
  1036.                 If you need to change the vector basis register VBR
  1037.                 of 68010 or above, you should change COP's virtual
  1038.                 VBR called .vvbr instead to keep COP's exception
  1039.                 vectors untouched.
  1040.                 
  1041.                 F                       Load FPU register, if FPU is
  1042.                 available and in use by the program being debugged.
  1043.                 In this case, <expr> is a floating point number in the
  1044.                 usual notation (e.g. 3.1415 or 3E8 ...).
  1045.                 
  1046.                 
  1047.                 E                       With MC68020 or higher: enable
  1048.                 all caches. No arguments need to be supplied.
  1049.  
  1050.                 Warning: Don't touch the cache for 68040 or 68060 systems,
  1051.                 at least don't try to activate it by force if it is not
  1052.                 activated. DMA related device I/O might break by enabling
  1053.                 the cache in an I/O operation.
  1054.                 
  1055.                 D                       With MC68020 or higher: disable
  1056.                 all caches. No arguments taken.
  1057.  
  1058.                 Cache finetuning, if required, should be done by modifying
  1059.                 the cacr register directly.
  1060.                 
  1061.                 V                       With MC68020 or higher: Set the
  1062.                 virtual vector base address to VBR, setup VBR to point
  1063.                 to COPs interrupt vector table. This command should be
  1064.                 given (if it isn't already too late...) if a program
  1065.                 changes the VBR to give back control to COP.
  1066.  
  1067. STEP            Z               none                    <expr>
  1068.                 Enter trace mode, start tracing at given address or use
  1069.                 PC if <expr> is omitted.
  1070.                 How the trace mode works depends highly on the terminal
  1071.                 type used to debug. 
  1072.                 On pure ASCII-terminals, the command at the PC is being
  1073.                 disassembled and dumped to the terminal; on type-3 or
  1074.                 type-4 terminals however, an entire page of instructions
  1075.                 is printed. The command at the PC is marked with an
  1076.                 asterisk and is highlighted on type-4 terminals. Lines
  1077.                 with breakpoints are marked with a "B". The current
  1078.                 position of the "here" pointer is marked by ">".
  1079.                 
  1080.                 With both types of terminals, COP is now ready to accept
  1081.                 one of the following step commands by pressing the
  1082.                 desired key:
  1083.                 
  1084.                 Q or Ctrl-C     Abort trace mode and return to normal
  1085.                 command line.
  1086.                 
  1087.                 S or SPACE      Step the command at the PC. If this is a
  1088.                 subroutine call, the subroutine itself will be entered in
  1089.                 trace mode and can be stepped thru.
  1090.                 
  1091.                 T               Trace the next command. The only difference
  1092.                 between S and T is how subroutines are handled. With the T
  1093.                 command, the subroutine is called as it and will be exe-
  1094.                 cuted as whole without beeing stepped thru.
  1095.                 
  1096.                 N               Next command. Almost like T, but works
  1097.                 different with branches. The next command starts the program
  1098.                 at the current PC and COP regains control only if the
  1099.                 statement IMMEDIATLY FOLLOWING the traced statement gets
  1100.                 executed. This will be the same as T for all commands but
  1101.                 branch and jump commands. You may use N to step thru a
  1102.                 loop as whole if you press N for the end condition branch
  1103.                 of a loop. 
  1104.                 WARNING !!      If this loop has a second exit point, the
  1105.                 command after the end condition may never be executed and
  1106.                 COP is never entered again.
  1107.                 WARNING !!      The next command works ONLY IF THE STATE-
  1108.                 MENT IS IN RAM CODE and DOES CHANGE parts of the code by
  1109.                 setting an internal breakpoint. See BRKP-section for a list
  1110.                 of caveats of breakpoints.
  1111.                 
  1112.                 M               Trace until. Almost like T, but the mecanism
  1113.                 how COP regains control after a subroutine call is different.
  1114.                 The 'T' trace changes the return address to COP's entrypoint.
  1115.                 Sometimes this is unwise cause this address might get used
  1116.                 by the called procedure. If you use 'M' instead, the called
  1117.                 procedure will be stepped thru in 'S'-like behaivor using
  1118.                 the CPU's trace-bit. Of course, 'M' will be much slower
  1119.                 and should not be used if some piece of hardware is accessed
  1120.                 or timing is vital.
  1121.  
  1122.                 O               Skip command. Do not execute the command
  1123.                 at the PC and switch PC to the command following.
  1124.                 WARNING !!      Make sure that the command skipped does
  1125.                 not anything important and watch out for side effects,
  1126.                 e.g. skipping a "push long to stack" could be dangerous
  1127.                 if the corresponding stack cleanup command is not skipped
  1128.                 too.
  1129.                 
  1130.                 G               Start program at current PC, activate all
  1131.                 breakpoints.
  1132.                 
  1133.                 R               Dump registers to terminal.
  1134.                 
  1135.                 B               Set breakpoint at current PC address.
  1136.                 Note that commands with a breakpoint on it are marked
  1137.                 with a "B". Further, a breakpoint under the current PC
  1138.                 is "delayed", i.e. it isn't activated unil the the PC
  1139.                 leaves its address.
  1140.                 The breakpoint set by "B" will be an unconditioned type
  1141.                 (see BRKP for more about breakpoints)
  1142.                 
  1143.                 A               Alter display. If working with the build-
  1144.                 in terminal, the COP display is hidden and the display of
  1145.                 the program is brought to the monitor. The "A" command
  1146.                 is like the "IOCD" command without extension, read this
  1147.                 chapter to find more about COP displays.
  1148.                 If you use the remote-debug feature, this command does
  1149.                 nothing.
  1150.                 
  1151.                 F               Set COP to foreground mode, i.e. COP does
  1152.                 not hide its display if the program being debugged re-
  1153.                 gains control. Press F again to activate the normal display
  1154.                 swapping. This command works mostly like the "IOCD.F" 
  1155.                 command, read the "IOCD" section for more information about
  1156.                 COP foreground and background mode.
  1157.                 
  1158.                 
  1159.                 Some caveats about tracing are:
  1160.                 -------------------------------
  1161.  
  1162.                 - COP does not depend on exec-like task switching, it
  1163.                 is NO PROBLEM to step thru exec's task switching procedure.
  1164.                 (This is actually not a caveat !)
  1165.                 On the one hand a nice feature, on the other hand a problem
  1166.                 if you want to debug a SPECIFIC task. Therefore, you should
  1167.                 trace (T command) over a Wait() or Signal() call of exec.
  1168.                 The NEXT (N command) will work too, but if the same code
  1169.                 is used by two tasks - think about the trackdisk code - you
  1170.                 may catch a different task afterwards. Same goes for the
  1171.                 'M' command, but let me remind you again that 'M' is SLOW !
  1172.  
  1173.                 -The second problem with task switching is that if an exec
  1174.                 task looses control by stepping thru the task-switch 
  1175.                 routine, exec will save its status register with the trace
  1176.                 bit on. If the task is reactivated later, COP will regain
  1177.                 control over this task. While not a problem to COP, this
  1178.                 behaviour might somewhat confusing to you, if COP is
  1179.                 suddenly (probably after hours...) reentered - and not by a
  1180.                 guru.
  1181.                 -There's one extra problem with the trace (T) command :
  1182.                 This commands works by altering the return-address of a
  1183.                 subroutine call. Some programs use this return address to
  1184.                 fetch data following the subroutine call and adjust the
  1185.                 return address afterwards. If changed by COP, this
  1186.                 will cause a nice crash of your system. Thus, if you find
  1187.                 funny code behind a subroutine call, e.g. many illegals
  1188.                 or the like, STEP thru this procedure or use 'M'.
  1189.                 -Since stepping thru a procedure is much slower than
  1190.                 executing one, there may arise timing problems in some
  1191.                 critical IO-procedures. You should trace this kind of
  1192.                 subroutines to avoid such problems. This goes again for
  1193.                 the 'M' command, since this is nothing but "automated
  1194.                 stepping".
  1195.                 
  1196.                 (That looks like a lot of "features" of this debugger,
  1197.                 but they are typically for this class of programs.
  1198.                 However, most authors handle them as "undocumented
  1199.                 features", but I don't. :-) )           
  1200.                 
  1201.                 
  1202. BRKP            B               A,D,C,R,S,O             <expr>
  1203.                 Breakpoint commands. The address affected is given by
  1204.                 <expr> or by "here", if omitted. 
  1205.                 
  1206.                 without extension       If no breakpoint is set at
  1207.                 supplied address, a unconditioned breakpoint is set there.
  1208.                 If a breakpoint is set at this address, the breakpoint
  1209.                 is removed. Note that COP supports up to 32 breakpoints.
  1210.                 It is further important to note that after setting a 
  1211.                 breakpoint, it is not yet active, i.e. causes a COP inter-
  1212.                 cept. The breakpoints are activated each time a program is
  1213.                 restarted, e.g. with the GOPG command; they will get de-
  1214.                 activated each time COP is entered again to prevent an 
  1215.                 endless loop if a breakpoint is set in interrupt code.
  1216.                 However, the breakpoints can be activated by hand, although
  1217.                 this is not recommended.
  1218.                 
  1219.                 
  1220.                 BRKP.A                  Remove all breakpoints (no
  1221.                 arguments accepted)
  1222.                 
  1223.                 BRKP.D                  Display all set breakpoints
  1224.                 with conditions, no arguments accecpted.
  1225.                 
  1226.                 BRKP.C                  Clear breakpoint at given address
  1227.                 
  1228.                 BRKP.R                  Reset all COP counter registers
  1229.                 .c0 to .cf to zero.
  1230.                 
  1231.                 
  1232.                 BRKP.S                  Set breakpoint at given address
  1233.                 and condition, if any. If the condition is omitted, then
  1234.                 an unconditioned breakpoint is set. If a counter
  1235.                 register is included in the condition, it is reset to zero.
  1236.  
  1237.                 With a conditioned breakpoint COP is entered on a BREAK
  1238.                 hit only if the condition is true, i.e. not zero.
  1239.                 You should remember that a counter register is incremented
  1240.                 each time it is accessed, so you may use this feature
  1241.                 to implement counter breakpoints, e.g. ".c0>=5" will stop
  1242.                 execution after the fifth BREAK-hit.
  1243.                 
  1244.                 BRKP.O                  Activate all breakpoints (no 
  1245.                 arguments accepted). Note that this operation might
  1246.                 somewhat dangerous if a breakpoint in an interrupt
  1247.                 procedure gets activated. In this case, COP will display
  1248.                 its "COP crashed" or "Other Task Crashed" message... 
  1249.                 have fun!
  1250.                 
  1251.                 Some extra features of breakpoints are the "delay" of
  1252.                 breakpoints and the automatic removal of them:
  1253.                 -If you set a breakpoint under the current PC, this
  1254.                 breakpoint won't get active if you start the program,
  1255.                 but gets activated AFTER the PC leaves the statement. 
  1256.                 This is useful cause you usually never want to break 
  1257.                 on a command you already broke on. You will enter COP 
  1258.                 when the program reaches the breakpoint again.
  1259.                 -If an already activated breakpoint is getting written
  1260.                 over by a program (e.g. the memory is freed and another
  1261.                 task re-uses this area), this breakpoint is REMOVED
  1262.                 automatically at the time COP is entered again.
  1263.                 This is done to prevent programs from crashing by dangling 
  1264.                 breakpoints of a program that is no longer in memory.
  1265.         
  1266.                 WARNING !       The breakpoint IS NOT removed, if it
  1267.                 is not active at the time it is written over.
  1268.                 This MAY cause problems if the program changes and the
  1269.                 breakpoint is re-activated later, e.g. the breakpoint
  1270.                 may change the address part of a jump-instructions,
  1271.                 possible resulting in a nice fireworks display...
  1272.                 
  1273.                 WARNING !       Active breakpoints change the code
  1274.                 at their address to the ILLEGAL obcode. For this,
  1275.                 BREAKPOINTS DO NOT WORK IN ROM.
  1276.                 (Trick for MMU owners if you need to do this: Enable
  1277.                  the MMU bypass and set the breakpoint in the mirrored
  1278.                  RAM.)
  1279.                 Second, if the code is changed, possibly some check-
  1280.                 sums (for libraries or resident code) will change and
  1281.                 things won't work later. For this reason, use the
  1282.                 T S or M STEP subcommands to step thru this part of code,
  1283.                 they DO NOT ALTER the code and work in RAM as well as in
  1284.                 ROM.
  1285.                 
  1286.                 
  1287.                 
  1288.         
  1289. GOPG            G               U,T                     <expr>,<expr>
  1290.  
  1291.                 without extension       Start interrupted program at given 
  1292.                 address or at PC if <expr> is omitted. If any breakpoints
  1293.                 are set, activate them first. A second argument is not
  1294.                 accepted.
  1295.  
  1296.                 U                       Go until
  1297.                 Set a breakpoint at the first given <expr> and start
  1298.                 the program at the address given by the second argument,
  1299.                 or the PC if omitted. Read the breakpoint section about
  1300.                 caveats of breakpoints !
  1301.  
  1302.                 T                       Trace until
  1303.                 Step thru the program until the PC reaches the first
  1304.                 expression. The second expression will be loaded into the
  1305.                 PC if given. This will be very slow, like the 'M' sub-
  1306.                 command of STEP.
  1307.                 
  1308.                 
  1309. CAPT            C               S,N,C                     [<expr>,]<expr>
  1310.                 Capture a task, i.e. start debugging it.
  1311.                 
  1312.                 no extension            Capture the task with task
  1313.                 structure at the supplied address. If <expr> is omitted,
  1314.                 "here" is used. Afterwards, "here" is set to the
  1315.                 affected task address. If the task uses the FPU,
  1316.                 this capture command will work only with Kickstart
  1317.                 release 2.0 or later, due to the private exec stack frame
  1318.                 which has been changed in Rev. 2.0.
  1319.                 
  1320.                 S                       Like capture without arguments,
  1321.                 but the first argument you supply is a signal mask which
  1322.                 is send to the task before trying to capture it. The 
  1323.                 second argument is the address of the task structure.
  1324.                 
  1325.                 N                       Capture the next task getting
  1326.                 started. No argument must be supplied with this sub-
  1327.                 command. Note that you might find the new task in the
  1328.                 private dos startup code you have to step thru first.
  1329.                 
  1330.                 C                       Capture next command getting
  1331.                 started from the shell. This command works only with
  1332.                 Kickstart 2.0 or later.
  1333.                 
  1334.  
  1335.  
  1336. IOCD            O               S,C,B,F,R,Z,L,M,V,P,Q,I,E      <expr>
  1337.  
  1338.                 Input / output commands, terminal commands (rather a
  1339.                 lot of them...)
  1340.                 
  1341.                 without extension       (does not take any arguments)
  1342.                 If you work with COP's build in terminal, toggle between
  1343.                 COP's display and the display of the program being de-
  1344.                 bugged. This is not done by intuition or the like, but
  1345.                 by PURE HARDWARE. For this reason, COP needs to know the
  1346.                 address of the copper list of this program, and with the
  1347.                 ECS-chipset, the BEAMCON0 value. While both is available
  1348.                 in the graphics library, you must set them by hand if
  1349.                 execbase is destroyed or the program debugged uses the
  1350.                 hardware register to setup its display.
  1351.                 While COP can almost always establish its screen, it is
  1352.                 sometimes impossible to restore the programs screen
  1353.                 completely - some hardware registers are write-only.
  1354.                 In this case, you MUST use remote-debugging.
  1355.                 If foreground or background mode has been active (see
  1356.                 below) they are deactivated by the IOCD command.
  1357.                 
  1358.                 IOCD.S                  (does not take arguments)
  1359.                 Toggle between build-in terminal and remote-debugging.
  1360.                 If you switch to an external terminal, you should make clear
  1361.                 that this terminal is online, or you might fail to enter
  1362.                 a second IOCD.S to switch back to the build-in one.
  1363.                 Everytime the terminal is changed, COP retries to get the
  1364.                 terminals type to setup type-3 or type-4 communication.
  1365.                 For more information about COP's internal terminal format
  1366.                 and auto-identification read the "Terminal.doc" file
  1367.                 included in this drawer.
  1368.                 
  1369.                 IOCD.C                  <expr>
  1370.                 Set the address of the copper list of the user-program to
  1371.                 re-establish the user's display. If <expr> is omitted,
  1372.                 the "here" pointer is used. You won't need this command if
  1373.                 you debug programs that use the "standard" graphic system,
  1374.                 since COP extracs the address out of gfxbase itself. But
  1375.                 if the user's program uses the hardware registers directly,
  1376.                 COP does not recognize this change of the copper list.
  1377.                 In this case, search with the FIND command for a write to
  1378.                 the hardware register and set this value as user-copperlist
  1379.                 with IOCD.C <expr>. It is seldom easy to find it, so
  1380.                 good luck...
  1381.                 If you have problems with programs using custom copper
  1382.                 lists, you should try the interrupt driven display using
  1383.                 the IOCD.I command (then you get trouble with
  1384.                 interrupts instead of copper lists... ;-)               
  1385.                 
  1386.                 IOCD.I                  (does not take arguments)
  1387.                 Toggle between copper list driven display and interrupt
  1388.                 driven display.
  1389.                 The standard way for COP to display information is to
  1390.                 setup a copper list and to load it into the hardware. Later
  1391.                 on, if the program is started again, the system copperlist,
  1392.                 which can be set by IOCD.C, will be loaded back.
  1393.                 This will, of course, cause trouble if the program changes
  1394.                 the copper list on its own.
  1395.                 The best solution is of course to change to remote de-
  1396.                 bugging using IOCD.S, but startig with release 1.30 COP
  1397.                 can be forced to use a different method of display.
  1398.                 The interrupt driven display does NOT use copper-lists,
  1399.                 but uses the vertical blank interrupt to write the
  1400.                 hardware registers. COP tries its best to keep the program
  1401.                 setting valid, e.g. if the program disables the interrupt,
  1402.                 COP excludes the user VBI from running. However, this is
  1403.                 really a bit tricky and may fail. A second drawback is
  1404.                 that the display produced by interrupts is much simpler
  1405.                 and does, for example, not support line highlighting.
  1406.  
  1407.                 IOCD.B                  (does not take arguments)
  1408.                 Set COP to background mode, i.e. COP's display is never
  1409.                 setup and the users display is kept active. However,
  1410.                 you are still ready to enter commands. This mode is
  1411.                 somewhat impracticable since you don't see what you type.
  1412.                 
  1413.                 IOCD.F                  (does not take arguments)
  1414.                 Set COP to background mode, i.e. COP's display is not
  1415.                 removed from the monitor (only execption: a GOPG command
  1416.                 or the G subcommand of the STEP-command). Use this command
  1417.                 to avoid the flicker that occurs if the screen changes.
  1418.                 There's one caveat with this command and the STEP-command:
  1419.                 Since the displays are not swapped, the user program may 
  1420.                 destroy COP's display by writing to a hardware register or
  1421.                 may get unexepected results reading a register while COP's
  1422.                 display is active.
  1423.                 So watch out and disable the foreground mode if you want
  1424.                 to step this type of commands.
  1425.                 
  1426.                 IOCD.R                  (does not take arguments)
  1427.                 Disables foreground and background mode and restores
  1428.                 normal display swapping.
  1429.                 
  1430.                 IOCD.Z                  <expr>
  1431.                 Set the screen size of the build-in terminal to <expr>
  1432.                 lines. If <expr> is omitted, the actual display size
  1433.                 will be used.
  1434.                 The standard screen size is 28 (=$1C, remember COP always
  1435.                 thinks in HEXADECIMAL !) lines, but this might be too
  1436.                 large for some monitors. To prevent you grabbling at your
  1437.                 monitor, this command can be used to setup a fitting
  1438.                 display size. However, the screensize is limited to 8 to
  1439.                 28 lines and will always be centered.
  1440.                 
  1441.                 IOCD.L                  <expr>
  1442.                 Setup the number of lines until COP presents its ***more***
  1443.                 message to ask for continue. This number is more an 
  1444.                 approximate value as some outputs can't be broken up into
  1445.                 lines (for example the register display does never generate
  1446.                 a ***more*** message).
  1447.                 If <expr> is not given, the command uses the last value.
  1448.                 (Remember that COP thinks in HEX, so 10 is not TEN but
  1449.                 SIXTEEN !)
  1450.                 
  1451.                 
  1452.                 IOCD.M                  <expr>
  1453.                 Set the value to be written to BEAMCON0 if user display
  1454.                 should be rebuild. This command is not required unless
  1455.                 an application uses the hardware registers directly.
  1456.                 See IOCD.C and IOCD for more information about this
  1457.                 feature.
  1458.                 If possible, COP tries to build a NTSC-display because
  1459.                 it is less flickering than a PAL screen. I think there
  1460.                 should be no problems with this feature, even commodore's
  1461.                 @#!?!-monitor supports 60Hz displays and most european 
  1462.                 TVs will do so, too. If there are problems, use the next
  1463.                 option to use a PAL display instead, or use the PAL
  1464.                 command line option (see below). Some flicker fixers
  1465.                 might have problems with the long/short frame toggling
  1466.                 of the NTSC display, COP offers the PAL60 option.
  1467.  
  1468.  
  1469.                 IOCD.V            (does not take arguments)
  1470.                 Toggles the display mode between NTSC, PAL and PAL60.
  1471.                 ECS or better is required for this function.
  1472.                 
  1473.                 IOCD.P                  (does not take arguments)
  1474.                 Toggles printer output.
  1475.  
  1476.                 Not all commands cause a printer output, e.g. the edit
  1477.                 and step commands do not, since they are interactive.
  1478.  
  1479.         
  1480.                 IOCD.Q                  (does not take arguments)
  1481.                 Toggles printer support via the build-in printer driver
  1482.                 thru the parallel port of the amiga or the terminal
  1483.                 connected to COP (this is the default).
  1484.                 If you use the build-in terminal emulation, this command
  1485.                 will make no difference at all, but with an external type-5
  1486.                 terminal COP will either print itself or tell the external
  1487.                 terminal to start or stop printing. The later method is of
  1488.                 course the better one, it does not take over the parallel
  1489.                 port hardware.
  1490.  
  1491.                 All IO-commands but the L,S,P and Q subcommand don't make
  1492.                 sense in a remote-debug session and don't do anything in 
  1493.                 this case.
  1494.  
  1495.                 IOCD.E            (does not take arguments)
  1496.  
  1497.                 This command does not take any arguments. It will send a 
  1498.                 FORM FEED control character to the connected printer, to
  1499.                 eject the paper. This might be needed by some laser or
  1500.                 deskjet printers.
  1501.  
  1502.  
  1503. ENVI            V                       R,L,I,B,X,E,M,F,D,C,U,O  <expr>
  1504.                 Enviroment settings, mode settings and so on.
  1505.                 
  1506.                 without extension       Not valid. This command MUST
  1507.                 be extended.
  1508.                 
  1509.                 ENVI.R                  (does not take arguments)
  1510.                 Enter raw mode. In this mode,
  1511.                 execbase is not used at all. There are much consequences
  1512.                 of entering the raw mode: The display copper list and
  1513.                 beamcon0 must be set by hand (with IOCD.C and IOCD.M),
  1514.                 interrupts are disabled if COP is entered, all list
  1515.                 commands depending on exec-lists, all task commands and
  1516.                 all capture commands refuse to work. The EXIT command
  1517.                 is not available, too. The SegTracker interface will be
  1518.                 disabled, too.
  1519.                 There is no message if these commands are still entered.
  1520.  
  1521.                 All exceptions except interrupts cause now COP to inter-
  1522.                 cept, even if there is an exception handler installed in
  1523.                 the active task - normally it's no problem to run COP
  1524.                 parallel to a "normal" debugger, but in RAW-mode COP will
  1525.                 capture even its breakpoints.
  1526.                 
  1527.                 If you've entered the raw mode once, there's NO WAY
  1528.                 TO SWITCH IT OFF LATER except a power up or a reboot, 
  1529.                 so be careful !
  1530.                 
  1531.                 You should use the raw mode if you MUST debug a program
  1532.                 that uses the hardware directly. In most cases, it is
  1533.                 necessary to use remote debugging, too.
  1534.  
  1535.                 If you must use the chip-mem buffer, you are REQUESTED TO
  1536.                 USE the raw mode too, or you will run into BIG TROUBLE
  1537.                 with task switching activity.
  1538.                                 
  1539.  
  1540.  
  1541.                 ENVI.L                  <expr> <expr>
  1542.                 Add memory section. Cause COP does not use the exec
  1543.                 memory list, COP tries to find the memory portions
  1544.                 in your system on startup, i.e. chip mem, fast mem
  1545.                 and the kickstart ROM. However, COP cannot handle 
  1546.                 "too complicate" memory models, e.g. fast mem that
  1547.                 is split in several blocks or memory that is not
  1548.                 aligned to 64K borders.
  1549.                 To fit your needs, you may add a memory chunk of
  1550.                 your choice to COP's list.
  1551.                 The first argument specifies the start address of
  1552.                 the block, the second the (exclusive) end address,
  1553.                 if both are equal, this memory block will be removed 
  1554.                 from COP's private list.
  1555.                 
  1556.                 This memory list is used for the FIND and FILL commands,
  1557.                 memory is scanned for all addresses in it.
  1558.  
  1559.                 NOTE:           Normally, the memory in an Amiga is
  1560.                 typically not organized in a linear way, some memory parts 
  1561.                 are mirrored to others and the memory is possibly split
  1562.                 into some chunks, e.g. if you have a memory expansion
  1563.                 card in an old Amiga 2000B with ranger-memory (slowmem).
  1564.                 In this case, your fast mem will fill the addresses
  1565.                 0x00020000 to ??? and 0x000c8000 to 0x000d0000. In this 
  1566.                 case COP will search the total area from 0x00020000 to 
  1567.                 0x00d00000, including some hardware registers in between.
  1568.                 In this release, COP can not handle such complicated memory
  1569.                 models, maybe later...
  1570.                 (This is even better than pre-1.17 releases, which were un-
  1571.                 able to work with A4000 memory models at all....)
  1572.                                                 
  1573.                 ENVI.I                  (no arguments)
  1574.                 Disable the checking of changes of IRQ-vectors.
  1575.                 Under normal conditions, COP checks the consistency of
  1576.                 the MC68000 autovector table, used by COP to allow trace and
  1577.                 breakpoint commands. If one of the entries are changed,
  1578.                 you will be prompted by a message if it's O.K. to undo the
  1579.                 change, to accept it (in this case COP writes the change
  1580.                 back to its second vector table, which can be used by
  1581.                 ENVI.F), or to ignore one or all changes.
  1582.  
  1583.                 This change could be done by a faulty program, or
  1584.                 by a program that wants to regain control over the whole
  1585.                 system. In the first case it's better to answer U(ndo), in
  1586.                 the later C(hange). If you use a MC68000, the address in the
  1587.                 trace and illegal trap vectors are vital, and any change
  1588.                 of them will prevent COP from being able to step thru
  1589.                 programs. Also, COP needs at least one interrupt that
  1590.                 occurs "often enough" to check the status of the break key.
  1591.                 With a MC68010 or higher things are not that worse, cause
  1592.                 COP uses the VBR register to move the autovector table
  1593.                 to a different part of the memory. However, changes to
  1594.                 the old table will be respected, although COP does not yet
  1595.                 notice the change of the VBR register. In case you notice
  1596.                 that the VBR has been changed, set it back to the old
  1597.                 value which can be found in the label COPVBR and place the
  1598.                 new value in the virtual vector base called VVBR.
  1599.  
  1600.                 If you disable the IRQ-checking, all changes to the
  1601.                 autovector table are ignored.
  1602.  
  1603.                 ENVI.C                  (no arguments)
  1604.                 Enables the IRQ copy back mode.
  1605.                 Instead of watching the low-memory vector base, COP keeps
  1606.                 an eye on its own vector offset and copies the changed
  1607.                 vectors on request to the virtual vector base. This option
  1608.                 should be choosen if you want to debug a program that
  1609.                 directly writes to the vector base, like ShapeShifter.
  1610.                 The command line option "MacMode" enables this automatically.
  1611.                 Be warned: Enabling the copy back mode disables the check
  1612.                 for the low memory vector table, which is normally used by
  1613.                 the Amiga OS.
  1614.                 This check can be disabled with the ENVI.I switch described
  1615.                 above and works of course only for the MC68010 or better.
  1616.  
  1617.               
  1618.                 ENVI.B                  (no arguments)
  1619.                 Toggles the ChipMem backsave buffer.
  1620.                 The display build up by COP's internal terminal emulation
  1621.                 needs some chip memory that might be occupied by the
  1622.                 program you want to debug. If you want to prevent COP
  1623.                 from overwriting this area, you must:
  1624.                 o) provide a backsave area using the BUFFER keyword on
  1625.                    the command line when COP is installed
  1626.                    (usually in the startup-sequence)
  1627.                 o) enter the ENVI.B command to enable this buffer
  1628.                 o) you SHOULD use the Raw-mode to prevent conflicts with
  1629.                    multitasking
  1630.  
  1631.                 If the buffer is enabled, COP will backup the occupied 
  1632.                 memory area each time it builds its own display and will
  1633.                 restore it, if the program's display is restored later.
  1634.                 However, this backup mechanism is not (yet) fully trans-
  1635.                 parent to other parts of COP, but the UNAS and DUMP
  1636.                 commands keep care. It will be therefore convienent to 
  1637.                 place COP's CHIP hunk an uninteressting part of memory,
  1638.                 e.g. the display buffer of the debugged program would be
  1639.                 fine. To prevent problems with the blitter, COP will wait
  1640.                 for the blitter to complete before swapping the memory.
  1641.                 In all other cases the blitter will be just stopped.
  1642.  
  1643.                 ENVI.X                  (no arguments)
  1644.                 Affects the way the disassembler handles the indexed
  1645.                 indirect mode with label generation. The default is, that
  1646.                 the address which is used for label generation is given
  1647.                 by the base register plus the index. This is most com-
  1648.                 fortable if, for example, all entries of an indexed table
  1649.                 have labels associated to them. If, however, you want to
  1650.                 reassemble a part of code, this would be fatal since
  1651.                 all assemblers calculate the displacement, which will
  1652.                 be replaced by the label, as a distance to the base
  1653.                 register without the index. So if you switch out the
  1654.                 index inclusion, you will only see labels associated
  1655.                 to the base of a indexed table.
  1656.  
  1657.                 ENVI.E                  (no arguments)
  1658.                 Toggle the label generation on or off. If you do not want 
  1659.                 to see labels, for example in a search process looking for
  1660.                 a instruction with specific address, you can switch out
  1661.                 the label generation at all using ENVI.E
  1662.  
  1663.                 ENVI.M                  (no argument)
  1664.                 Toggle the build-in memory manager. This part of code
  1665.                 in COP protects you from writing into hardware and non-
  1666.                 existing memory, as well as it does the memory re-
  1667.                 mapping for the chipmem-buffer. If, for special purposes,
  1668.                 you want to disable this feature, use ENVI.M
  1669.  
  1670.                 ENVI.F                  (no argument)
  1671.                 Toggle the place where the exception vectors are stored.
  1672.                 The default location is at address 0, but since this is
  1673.                 chip memory, exception handling gets slow. If you use
  1674.                 ENVI.F, the vector base will be located in the fast-memory.
  1675.  
  1676.                 Warning! ENVI.F does NOT change the vector base register
  1677.                 at all, since it is pointing to COP's own vector base at
  1678.                 any time. Instead, it says COP where to look for the system
  1679.                 vectors, so it changes only the virtual vector base VVBR.
  1680.                 Warning ! ENVI.F will overwrite the virtual vector base
  1681.                 register VVBR of COP in order to work ! So do not use this
  1682.                 command if you setup your own VVBR.
  1683.  
  1684.                 This command only takes effect if running under a MC68010
  1685.                 or better, since the plain MC68000 does not have a VBR.
  1686.  
  1687.  
  1688.                 ENVI.D                  (no argument)
  1689.                 Toggle the default input radix, with is set up as hex,
  1690.                 to decimal and back.
  1691.  
  1692.                 ENVI.U            (no argument)
  1693.                 Toggle the MMU bypass. All COP memory accesses usually by-
  1694.                 pass the MMU of the 68020 or higher processors, so you see
  1695.                 the true physical addresses. This can be disasterous if COP
  1696.                 is used on an A3000 because disabling the MMU disables the
  1697.                 image of the OS, too. Use ENVI.U to tell COP not to touch
  1698.                 the MMU. That will have, however, certain consequences:
  1699.                 First, all addresses shown in COP will be logical addresses,
  1700.                 not the pure physical addresses. Reading or writing 
  1701.                 non-existant or pure system addresses with MuForce
  1702.                 enabled will cause COP to crash by a bus error (that's harm-    
  1703.                 less for COP, but you won't be able to alter these addresses
  1704.                 at all).
  1705.                 The command line option NOMMU can be used to enable this
  1706.                 option by default. In any case, be careful with it.
  1707.  
  1708.                 ENVI.O            (no argument)
  1709.                 This is a 060/040 specific setting. It selects whether COP
  1710.                 should bypass the non-implemented instruction exceptions
  1711.                 to the 68060/68040 library or capture them itself.
  1712.                 The command line option NOEMU does quite the same, namely
  1713.                 enabling the bypass.
  1714.  
  1715.                 It is, however, not yet clear if this option works or makes
  1716.                 any difference at all. *sigh*
  1717.         
  1718.  
  1719. SPLT            /               C               <expr>
  1720.                 This command is available ONLY if you use the build-in
  1721.                 terminal or an external type-3 or type-4 terminal. It
  1722.                 won't work with a raw ASCII-terminal.
  1723.                 
  1724.                 COP has the ability to split off a part of the screen for
  1725.                 displaying some information permantly. This information
  1726.                 in then updated each time you enter a command or COP
  1727.                 looses or regains control over the system. For example,
  1728.                 splitting the screen and displaying the register set in
  1729.                 the upper part of the screen while tracing is highly use-
  1730.                 ful and is nowadays standard for all debuggers.
  1731.                 Cause COP is "a little" different from "the common 
  1732.                 debugger", you must enable this feature by hand, and due 
  1733.                 to the raw display system, it's not available in general - 
  1734.                 a raw ASCII terminal can't split the screen.
  1735.                 
  1736.                 without extension       COP displays a new prompt and you
  1737.                 should enter a command that shall be executed each time
  1738.                 the display must be updated. The output of this command is
  1739.                 then displayed in a separated part of the display.
  1740.                 It is possible to execute more than one command if you
  1741.                 separate the commands by colons.
  1742.                 The argument following the SPLT-command determinates the
  1743.                 approximate size of the split-off part of the display 
  1744.                 (in lines; remember that all numerical values are HEX-
  1745.                 VALUES by default !). If there's not enough room, not
  1746.                 all commands will be executed.
  1747.                 
  1748.                 There are a few caveats to remember when using the SPLT-
  1749.                 command:
  1750.                 -Not all commands are splitable, e.g. the SPLT and the
  1751.                 STEP commands (since that doesn't make sense at all...)
  1752.                 -Some commands are splitable, but it's not very useful
  1753.                 to split them, cause they get executed each time the
  1754.                 display is updated, e.g. the GOPG and the EXIT commands.
  1755.                 -Almost all commands change the "here"-pointer. This is
  1756.                 NOT true for commands executed in the split-window, i.e.
  1757.                 they can READ "here", but do not change them.
  1758.                 This is somewhat useful since, while tracing, the "here"
  1759.                 pointer contains the address of the first command of the
  1760.                 lower window, e.g. splitting the command "d.w" will dump
  1761.                 the obcodes of the program in hex.
  1762.                 
  1763.                 Some useful commands for splitting:
  1764.                 REGS            will present a auto-updating register dump
  1765.                 NODE .a6        will print the name of the library pointed
  1766.                                 to by a6
  1767.                 DUMP.L .a0      will dump the memory pointed to by a0.
  1768.                                 (display will change if a0 changes, of
  1769.                                 course)
  1770.                 
  1771.                 (Remeber that you should supply a dot in front of the
  1772.                 register names to distinguish between registers and
  1773.                 addresses)
  1774.                 
  1775.                                 
  1776.                 Remember that you can execute more than one command once,
  1777.                 e.g. REGS:NODE .a6
  1778.  
  1779.         
  1780.                 Another idea about splitting is to use it when searching.
  1781.                 COP halts now searching as soon as something is found and
  1782.                 refreshes the split-off command, with the "here" pointer
  1783.                 set to the found command. Thus, splitting the screen with
  1784.                 a command like "u >-8" will disassemble the region around
  1785.                 the found byte everytime the search succeeds.
  1786.                 
  1787.                 
  1788.                 SPLT.C                  (no arguments accepted)
  1789.                 Remove the split window and return to normal operation.
  1790.  
  1791.  
  1792.                 NOTE:
  1793.                 This command is always executed if a part of COP causes
  1794.                 a crash. Mainly because this part could be the split-off
  1795.                 command, creating an infinite loop of crashes when re-
  1796.                 freshing the screen after the crash-message.
  1797.                 
  1798. SKTB            T               <expr>
  1799.                 Stack traceback.
  1800.  
  1801.                 Search the stack at the given address or at the address
  1802.                 given by the active stack pointer for data- and
  1803.                 code addresses. This will be useful if you want to find
  1804.                 out which part of code called a faulty procedure.
  1805.  
  1806.                 COP TRIES to find out if the data on the stack is
  1807.                 just garbage (which won't be printed) or a pointer
  1808.                 to data, or a return address to a piece of code.
  1809.  
  1810.                 In the later case, it tries to find a label near that
  1811.                 code address, to provide you with the name of the calling
  1812.                 routine.
  1813.  
  1814. LABS            A            E,S,B,G,T,V,A,U,L,F    [name]
  1815.                 Dump labels.
  1816.  
  1817.                 This command prints informations about label definitions
  1818.                 loaded into COP. A line dumped by this command will look
  1819.                 like the following:
  1820.  
  1821. label name    :    value    (+ base)        (flags)
  1822.  
  1823.                 Some labels are either relative to a base, which is printed
  1824.                 in hex if so, or relative to an exec node. It's name is
  1825.                 printed in this case.
  1826.  
  1827.                 The characters in the brackets specify the type of the 
  1828.                 label:
  1829.  
  1830.                 A    absolute address
  1831.                 E    equate. An easy to remember expression representing
  1832.                     a number.
  1833.                 N    an address relative to a node, thus, an offset.
  1834.                 V    a function vector of a library or a device.
  1835.                 R    an offset relative to an absolute base.
  1836.                 S    a size of something. Currently not supported.
  1837.                 B    a bit definition.
  1838.                 L    A lineA trap definition (not required by the
  1839.                     Amiga-OS, but by the Mac OS)
  1840.  
  1841.                 s    A COP internal (system) label. There are currently
  1842.                     only four system labels.
  1843.                 r    A read-only label.
  1844.                 k    A resident label, can't be removed with FLUSHALL
  1845.                 t    A temporary (so, user) label. Can be removed with
  1846.                     FLUSH.
  1847.  
  1848.  
  1849.                 The "name" argument specifies the label you'd like to know
  1850.                 information about. Wildcars are welcome here, COP knows
  1851.                 only two wildcards, '?' for one unknown character and '*'
  1852.                 for a sequence of unknown characters. If you don't give a
  1853.                 name, COP selects "*" for you as default, i.e. will show
  1854.                 all label.
  1855.  
  1856.                 The extensions specify the type of labels in the list:
  1857.  
  1858.         
  1859.                 LABS.E            [name]
  1860.                 Dump equates only.
  1861.  
  1862.                 LABS.S            [name]
  1863.                 Dump only sizes.
  1864.  
  1865.                 LABS.B            [name]
  1866.                 Dump bit definitions.
  1867.  
  1868.                 LABS.G            [name]
  1869.                 Dump gurus.
  1870.  
  1871.                 LABS.T            [name]
  1872.                 Dump line-A traps.
  1873.  
  1874.                 LABS.V            [name]
  1875.                 Print function vectors.
  1876.  
  1877.                 LABS.A            [name]
  1878.                 Print addresses. Absolute, relative or node relative.
  1879.  
  1880.                 LABS.U            [name]
  1881.                 Print all user defined (temporary) definitions.
  1882.  
  1883.                 LABS.L            [name]
  1884.                 Print all definitions.
  1885.  
  1886.                 LABS            [name]
  1887.                 Print all user defined addresses.
  1888.  
  1889.                 LABS.F            <expr>
  1890.                 Find the label nearest to and behind the given address.
  1891.                 This is useful if you know only the absolute address in
  1892.                 memory and want to relate it to the name of a subroutine
  1893.                 of your program.
  1894.         
  1895. SEGM            Q            <expr>
  1896.                 Find segment offsets.
  1897.  
  1898.                 This command takes a memory address and tries to find out
  1899.                 the program this memory belongs to. If successful, COP will
  1900.                 print the segment (=hunk) number of that program, and the
  1901.                 offset within that hunk the given address belongs to.
  1902.  
  1903.                 Michael Sinz' "SegTracker" must be active for this service!
  1904.  
  1905.  
  1906.                 
  1907. XI) COP arguments to the command line and ToolTypes for the Workbench
  1908. ---------------------------------------------------------------------
  1909.  
  1910. Here a list of arguments COP acceptes as arguments when getting started
  1911. from the shell. However, it's possible to start COP from the workbench
  1912. and to supply the same arguments as tooltypes. Simply create a tooltype 
  1913. of the same name for each keyword.
  1914.  
  1915.  
  1916. KEYMAP  <keymap>        Set the keymap COP should use for the build-in
  1917. terminal. Please note that you CAN NOT change this keymap with the
  1918. SetMap or SetKeyboard command. This keymap is of course not used for
  1919. remote debugging.
  1920. The keymap file is searched in the DEVS:keymaps drawer (not in KEYMAPS:
  1921. cause this logical device is not standard with Kickstart 1.2 or 1.3)
  1922. or in the keymap.resource. You need to supply AT LEAST AT STARTUP
  1923. a KEYMAP argument to define the keymap COP shall use. (There's no default
  1924. in this release, a missing keymap argument will result in an unusable
  1925. build-in terminal)
  1926.  
  1927.  
  1928. SERIAL                  Choose remote debugging
  1929. DISPLAY                 Choose build-in terminal for debugging
  1930. Note that you MUST supply the DISPLAY argument if you want to enter COP
  1931. by a shell command or COP will switch to remote-debugging.
  1932.  
  1933.  
  1934. LINES <number>          Set the number of lines of the build-in terminal
  1935. screen, the default is 28. This argument will be ignored if COP is already
  1936. loaded, use the IOCD.Z command instead.
  1937.  
  1938. BREAKKEY <number>       Set the keycode (NOT the ASCII-value !) of the
  1939.                         BREAK-key. This value will be used only by the
  1940.                         internal terminal emulation and will be ignored
  1941.                         under remote debugging.
  1942.                         Some useable keys (in other words: You
  1943.                         MAY use the return key, but...) are:
  1944.  
  1945.                         93      the asterisk on the numeric key pad
  1946.                         90      the braket-left key on the pad
  1947.                         91      the braket-right key nearby
  1948.                         74      the minus key on the pad
  1949.                         94      the plus key underwards
  1950.                         60      the dot on the key pat
  1951.                                 this is the DEFAULT.
  1952.                         
  1953.                         You may also use hex numbers if you place a $ or a
  1954.                         0x in front of them.
  1955.                                                 
  1956. RESIDENT                Load COP resident into memory, i.e. COP will survive
  1957. a reset if execbase is still o.k. and need not to be reloaded. This option
  1958. is useful if you want to debug startup-code. If used together with
  1959. MuForce, you might want to give the "RESTOREVBR" keyword as well, see 
  1960. below.
  1961.  
  1962. REMRESIDENT             Remove COP from the resident list and free all its
  1963. memory. Cause COP can not be removed completely, RESTART YOUR COMPUTER
  1964. IMMEDIATLY AFTER EXECUTING THIS COMMAND. Some code may write over COP's
  1965. still installed interrupt code resulting in a fireworks display or a crashed
  1966. harddisk (oh what a fun...).
  1967.  
  1968.  
  1969. GO                      Start a debug session using COP.
  1970.  
  1971. BUILDINPRT              Use the build-in printer support thru the parallel
  1972. port of the Amiga instead of the external terminal printer support. This
  1973. option works like the IOCD.Q command.
  1974.  
  1975. TERMINALPRT             The counterpart of BUILDINPRT: Use the printer pro-
  1976. vided by the terminal connected to COP. If you choose the build-in terminal
  1977. emulation, this won't make any difference. However, if you debug with an ex-
  1978. ternal terminal, the printing will be done thru its port and not thru the
  1979. amiga parallel port.
  1980.  
  1981.  
  1982. IRQDISPLAY              Select the buildin-terminal emulation, switch to
  1983. interrupt driven display. This acts like the IOCD.I command.
  1984.  
  1985. COPPERDISPLAY           Select the copper driven display as default.
  1986.  
  1987.  
  1988. IRQCOPYBACK             Select the IRQ copyback mode: COP does not watch the
  1989. low-memory interrupt vector table, but its own vector table and will copy
  1990. changes to the virtual vector base. This is the command-line counterpart of
  1991. the ENVI.C setting.
  1992.  
  1993. NOIRQCOPYBACK           The default operation of COP: Watch the standard
  1994. interrupt vector table, which is located at address 0 and up. Both checks
  1995. can be disabled with the ENVI.I switch.
  1996.  
  1997. RESTOREVBR              Instruct COP to re-install its own vector base 
  1998. register. This keyword is needed if COP is made resident and used in con-
  1999. junction with "MuForce". Since "MuForce" installs its own vector base table 
  2000. on top of COP, a resident copy of COP won't be able to capture enforcer hits 
  2001. any more. Use this option to restore the VBR of COP, right after 
  2002. installing MuForce. 
  2003.  
  2004. MACMODE                 This macro switch enabled some options and settings
  2005. required for COP to run safely under the "ShapeShifter" Macintosh emulator.
  2006.  
  2007. SET60                   Tell COP that a MC68060 processor is in your system,
  2008. although exec.library does not know. The standard Amiga OS 3.1 does NOT
  2009. recognize a '60 processor, the correct flags are usually setup later by
  2010. a tool provided by the hardware manufacturer, mostly the 68060 library.
  2011. If you want to run COP prior to these tools, specify the SET60 option.
  2012. This flag DOES NOT change the processor flags in the exec.library!
  2013.  
  2014. NOMMU                   Disable the MMU bypass. COP won't touch the MMU and
  2015. keep it active all the time - as needed for amiga models that use the
  2016. MMU to load an OS image or to guarantee reliable DMA operations, as the
  2017. 040 and 060 based Amigas. Disabling the MMU in this case will crash the 
  2018. system because the OS will vanish. This keyword is identical to the ENVI.U 
  2019. instruction.
  2020.  
  2021. MMU                     The default. COP bypasses the MMU for memory access, 
  2022. all addresses will be physical addresses. This is somewhat dangerous if the
  2023. MMU is required for system operation, as for '060 and '040 systems or if 
  2024. the MMU is used to map in a different version of the OS.
  2025.  
  2026. NOEMU                   Instruct COP to bypass the 060/040 emulator traps to
  2027. the 68060.library or 68040.library - which must be installed and running 
  2028. at the time COP is launched. These exceptions are generated if the 
  2029. 68060 detects an instruction that is not supported by the CPU directly 
  2030. but has to be emulated in software.
  2031.  
  2032. It is, however, not quite clear if this option makes any difference at all,
  2033. or if it works - simply because I don't own a '060 for testing.
  2034.  
  2035. EMU                     The opposide and default setting. COP captures all 
  2036. emulator traps as software failures.
  2037.  
  2038. The next three options contol the video mode used by COP for its own display:
  2039.  
  2040. NTSC                    Use a NTSC screen for the debugger screen. This has
  2041.                         been the default for versions up to 1.56.
  2042.  
  2043. PAL                     Use a PAL screen instead. This is, however, more
  2044.                         flickering but required for some TVs.
  2045.  
  2046. PAL60                   This is a display mode half between PAL and NTSC.
  2047.                         It uses the base frequency of NTSC, 60Hz, but does
  2048.                         no long/short line toggling, like PAL. This mode
  2049.                         might be required to display 60 Hz with some oldish
  2050.                         flicker fixers.
  2051.  
  2052. PICASSO                 Tell COP that the "Picasso96" graphics system and
  2053.                         a graphics card is installed. COP will then try to
  2054.                         saveback the status of the RTG system and to bring
  2055.                         the native amiga display to front. This option 
  2056.                         requires the "picasso96" installed, most important
  2057.                         the "rtg.library".
  2058.                         I don't know how well this works, though, it's
  2059.                         currently a bit "hackish".
  2060.  
  2061. NOPICASSO               Disable the use of the Picasso96 graphics software.
  2062.  
  2063. DARKEN                  Darken the native Amiga display upon initialization
  2064.                         of COP. This is useful for graphics board software
  2065.                         that leaves the native Amiga screen white.
  2066.                         This option is currently a bit "hackish".
  2067.  
  2068.  
  2069. Now some options that tell COP where to place itself in memory. They do
  2070. not work if COP is already loaded !
  2071.  
  2072. CODE where              Tell COP where to place its CODE segment. where
  2073. might be:
  2074.         FORWARD         Allocate memory from the beginning of the memory
  2075.                         area, so COP is placed at LOW addresses.
  2076.                         This is impractical in most cases.
  2077.  
  2078.         REVERSE         Allocate memory from the end of the memory, so
  2079.                         COP is placed at HIGH addresses. This was the
  2080.                         default up to release 1.18.
  2081.  
  2082.         address         Place COP at an absolute address, given in decimal
  2083.                         or in hex if preceded by $ or 0x.
  2084.                         This memory area must be available, as long as you
  2085.                         do not use the FORCE option.
  2086.  
  2087. DATA where              Tell COP where to place the DATA section. The 
  2088.                         argument is the same as above.
  2089.  
  2090. BSS  where              ...same for BSS section
  2091.  
  2092. CHIP where              ...same for CHIP section. If you use an absolute
  2093.                         address here, make shure it is in chip mem !
  2094.  
  2095. LABEL where             ...same for LABEL section, which is needed if
  2096.                         you give a DDT (see below) and containes 
  2097.                         the names and addresses of DDT labels.
  2098.  
  2099. BUFFER where            Tell COP to use a chip-memory backup buffer and
  2100.                         place it according to the argument. You MUST
  2101.                         provide this argument if you want a chipmem backup
  2102.                         area, or the ENVI.B command won't work.
  2103.  
  2104. RESIDENTSTRUCT where    Tell COP where to place the resident structure that
  2105.                         is needed for COP to keep resident over resets.
  2106.                         This argument is only useful if you use the
  2107.                         RESIDENT switch too.
  2108.  
  2109. FORCE                   Tell COP to use the specified memory, even if it is
  2110.                         occupied by another program. WARNING !
  2111.                         YOU SHOULD BE REALLY SURE WHAT YOU ARE DOING if
  2112.                         you MUST use this option ! Portions of code of
  2113.                         other programs might get overwritten by COP, causing
  2114.                         a fantastic crash !
  2115.  
  2116. FLUSH                   Flush labels loaded as symbols from a segment,
  2117.                         e.g. loaded by CLIDEBUG or WBDEBUG.
  2118.                         This is done automatically every time if you
  2119.                         specify CLIDEBUG or WBDEBUG.
  2120.                         However, the labels defined in the DDT file
  2121.                         are left alone.
  2122.  
  2123. FLUSHALL                Flush all labels, even those defined in a
  2124.                         DDT file. The system labels AbsExecBase, Version
  2125.                         COPVBR and COPVVBR survive.
  2126.  
  2127. CLIDEBUG                Debug a program using the Shell interface. If
  2128.                         you want to give arguments to the program to
  2129.                         debug, INCLUDE THE COMMAND AND ITS ARGUMENTS
  2130.                         in double qoutes. Since a colon and an asterisk
  2131.                         is interpreted by COP as the beginning of a
  2132.                         comment, you MUST enclose these characters
  2133.                         in an additional pair of single quotes.
  2134.                         To simplify this, you might use the DEBUG
  2135.                         script.
  2136.                         CLIDEBUG always flushes the labels.
  2137.  
  2138. WBDEBUG                 Debug a program thru the workbench interface.
  2139.                         If you want to support a second icon which is
  2140.                         simulated to be clicked with the main program's
  2141.                         enclose THE MAIN AND THE SECOND ARGUMENT IN
  2142.                         DOUBLE QUOTES. DO NOT ADD ANY .INFO TO THE
  2143.                         NAME, even if you load an icon of project type.
  2144.                         The responsible program will be found and be
  2145.                         loaded.
  2146.                         WBDEBUG always flushes the labels.
  2147.  
  2148. SYMBOL                  Add the symbols of the given binary file to
  2149.                         the label buffer. To do so, you MUST support
  2150.                         the base address of the segment using
  2151.                         SEGMENT or FIRSTHUNK.
  2152.                         Adding of additional labels might be necessary
  2153.                         if you debug an overlayed program. COP cannot
  2154.                         load all labels on startup, since it is not clear
  2155.                         where the overlay nodes will be placed in memory.
  2156.                         Remember the base address of the program if loaded;
  2157.                         Later on, if the overlay nodes are present, reload 
  2158.                         the symbol table by FLUSH SYMBOL <progname>
  2159.                         FIRSTHUNK addr. 
  2160.  
  2161. FIRSTHUNK               Give the APTR to the first byte of the first hunk
  2162.                         to which the labels to be loaded belong.
  2163.                         Either FIRSTHUNK or SEGMENT MUST BE USED as an
  2164.                         additional argument if you use SYMBOL.
  2165.  
  2166. SEGMENT                 Give the BPTR, as available from LoadSeg(),
  2167.                         of the segment to which the labels to be loaded
  2168.                         by SYMBOL belong.
  2169.                         Either this or FIRSTHUNK IS REQUIRED for SYMBOL.
  2170.  
  2171. CALC                    Calculate the expression given. Everything COP's
  2172.                         EVAL command can evaluate is valid here, even
  2173.                         defined labels. So to read the value of ExecBase
  2174.                         using the Shell is quite easy:
  2175.                         COP CALC [AbsExecBase]
  2176.                         Note that this allows using COP as a symbol data-
  2177.                         base, e.g. to remember the system entry points.
  2178.  
  2179.                         COP CALC OpenLibrary
  2180.                         will give the offset of the OpenLibrary system
  2181.                         call, provided you added it using a DDT.
  2182.                         The only caveat is that COP will assume all
  2183.                         numbers are in DECIMAL unless preceeded by $.
  2184.                         (Different to how expressions are handled usually!)
  2185.                         The $ notation, however, may conflict with
  2186.                         shell variables, so enclose the argument, also
  2187.                         if it contains spaces, in double quotes.
  2188.  
  2189.  
  2190. If you want to build an icon to start COP from the workbench, use for
  2191. example the following tooltypes:
  2192.  
  2193. DISPLAY                 MUST be present to prevent COP from remote-
  2194.                         debugging mode.
  2195. GO                      MUST be present if you want to start COP.
  2196.  
  2197.  
  2198.  
  2199. DDT file                Setup COP's labels using a data description
  2200.                         table. The syntax of this file is descripted
  2201.                         below, and a default table "startup.ddt" is
  2202.                         included in this drawer. If you want to run COP
  2203.                         together with the macintosh emulator, you should
  2204.                         specify the macintosh-version of the ddt file
  2205.                         called MAC.ddt and the MACMODE command line
  2206.                         switch.
  2207.  
  2208.                         You should use this option in your startup-
  2209.                         sequence to load all default labels.
  2210.  
  2211.                         It is fine to call COP again with this option
  2212.                         if you want to add some labels, however, if you want
  2213.                         to reload the table, you should flush all the
  2214.                         old labels with the FLUSHALL option.
  2215.  
  2216. PRE file                Provide or create a precompiled version of a DDT
  2217.                         file. If this argument is given, COP tries first to
  2218.                         read the label database from the "pre" file. If
  2219.                         this file is not available, COP will read the usual
  2220.                         DDT file and create a "PRE" file for you. The ad-
  2221.                         vantage of precompiling "DDT" files is that they
  2222.                         are parsed much faster. Their format is, however,
  2223.                         private.
  2224.  
  2225. Of course, if COP is already present, the code loaded will get started and
  2226. will not be loaded again (and therefore, some options are useless in this
  2227. case !)
  2228.  
  2229. If you want to debug a Shell program, this command line would be nice:
  2230.  
  2231. COP CLIDEBUG "c:copy s:Startup-Sequence to '*'"
  2232.  
  2233. will debug the copy command in copying the startup-sequence to the console.
  2234. Please note the necessary quotes around the command line and the star.
  2235.  
  2236.  
  2237. To debug a Workbench progam, say the Shell-Icon, type:
  2238.  
  2239. COP WBDEBUG "SYS:Shell"
  2240.  
  2241.  
  2242. Debugging overlayed programs is a bit tricky. First load the program
  2243. itself, e.g. with
  2244.  
  2245. COP CLIDEBUG "SetVNC"
  2246.  
  2247. Now write down the address of the breakpoint when COP is entered.
  2248. Step thru the code until a new overlay segment is loaded. To do so,
  2249. set a breakpoint in the overlay manager, which will always be the first
  2250. hunk of the program. Then, load the symbols of the overlay code using
  2251.  
  2252. COP FLUSH SYMBOL "SetVNC" FIRSTHUNK 0x<addr>
  2253.  
  2254. where addr is the address of the breakpoint you wrote down before.
  2255.  
  2256. One caveat using overlays is that the structure of the overlay table
  2257. depends on the overlay manager the program uses. There are quite a lot
  2258. of them, however, COP only knows the default one supplied with the
  2259. linker BLink or SLink. As an example, the overlay structure of
  2260. DPaint II or COP (yes, that's me...) is private and is not supported
  2261. by COP. In this case, you cannot load symbols which are placed in the
  2262. overlay nodes, sorry.
  2263.  
  2264.  
  2265. If you want to use COP with the shapeshifter macintosh emulator, I suggest
  2266. the following command line:
  2267.  
  2268. COP FASTVBR NOMMU MACMODE DDT S:Mac.ddt
  2269.  
  2270. plus your prefered keymap and display settings. COP can be entered from
  2271. the macintosh finder interface thru the hot key, as usual. Once entered,
  2272. the hardware traps are captured by COP, not by the MacOs. However, the
  2273. system failures (except those generated by hardware traps) are still left
  2274. to the Os. This might change in a future release.
  2275.  
  2276.  
  2277.  
  2278. XII) Syntax of a data description table
  2279. -----------------------------------------------------------------------------
  2280.  
  2281. The data description table contains information about labels, that are
  2282. litaral names given to addresses to make code more readable. COP intro-
  2283. duces a new concept of label creation not available with any other de-
  2284. bugger.
  2285. The labels are sorted by "type", as there are:
  2286.  
  2287. -       absolute labels, refering to one static address in memory.
  2288.         This is the only type of label most debuggers support.
  2289.  
  2290. -       equates. Those are simply names for numerical constants and
  2291.         are never used in actual disassembling. You may use it, how-
  2292.         ever, in expressions (and, in a release to come, in the
  2293.         microassembler)
  2294.         Typical equates are offsets of fields in structures.
  2295.  
  2296. -       node relative labels. If COP finds a specific base pointer
  2297.         points to a named exec-node structure (e.g. a library), this
  2298.         type of label is used to generate a name for the offset from
  2299.         the base of the node to the piece of memory which is addressed.
  2300.         A typical case is a entry point in a library, but also the full
  2301.         structure of a library can be addressed like that. So the default
  2302.         ddt includes the whole structure of execbase and gfxbase.
  2303.         Since the linking is done in the run time, it is not necessary
  2304.         to open these nodes, and the nodes even does not need to exist in
  2305.         memory while creating the labels.
  2306.  
  2307. -       address relative. This type is currently not used, but is
  2308.         useful if a base register is setup to point to the data region
  2309.         of a program. Typically, this will be a5 or a4.
  2310.  
  2311. -       a guru equate. This special type is used for giving readable
  2312.         names to guru meditations and is never used by the disassembler,
  2313.         but by the REGS.G instruction - And therefore every time COP is
  2314.         entered by a crash.
  2315.  
  2316. -       bit definitons. Useful for giving readable names to bits, but
  2317.         not used by the disassembler (there are way to many of them).
  2318.  
  2319. -       New with version 1.52 of COP, lineA-emulators can be named, too.
  2320.         These traps are never used by the AmigaOs, but function as Os-
  2321.         calls for a macintosh or Atari-ST emulator.
  2322.         
  2323. The syntax of a ddt file is a strange mixture of the syntax of the CBM
  2324. .fd-files and assembler include files, so you can use your .FD-files
  2325. and include files WITHOUT ANY CHANGE, provided you use the CBM macros
  2326. defined in exec/types.i and provided that you do not use forward 
  2327. references, as they are not supported.
  2328.  
  2329. Entries in the DDT are
  2330. i)      COPDDT-commands, a superset of the commands in the .fd files.
  2331.         COPDDT-commands are preceeded by two hashmarks and MUST be placed
  2332.         in the very first column.
  2333. ii)     Pure labels and function entries are given by their names and must 
  2334.         placed in the first column of the file, like labels in assembly
  2335.         language. As a special case, a label might be followed by a
  2336.         EQU or SET opcode. The first produces an equate label with
  2337.         a given value, and the second is ignored by COP since it is
  2338.         only used to keep track of the included files.
  2339.         If no value is given for a label, the contents is taken from
  2340.         the offset-counter which can be set by ##offset or ##bias.
  2341.         The type of the labels can be set by a COPDDT command pre-
  2342.         ceeding the label, except for labels defined by EQU, which
  2343.         are always equates.
  2344.         A pure label without EQU will always increment the ##offset
  2345.         counter by a size which can be set by ##increment.
  2346. iii)    Pseudoassembler commands which are named like the default CBM-
  2347.         macros in the exec/types.i file. They mostly define a label of
  2348.         a type defined by some COPDDT command above, and the value
  2349.         is also taken from the ##offset counter. However, the 
  2350.         increment depends on the pseudoassembler command.
  2351. iv)     Comments are introduced by a colon or an asterisk like in 
  2352.         assembly language.
  2353.  
  2354. Here the COPDDT-commands:
  2355. ##node name             Setup the next labels as labels relative to the
  2356.                         node with the given name. Should be used for
  2357.                         library offsets.
  2358.  
  2359. ##vectors name          Identical to ##node, except that it defines function
  2360.                         vectors. The label values should be negative.
  2361.  
  2362. ##guru                  Setup the next labels as numbers of guru-meditations
  2363.  
  2364. ##absolute              Setup the next labels as absolute addresses.
  2365.                         Never used with the Amiga-Os, since there is only
  2366.                         one fixed address (AbsExecBase), which is already
  2367.                         defined as a label. However, this type is used for
  2368.                         the low-memory variables of the macintosh Os
  2369.                         (what a horror !)
  2370. ##relative <expr>       Setup the next labels as offsets to the address
  2371.                         given by <expr>, which need not to be a number,
  2372.                         and may contain other evaluable labels. However,
  2373.                         forward references are not supported.
  2374. ##equate                Setup the next labels as pure equates.
  2375. ##linea                 Setup the next labels as line-a traps, as used by
  2376.                         the MacOs and Atari ST. Useless for the Amiga.
  2377. ##offset <expr>         Set the offset of the next labels relative to their
  2378.                         base. With amiga only useful for labels of ##node, 
  2379.                         ##relative or ##equate type, since there is only 
  2380.                         one fixed absolute address in the amiga and no
  2381.                         line-A emulators. Useful for ##absolute and ##linea
  2382.                         under MacOs and Atari ST.
  2383. ##bias <expr>           Set the negative offset of the next labels. Will
  2384.                         be used by .fd files to set library entries and is
  2385.                         identical to ##offset except that the value of
  2386.                         <expr> is negated (sign-changed).
  2387. ##increment <expr>      Sets the default incrementation value of the offset
  2388.                         counter. Should be set to -6 prior to including
  2389.                         .fd files, since each entry takes up 6 bytes, and
  2390.                         libraries grow to lower addresses. If you want to
  2391.                         define a table of LONGs, set the increment to 4.
  2392.                         This value is added to the ##offset counter every
  2393.                         time a pure label without a size gets defined.
  2394.                         Function entries in a .fd file are "pure labels"
  2395.                         in the sense of COPDDT.
  2396. ##base name             Define the name of a library base. Used by the
  2397.                         .fd files. Will define a label of offset
  2398.                         zero.
  2399. ##include name          Include another file in the ddt. There is NO
  2400.                         check for cyclic dependence, so WATCH OUT !
  2401.                         If the name contains spaces, include it in double
  2402.                         quotes.
  2403. ##end                   End an ddt file. Also used by .fd files.
  2404.  
  2405. ##private               Quietly ignored by COP, only used in fd-files
  2406. ##public                Also ignored.
  2407.  
  2408. Empty lines or lines starting with a colon or a star are read as comment-
  2409. lines and are ignored, too.
  2410.  
  2411. Label definitions:
  2412. A "pure" label is defined by giving only its name starting in the
  2413. first row of a line, like this:
  2414.  
  2415. ##absolute 8            ; Labels are of absolute type
  2416. ##increment 1           ; Set the increment of pure labels
  2417. mylabel                 ; comments are welcome ! This label gets the value 8
  2418. nextlabel               ; and this one 9, since the increment is 1
  2419.  
  2420. The value of the label to be defined is contained in the offset counter,
  2421. and it will be incremented by the value in ##increment every time.
  2422.  
  2423. Since fd-files contain functions and arguments, a (pure) label name is 
  2424. cut in the first occurance of a left bracket:
  2425.  
  2426. myFunc(foo)(a0)         ;this label gets called "myFunc" and got the value 10
  2427.  
  2428. Labels can be set to given values using the EQU pseudoassembler directive.
  2429. These "unpure" labels neither need the offset counter nor increment it.
  2430. All labels generated by this syntax are of equate type, regardless of the
  2431. previous COPDDT command.
  2432. TRUE            EQU     1       ; an equate. Can be evaluated, but is
  2433.                                 ; not used by the disassembler
  2434.                                 ; the offset counter is untouched, too
  2435.  
  2436.  
  2437. The set directive of assembly language is known, but will be ignored without
  2438. any checking:
  2439. ARGC            SET     §       ;in assembly language syntactically wrong,
  2440.                                 ;but completely ignored by COP.
  2441.  
  2442. The same goes for lines between a MACRO and a ENDM directive, since
  2443. COP does not support macros (and I think never will..).
  2444.  
  2445.  
  2446. Pseudoassembler commands:
  2447.  
  2448. They are called "pseudoassembler commands" cause they define labels in
  2449. assembly style, rather than .fd style. All macros in exec/types.i are
  2450. "emulated". The type of labels generated by them depend on the pre-
  2451. ceding COPDDT command, like ##absolute will generate absolute labels.
  2452. The value of the labels is given, as above, by the offset counter. This
  2453. counter can be set with the ##offset COPDDT command or the STRUCTURE
  2454. directive, and will be incremented by a value determinated by the
  2455. directive, unlike pure labels, which cause the value of ##increment
  2456. to be added.
  2457.  
  2458. Pseudoassembler directives MUST NOT start at the beginning of a line, but
  2459. MUST be preceded by spaces or TAB characters, like in assembly language.
  2460.  
  2461. Known directives are:
  2462.  
  2463.         STRUCTURE name,<expr>
  2464. Define a new label of given name as the base of a structure. The offset
  2465. counter will be initialized by <expr>, that is, the structure containes
  2466. unnamed field in the beginning of the size given by offset. The value
  2467. of the label defined will be zero relatively to a base, which can be
  2468. setup by ##node or ##relative. Defining an absolute structure does not
  2469. make much sense in this system.
  2470.  
  2471.         STRUCT name,<expr>
  2472. Define a substructure in a structure, that is, generate a label of given
  2473. name with the value as the value of the offset counter, and of type
  2474. given by a preceding COPDDT command. The offset counter is incremented by
  2475. the value of <expr> afterwards.
  2476.  
  2477.         LABEL name
  2478. Define a label with the value of the offset counter, which is not
  2479. incremented at all.
  2480.  
  2481.         UBYTE name[,<expr>]
  2482. Define one single byte, or array of bytes by generating a label. Its 
  2483. value is given by the offset counter, and its type is given by a preceding
  2484. COPDDT command. The offsetcounter is incremented by 1, if the expression
  2485. is ommited, or 1x<expr> to generate an array.
  2486.  
  2487.         BYTE name[,<expr>]
  2488. Same as byte.
  2489.  
  2490.         UWORD name[,<expr>]
  2491. Define one single word, or array of words. Works like BYTE, but the offset
  2492. counter is incremented by 2 or 2x<expr>. If the offset counter is odd, it
  2493. is rounded to the next even number.
  2494.  
  2495.         WORD name[,<expr>]
  2496. Same.
  2497.  
  2498.         BOOL name[,<expr>]
  2499. Same.
  2500.  
  2501.         ULONG name[,<expr>]
  2502. Defines one long word, or array of longwords. Increments by 4 or 4x<expr>
  2503. and alignes offset counter.
  2504.  
  2505.         LONG name[,<expr>]
  2506. Same.
  2507.  
  2508.         APTR name[,<expr>]
  2509. Same.
  2510.  
  2511.         CPTR name[,<expr>]
  2512. Same.
  2513.  
  2514.         FPTR name[,<expr>]
  2515. Same.
  2516.  
  2517.         FLOAT name[,<expr>]
  2518. Same.
  2519.  
  2520.         DOUBLE name[,<expr>]
  2521. Defines a IEEE-double precision entry or array. Increments the offset counter
  2522. by 8 or 8x<expr> and alignes it.
  2523.  
  2524.         UQUAT name[,<expr>]
  2525. Same.
  2526.  
  2527.         QUAT name[,<expr>]
  2528. Same.
  2529.  
  2530.         EXTENDED name[,<expr>]
  2531. Introduced in COP, defines MC68881 extended precision entry or array.
  2532. Increments the offset by 12 or 12x<expr> and aligns it.
  2533.  
  2534.         ALIGNWORD
  2535. Explicitly aligns the offset counter to the next word.
  2536.  
  2537.         ALIGNLONG
  2538. Align the offset counter to the next long word.
  2539.  
  2540.         ENUM [<expr>]
  2541. Initializes the ENUM-counter by the given value. Does not generate any label.
  2542.  
  2543.         ENUMITEM name
  2544. Generate a label of equate type. The value is given by the equate counter,
  2545. which will be incremented by one after the definition.
  2546.  
  2547.         BITDEF pre,post,<expr>
  2548. Generate two (!) labels. The first is of bit-type and will be named 
  2549. "preB_post" and will have the value given by <expr>. The second will be
  2550. named "preF_post", is of equate type and has the value of 1 << <expr>.
  2551.  
  2552.         IFD,IFND,ENDC
  2553. Ignored by COP
  2554.  
  2555.         INCLUDE
  2556. Ignored by COP. To include something, use the COPDDT command ##include.
  2557. This was mainly done to avoid unnecessary includes and to give the
  2558. control what will be included to the main DDT-file.
  2559.  
  2560.         LIBINIT
  2561.         LIBDEF
  2562. Also ignored by COP
  2563.  
  2564.         MACRO
  2565.         ...
  2566.         ENDM
  2567. Lines between MACRO and ENDM are ignored by COP, since it does not support
  2568. macros.
  2569.  
  2570.  
  2571. As noted above, the set of supported commands was choosen in a way such
  2572. that all orignal CBM-includes and .fd files can be used without a change.
  2573. Support of other style assembly include files (like DevPac's rs-counter)
  2574. are not supported and never will.
  2575. It is, however, sometimes necessary to explicitly define labels on one's
  2576. own. This happens mostly if the orginal include file defines useful
  2577. constants that should be relative to a base as equates. An example is
  2578. the definition of DOSBase in dos/dosextens.i. Since you cannot make
  2579. all labels relative to DOSBase, one must take this definition out
  2580. of the file.
  2581. Defining DOSBase as equates and not as node relative is of course not
  2582. illegal in COP, but will be of no use for the disassembler since it 
  2583. ignores equates (there are too many of them to be of any use). This was,
  2584. as a second example, necessary in defining the hardware offsets. 
  2585. Originally given as equates, they are now relative to the base of 
  2586. the custom chip set. See the included example ddt file. 
  2587.  
  2588. XIII) Precompiled files
  2589. -----------------------------------------------------------------------------
  2590.  
  2591. The 1.60 version of COP introduces the option to "precompile" DDT files for
  2592. faster startup. If you give a name of a pre-file on the command line with
  2593. "PRE filename", additional to the "DDT" keyword, COP will try first to load
  2594. all labels from this pre-compiled header. If successfully, the DDT keyword
  2595. will be ignored. If the "PRE" file is not available, COP will parse the "DDT"
  2596. file as usual and will create this "PRE" file afterwards so it is available
  2597. for later use. 
  2598.  
  2599. The main advantage of precompiled "DDT" files is that they are way faster to
  2600. load, no parsing and no syntax check is required. The data format is 
  2601. completely internal, please do not touch these files - they are purely for
  2602. COPs use and maintained completely by COP itself.
  2603.  
  2604. One caveat of "PRE" files is that they aren't updated automatically if you
  2605. change the original "DDT" file and there can be ONE and ONLY one "PRE" file
  2606. for the complete set of macros. Writing a partial set of label definitions
  2607. in a pre-file isn't possible. Either all or nothing!
  2608.  
  2609. The consequence is that you:
  2610.  
  2611. - should delete the "PRE" file manually if you made changes to the source DDT
  2612. file. COP will then re-create the "PRE" file the next time it is required.
  2613.  
  2614. - should only precompile the first DDT file that is loaded, that is the
  2615. "startup.ddt" file. Since this is the only DDT file in most applications,
  2616. that's not a restriction. DO NOT TRY to write PRE files for DDT files you
  2617. include afterwards - as they will not only contain the label definition in
  2618. the additional DDT file but in ALL DDT files. Loading these labels later on
  2619. might confuse COP. 
  2620.  
  2621. As a rule of thumb: Only the Startup.DDT file should be precompiled.
  2622.  
  2623.  
  2624. XIV) Shell scripts
  2625. -----------------------------------------------------------------------------
  2626.  
  2627. Three shell scripts are provided with COP, to simplify work:
  2628.  
  2629. -Debug          Accepts a program name (full path required) and its
  2630.                 arguments to be debugged by COP. Will load the program
  2631.                 as if started from the Shell and set a breakpoint at the
  2632.                 first hunk.
  2633.  
  2634. -WBDebug        Accept a workbench program and, optionally, a secondary
  2635.                 selection, without .info. Starts the program and supplies
  2636.                 the arguments thru a WBStartup message, as if started from
  2637.                 the workbench.
  2638.  
  2639. -Calc           Evaluates the supplied argument. Labels are welcome, and
  2640.                 the radix defaults to decimal. However, problems may
  2641.                 arise if you use hex numbers cause the $ can cause
  2642.                 conflicts with defined shell variables. In this case,
  2643.                 enclose the argument in double quotes.
  2644.  
  2645.  
  2646. XV) COP and MuForce/Enforcer/Cyberguard
  2647. -----------------------------------------------------------------------------
  2648.  
  2649. COP 1.56 and up supports the Enforcer program if run on a MC68020 or MC68030, 
  2650. it supports MuForce on any processor. It *might* support the Cyberguard, too,
  2651. but the 040 exception handler of this program is faulty and I won't recommend
  2652. this program for that reason.
  2653.  
  2654. There are two ways to run these tools together with COP, depending on which
  2655. output you need.
  2656.  
  2657. Method I):    Start MuForce first, then run COP. 
  2658. Don't remove it later. This is the recommended way.
  2659.  
  2660. This will redirect Enforcer hints directly to COP. Faulty programs will cause
  2661. a bus error exception, and you're now able to debug these programs directly.
  2662. The enforcer won't cause any ouput, running "Sushi" is not necessary.
  2663.  
  2664. If you made COP resident, the COP invokation line in the startup-sequence
  2665. should contain the "RESTOREVBR" keyword, too. This is needed because the
  2666. order of installation will be different once COP is resident - MuForce
  2667. will now install on top of the resident copy of COP, hence, messing COP's
  2668. vector base register. This option will re-direct the vector base to COPs
  2669. interal base.
  2670.  
  2671. Do NOT use the CAPTURESUPER option of MuForce, and add the NOGURUPATCH
  2672. option. This will keep MuForce out from vectors required by COP.
  2673.  
  2674.  
  2675. Method II):    Start COP first, then load MuForce. It is possible to
  2676. remove MuForce later on, however.
  2677.  
  2678. The MuForce will work as usual with this setting, COP won't interfere in this
  2679. case.
  2680.  
  2681. However, as soon as COP is entered, it will complain about its vector base
  2682. being messed up by MuForce. You might want to simply ignore this warning.
  2683.  
  2684.  
  2685. MuForce and the FASTVBR option.
  2686. --------------------------------
  2687.  
  2688. That's a story of its own. If you want to run COP before MuForce, the 
  2689. FASTVBR option IS REQUIRED. This is simply due to the fact that otherwise
  2690. COP will locate the virtual vector base in the first 1K/4K of memory as 
  2691. usual - and this memory isn't available with MuForce.
  2692. Quite the same goes for keeping COP resident - it's in this case already
  2693. present when MuForce gets loaded, so FASTVBR is mandatory, too.
  2694.  
  2695. There's actually little reason NOT to use the FastVBR option except to keep
  2696. some badly written programs - mostly games - working.
  2697.  
  2698.  
  2699.  
  2700.  
  2701. XVI) COP and the 68060 / 68040
  2702. -----------------------------------------------------------------------------
  2703.  
  2704. The 1.61 release of COP should be able to support the 68060 processor - 
  2705. however, as most of the support code is untested, it is not quite clear if
  2706. everything works as expected. 
  2707.  
  2708.  
  2709. The following rules apply to COP and the 68060:
  2710. -----------------------------------------------
  2711.  
  2712. - Add the SET60 keyword to the command line option. That tells COP explicitly
  2713.   that it has to deal with the '060 processor. The execbase "AttFlags" flags
  2714.   field does not necessarely monitor the '060 processor correctly.
  2715.  
  2716. - Add the NOMMU keyword. The MMU operation is vital for '060 and '040 based
  2717.   systems, to mask certain regions of memory as "non-cacheable" as needed for
  2718.   DMA transfer and other reasons.
  2719.  
  2720. - Add the NOEMU keyword. COP will try to bypass the emulator traps to the
  2721.   68060 library. It is, however, not quite clear if this works as expected.
  2722.  
  2723. - Load the 68060 library BEFORE COP is run. This is usually done by the
  2724.   68060.library that gets loaded by SetPatch.
  2725.  
  2726. - Start COP after CyberGuard or Enforcer. This is the recommended way, but
  2727.   it is not yet quite clear if this works like it should. COP has to emu-
  2728.   late the access to the AbsExecBase location at address four, and this
  2729.   emulator code is quite tricky for the 68060. Even though I tried my best
  2730.   to test it with my 68030, it is not clear whether it works like it should.
  2731.  
  2732. - Add the FASTVBR option if you want to run COP before Enforcer/CyberGuard,
  2733.   or if you want to keep COP resident. Do not specify it otherwise.
  2734.  
  2735.  
  2736. COP and the 68040
  2737. -----------------
  2738.  
  2739. - Add the NOMMU keyword. It is required for proper DMA operation of '040
  2740. systems.
  2741.  
  2742. - Add the NOEMU keyword. COP will try to bypass the emulator traps to the
  2743.   68040.library. 
  2744.  
  2745. - Run COP after MuForce. Don't use the Enforcer because its design is too
  2746.   static to allow proper operation. Don't use CyberGuard because its
  2747.   exception handler is not working properly.
  2748.  
  2749. - Run COP after loading the 68040.library. This is usually done by the 
  2750.   SetPatch command anyways.
  2751.  
  2752. - Specify the FASTVBR keyword if you run COP before Enforcer, or if you
  2753.   want to keep it resident. Do not specify it otherwise.
  2754.  
  2755.  
  2756. XVII) Plans
  2757. -----------------------------------------------------------------------------
  2758.  
  2759. - Making the chip-buffer more transparent
  2760. - Better memory chunk support
  2761. - better disassembler, parts are already working
  2762. - a microassembler (in preparation)
  2763. - wildcards in node matching
  2764. - bitdefs should really be relative to something, but system includes
  2765.   do not give the information
  2766. - more macintosh support, thru a mac INIT.
  2767. - a MMU table lister ?
  2768.  
  2769. In the next time, there won't be...
  2770.  
  2771. - a floppy or harddisk support. There are so many filing systems and device
  2772.   drivers and I think using the 20K or more needed to implement this stuff
  2773.   can be used a better way.
  2774.  
  2775.  
  2776. XVIII) Final remarks
  2777. -----------------------------------------------------------------------------
  2778.  
  2779. COP should not be crunched or compacted since COP uses an internal overlay
  2780. format to load the debugger code if needed. To enter COP later with a
  2781. COP DISPLAY GO or equiv. the startup segment is loaded to memory only.
  2782.  
  2783. I wrote COP six years ago (1993) to find the reason of many crashes that
  2784. occured in my system. I found that most debuggers I knew were not
  2785. able to debug a system with execbase out of order or input.device crashed.
  2786. The first debugger I used to accomplish this task was the ROMWack, a very 
  2787. simple, but nevertheless useful one. 
  2788. It took a year to complete the first release of COP, so I can appreciate a
  2789. programmer's work and you should do so, too. Please use COP to find bugs
  2790. in your own code only, whenever every other debugger fails, e.g.
  2791. interrupt code or reset resident code. Use COP to find the reason of
  2792. system crashes that crash normal debuggers, but PLEASE DO NOT USE COP TO
  2793. FUMBLE IN FOREIGN CODE, since this will prevent people from writing
  2794. good programs. Not everthing is public domain today, support the good work
  2795. and buy software.
  2796.  
  2797. This program is decidated to all the bubbling idiots that debug own code
  2798. up to 4 a.m. in the morning ("It MUST work...").
  2799.  
  2800.  
  2801. P.S.: The reason for the crashes, if anybody cares, is the broken expansion
  2802. port in my A2000. Replacement motherboards are no longer accepted, because
  2803. I got a replacement now... (-;
  2804.  
  2805.  
  2806. Thank goes to:
  2807. -Oliver Spaniol for letting me debug this proggy on his '060.
  2808. -Mark Watson for his help with the '060 code.
  2809. -Werner Müller for providing a 040 and a (working) 6.2 motherboard for
  2810.  a bargain.
  2811.  
  2812.  
  2813.  
  2814. If you like this program, if you have any suggestions, if you want to get a
  2815. newer release of COP, write to:
  2816.  
  2817.  
  2818. Thomas Richter
  2819. Rühmkorffstraße 10 A
  2820.  
  2821. D-12209 Berlin
  2822.  
  2823. Germany
  2824. -------
  2825.  
  2826. or send electronic mail to
  2827.  
  2828. thor@math.tu-berlin.de
  2829.  
  2830.  
  2831. There's also a web site you should try:
  2832.  
  2833. WWW:    http://www.math.tu-berlin.de/~thor/thor/index.html
  2834.  
  2835.  
  2836.  
  2837. It might be possible that COP does not work on YOUR Amiga, some parts of
  2838. the code are very tricky and hardware dependent. I tried to avoid such
  2839. problems, but one can never know. If COP fails on your computer, send
  2840. me a mail and descripe as best as possible your problems. However, debugging
  2841. by mail is a complicate task....
  2842.  
  2843.  
  2844. Thank you for reading and have a good time...
  2845.  
  2846.         THOR    (December 1999)
  2847.