home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / barfly / docs / barfly.man < prev    next >
Text File  |  1977-12-31  |  186KB  |  6,421 lines

  1. This file documents Barfly, a development system for AmigaOS V2.04 or
  2. newer.
  3.  
  4.  
  5.  
  6.                               Barfly 1.0
  7.  
  8.        An Intuition controled Debugger and Optimizing Assembler
  9.  
  10.                   Copyright (c) 1989-94 Ralph Schmidt
  11.  
  12.                              - Shareware -
  13.  
  14. Basic Informations
  15. ******************
  16.  
  17. Copyright and other legal stuff
  18. ===============================
  19.  
  20.    Copyright (c) 1989-94 Ralph Schmidt
  21.  
  22.    Permission is granted to make and distribute verbatim copies of this
  23. manual provided the copyright notice and this permission notice are
  24. preserved on all copies.
  25.  
  26.    No guarantee of any kind is given that the programs described in
  27. this document are 100% reliable. You are using this material at your
  28. own risk. The author *can not* be made responsible for any damage which
  29. is caused by using these programs.
  30.  
  31.    Permission is granted to include this package in Public-Domain
  32. collections, especially in Fred Fishs Amiga Disk Library (including
  33. CD-ROM versions of it).  The distribution file may be uploaded to
  34. Bulletin Board Systems or FTP servers. If you want to distribute this
  35. program you *must* use the original distribution archive `Barfly.lha'.
  36.  
  37.    *None* of the programs may be included or used in commercial programs
  38. unless by written permission from the author.
  39.  
  40.    *None* of the programs may be modified in any way. This especially
  41. includes changing the copyright notices or removing any of the Shareware
  42. restrictions.
  43.  
  44.    *None* of the programs may be used on any machine which is used for
  45. the research, development, construction, testing or production of
  46. weapons or other military applications. This also includes any machine
  47. which is used for training persons for *any* of the above mentioned
  48. purposes.
  49.  
  50.    *None* of the programs may be used by more than the registrated
  51. owner.
  52.  
  53. Registration
  54. ============
  55.  
  56.    As you may have noticed in the copyright I'm working for five years
  57. at Barfly. It has always consumed and will continue to consume a large
  58. amount of my time.
  59.  
  60.    I cannot afford just working for fun. Thus, I decided to release
  61. Barfly as Shareware. I had already tried to release Barfly as a
  62. commercial product but the story behind it is more than sad. To sum
  63. it...german Amiga software companys aren't worth any time...`they suck'.
  64. Some people may think the price is too high for a Shareware product but
  65. i think that BAsm is as powerful as the 2 main available commercial
  66. Assemblers...if not more powerful if you compare the speed and the
  67. optimize functions;there's no commercial Debugger available that can
  68. compete with BDebug.  I've used Barfly myself for commercial Amiga
  69. applications.  Cyberstorm 060, Z3-Fastlane device, CDRive,
  70. SCSIConfig,...
  71.  
  72.    The unregistered version of Barfly pops up the About requester at
  73. the start and has some functions disabled:
  74.      Assembler:
  75.       o only 8192Bytes large code possible
  76.       o the Section commands aren't available
  77.      Debugger:
  78.       o Only 1 Window per Object
  79.       o Enforcer,CyberGuard Catch not available
  80.       o Task Catch not available
  81.       o Crashed Task Catch not available
  82.       o Limited Step count(about 150-200 Steps)
  83.  
  84.    Registered users will be shipped a disk with the newest public
  85. release of Barfly, along with a personalized, so-called "keyfile". It
  86. enables all the missing features and disables the Shareware reminders.
  87. This keyfile will work with all future releases of Barfly, so you can
  88. simply download the latest version from your local bulletin board
  89. without having to wait weeks for your update passing through the slow
  90. mail channels. The keyfile `must not' be distributed in any way.
  91.  
  92. The fee for a Barfly registration is
  93.       70.- DM  (D-Mark),
  94.       70.- SFr (Schweizer Franken),
  95.      230.- FF  (French Francs),
  96.       50.- US$ (US Dollar)
  97.  
  98.    The fastest, cheapest and easiest way to register is put the money
  99. together with the filled registration form into a letter and send it to
  100.  
  101.    Please allow 2-8 weeks delivery for the registrated version.
  102. Currently I am very busy with my civil service and working for Phase5 so
  103. please be patient.
  104.  
  105.      Ralph Schmidt
  106.      Kleiner Hellweg 4
  107.      33154 Salzkotten
  108.      FR Germany
  109.      Phone: +49-5258-5637
  110.      E-Mail: laire@mises.uni-paderborn.de
  111.         Irc: Laire on #amiga,#amigager
  112.  
  113. Introduction
  114. ************
  115.  
  116. Purpose
  117. =======
  118.  
  119.    BDebug is an Intuition controled multi-task system Debugger for OS
  120. 2.04 and newer.
  121.  
  122.    You can use BDebug to debugging your programs, catching tasks,
  123. reseach Enforcer and CyberGuard hits, follow Source-Level Informations
  124. and other advanced functions.  The Debugger supports assemblers, SAS C,
  125. Dice and GCC.
  126.  
  127. Some of BDebug's features are:
  128.  
  129.    * font-sensitive, resizable and Style Guide compliant GadTools GUI
  130.  
  131.    * Object-Oriented that results in a low learning curve
  132.  
  133.    * Supports 68000...68060 and the FPUs
  134.  
  135.    * Can debug multiple tasks at the same time
  136.  
  137.    * Not limited by the amount of window objects.
  138.  
  139.    * highly configurable
  140.  
  141.    * keyboard support
  142.  
  143.    BAsm is a very fast optimizing Assembler for OS 2.04 and newer.
  144.  
  145. Some of BAsm's features are:
  146.  
  147.    * 68000-68060, 6888x
  148.  
  149.    * Very Fast
  150.  
  151.    * Include and Incbin Cache
  152.  
  153.    * Strong Optimizer with Multi-Pass Optimizing
  154.  
  155.    * High Level Macros
  156.  
  157.    * ARexx
  158.  
  159.    * Supports OS 2.04 and OS 3.0 Hunks
  160.  
  161.    * SAS D1 Source Level Format
  162.  
  163. System requirements
  164. ===================
  165.  
  166.    Barfly requires Amiga operating system version 2.04 or better.
  167.  
  168.    Kickstart 1.3 is *not* supported; this operating system is considered
  169. obsolete.
  170.  
  171.    Barfly requires at least one megabyte of RAM to run.  A hardisk or a
  172. faster CPU is not required but increase performances and comfort, of
  173. course.
  174.  
  175. Installation
  176. ============
  177.  
  178.    It is really easy to install Barfly:
  179.  
  180.    1. Copy the the binary and the icon (called "BDebug" and
  181. "BDebug.info")   to any directory.
  182.  
  183.    2. Copy the the binary and the icon (called "BAsm" and "BAsm.info")
  184. to any directory.
  185.  
  186.    Then copy the supplied configuration files from "s/Barfly/#?" to "S:"
  187. directory of your system partition or create env:Barflypath with the
  188. path to a directory that contains Barfly/#?.
  189.  
  190. Other topics
  191. ************
  192.  
  193. Updates
  194. =======
  195.  
  196.    Whenever a new release of Barfly gets released, I will post some
  197. information in the appropriate newsgroups of some electronic networks.
  198. The new archive will soon be available on many bulletin boards and on
  199. all `AmiNet' FTP servers. Major releases will also come with some PD
  200. disks, especially on Fred Fish's collection.
  201.  
  202.    As mentioned above, registered users will neither need a new keyfile
  203. nor a special personalized program version. They can use all new
  204. features immediately.
  205.  
  206. Support
  207. =======
  208.  
  209.    If you have some questions, comments, suggestions or even flames,
  210. please feel free to contact me at one of the following addresses. If
  211. you send your letter via e-mail, there's a good chance for getting a
  212. quick reply.
  213.  
  214.      Snailmail: Ralph Schmidt
  215.                 Kleiner Hellweg 4
  216.                 33154 Salzkotten
  217.                 FR Germany
  218.      
  219.          Phone: +49-5258-5637
  220.      
  221.         E-Mail: laire@mises.uni-paderborn.de
  222.            Irc: Laire on #amiga, #amigager
  223.  
  224. History
  225. =======
  226.  
  227.    * 0.0 - 1.0
  228.      not released
  229.  
  230. Future
  231. ======
  232.  
  233. Here are some ideas for future versions of BDebug:
  234.  
  235.    * Full Source Level support for GCC and perhaps SAS.
  236.  
  237.    * Better BDebug Arexx support...the current one is a bad excuse.
  238.  
  239.    * Mungwall Trace methods.
  240.  
  241.    * Automatic Refresh of some Windows(Task Window...)
  242.  
  243.    * Amigaguide file mode in the autodocs functions.
  244.  
  245.    * Highlight changed registers
  246.  
  247.    * Better documentation.
  248.  
  249.    * BAsmOption for the easy BAsm options configuration.
  250.  
  251.    * Other things i'm too lazy to mention now.
  252.  
  253. Important:
  254.      There is absolutely NO guarantee that these features will ever be
  255.      implemented. So don't be disappointed, if they aren't in the next
  256.      version.
  257.  
  258. Acknowledegments
  259. ================
  260.  
  261. Thanks must go to:
  262.  
  263.    - Dirk Leschner, Frank Jakobs
  264.  
  265.      for being my best friends
  266.  
  267.    - Matthias Scheler
  268.  
  269.      for his manual design and Filer.
  270.  
  271.    - S.Schaem, Børge Nøst, Alexis Wilke, Michael B. Smith, Marc Heuler
  272.  
  273.      for their superb betatesting efforts
  274.  
  275.    - Mike Schwartz
  276.  
  277.      for a lot suggestions to improve basm. Sad he has left the Amiga
  278.      community 2 years ago.
  279.  
  280.    - Stefan Becker
  281.  
  282.      for Toolmanager and being a nice guy.
  283.  
  284.    - Christoph Wolf
  285.  
  286.      for DynamiCache and being a nice guy.
  287.  
  288.    - Brian Cerveny(Redwine)
  289.  
  290.      for Grapevine and being a nice guy.
  291.  
  292.    - All my IRC friends.
  293.  
  294.      for many great hours. Thanks!
  295.  
  296.      Andrew Denton(Guardian), Kenneth Dyke(Nyx), Bill Coldwell(Cryo),
  297.      Brian Cerveny(Redwine), Joseph Hillenburg(xterm), Scott
  298.      Ellis(ScottE), Chris Wichura(Caw), John Wiederhirn(John\_W), Mike
  299.      Schwartz(mykes), Markus Illenseer(ill), Petra Zeidler(stargazer),
  300.      Michael van Elst(mlelstv), Holger Lubitz(holgi), Ralph
  301.      Babel(rbabel), Seth Harman(Budha) and a lot guys i haven't
  302.      mentioned here.
  303.  
  304.    - Chris Schneider and Urban D. Mueller
  305.  
  306.      for some suggestions 2-3 years ago and installing Aminet.
  307.  
  308.    - Michael "billy" Böhnisch
  309.  
  310.      for his cleanup on MakeBarflyFD 2-3 years ago.
  311.  
  312.    - Steve Wright
  313.  
  314.      for designing the icons 2 years ago.
  315.  
  316. And of course to all the other Beta testers and registered users.
  317.  
  318.    The V40 Includes can be ftp'ed from the FTP-Server.
  319.  
  320.    ftp.rz.uni-wuerzburg.de: pub/amiga/frozenfish/bbs/com
  321.  
  322.    A superb Linker "lk" by Alex Wilke should be soon availble on Aminet.
  323.  
  324.                               BDebug 1.0
  325.  
  326.                     An Intuition controled Debugger
  327.  
  328.                   Copyright (c) 1989-94 Ralph Schmidt
  329.  
  330.                              - Shareware -
  331.  
  332. Usage of BDebug
  333. ***************
  334.  
  335. The Command Window
  336. ==================
  337.  
  338. Debugger Philosophy
  339. ===================
  340.  
  341.    BDebug is a multitasking Debugger that supports the Motorola
  342. processors 68000...68060 and 68881...68882.  The Debugger allows to
  343. debug unlimited tasks parallel.  Because of the Debugger's complexity
  344. BDebug was designed in an object-oriented way to allow an easy and
  345. comfortable way to use it.  The register window `REGWindow' is the Root
  346. class of the task object that can be expanded by several subclass
  347. windows.  Every subclass window has privat menus and inherits the
  348. public menus of its father object.
  349.  
  350. Debug Methods
  351. =============
  352.  
  353.    The Debugger offers a variety of different Debug methods that can be
  354. activated by menu or gadget.
  355.  
  356. Debug Task
  357. ..........
  358.  
  359.    is used to select a task you wann to debug. If you doubleclick on a
  360. task a `REGWindow' and a couple of information windows opens.  Which
  361. type and how many are opened depends on the current configuration.
  362. After the task could be stopped the contents of the `REGWindow' and all
  363. other information windows gets refreshed.  If the task is in the `Wait'
  364. state the task is stopped when it gets a signal.
  365.  
  366.                          Task Listview Layout
  367.  
  368.                                    
  369.                 Taskaddress & Priority & Status & Name
  370.  
  371.                         Process Listview Layout
  372.  
  373.                                    
  374.       Taskaddress & Priority & Status & Name[CLI Number,CLI Name]
  375.  
  376.    You should know what task you can stop and what kind of task should
  377. never be stopped. For example the Input.device should never be stopped.
  378.  
  379. Debug File
  380. ..........
  381.  
  382.    is used to load and stop a program.  This function is equal to the
  383. bdebug cli startup with the exception that you can enter the parameter
  384. in a requester.  If no error occur all configurated windows are opened
  385. and the PC stops at the defined programstart breakpoint that normally
  386. points to the first command of the program.
  387.  
  388. Debug Next Task
  389. ...............
  390.  
  391.    is used to debug the next task that is opened.  The Debugger waits
  392. until another task is created by AddTask and a couple of information
  393. windows opens.  Which type and how many are opened depends on the
  394. current configuration.  After the new task was caught the pc points to
  395. the beginning of the task and `Catch Next Task' is disactivated.  To
  396. catch a program that is started from the WV you have to use `Debug Next
  397. Task' to catch the WB Startup Task `WBL' that starts the program.  Now
  398. you have to activate `Debug Next Task' again and let the current task
  399. run.  After a short time the task `WBL' ends and the program's task is
  400. caught.
  401.  
  402.      You should avoid to start a new task between the 2 `Debug Next
  403.      Task' phases because it's easy to catch the wrong one.
  404.  
  405.  
  406.      You should notice that `AddTask' is patched and points to a new
  407.      routine. Thus you should be careful with programs that also patch
  408.      `AddTask'. Furthermore it's useful to know in what sequences these
  409.      patches have to be removed.  The Debugger can only be closed when
  410.      all patched system function that were installed after the Debugger
  411.      was started are removed.
  412.  
  413.  
  414.      If you start a program in the shell without `c:Run' no new task is
  415.      created. Instead the program is run as a subroutine in shell's
  416.      task so you can't catch the task that easy.
  417.  
  418.  
  419. Debug Crashed Task
  420. ..................
  421.  
  422.    is used to catch tasks that crash so you track down the bug location
  423. a lot easier. If the system itself doesn't run anymore you shouldn't
  424. expect that bdebug still runs because it depends on a working system.
  425. If a task crashes and the option `Debug Crashed Task' is activated a
  426. couple of information windows opens. Which type and how many are opened
  427. depends on the current configuration.  `Task Held Requester'.
  428.  
  429. Catch Enforcer Hit
  430. ..................
  431.  
  432.    is used to tell the Debugger to stop the task it controls when an
  433. Enforcer or CyberGuard hit happens.  Unfortunately the Debugger can't
  434. always stop the task at exactly the same location where the hit
  435. happened.  Mostly the hit command is 1-2 instructions above the stopped
  436. task's PC.
  437.  
  438.    This function needs Enforcer V37.x by M. Sinz or CyberGuard V1.x and
  439. it must be installed before BDebug is launched.  Please read the
  440. documentation.
  441.  
  442. Select Display Mode
  443. ...................
  444.  
  445.    This function allows you to choose Screen Mode for the Debugger.
  446.  
  447. How to start ?
  448. ==============
  449.  
  450.    If you only want to debug a program you have to start bdebug with
  451. the program's name and parameters or by using `Debug Program' in the
  452. command window.  Another method is to move a program's icon on the
  453. command window or specify BDebug as in the icon as the `DefaultTool'.
  454.  
  455.    `Name:'
  456.  
  457.      BDEBUG - The CLI Startup
  458.  
  459.  
  460.    `Synopnis:'
  461.  
  462.      BDEBUG [?] [<Program> [Argument] ]
  463.  
  464.  
  465.    `Function:'
  466.  
  467.      BDebug activates the Debugger, loads and stops the optionally
  468.      entered program. If it can find a local config file with  the
  469.      suffix *.bdebug it loads it.
  470.  
  471.  
  472.    `Inputs'
  473.  
  474.         * ? shows an information message
  475.  
  476.         * program name If no program name is entered BDebug looks for
  477.           env:BDebugProgram and loads the program instead that the env:
  478.           points to.
  479.  
  480.         * argument line of the program. If there are spaces in
  481.           parameters you have to enclose the argument with `""'.
  482.  
  483.  
  484. Usage of BDebug
  485. ***************
  486.  
  487. The Register Window
  488. ===================
  489.  
  490. Register Window
  491. ---------------
  492.  
  493.    The register window is the most important control layer of the
  494. Debugger and every debugged task has one.  You can link unlimited other
  495. information windows to the `REGWindow' or you can tell the Debugger to
  496. give up controling the task.  In the title line of the window you can
  497. see the ID number of the task, so you can recognize what information
  498. window belongs to this task.  Furthermore the title line also contains
  499. the task address, the state, `RUN', `WAIT' or `STOP' and the name of
  500. the task.  The task is in the `RUN' state if the task has the control
  501. at the moment instead of the traphandler; the task is in the `STOP'
  502. state when the task waits and the traphandler controls what happens.
  503. The task is the `WAIT' state only when the Debugger has to wait to
  504. catch a task by a `Debug Task'.  In the upper area of the window you
  505. see the normal data and address registers where the address register
  506. also have additional information fields.  To change a register or to
  507. watch memory where the register points to you only need to doubleclick
  508. on the register or on the register's memory contents.  Furthermore you
  509. may change other usermode registers by this method.  Supervisor
  510. register can't be changed because that doesn't make much sense for a
  511. system Debugger.
  512.  
  513.                            `68000 Registers'
  514.  
  515.              D0=xxxxxxxx yyyy A0=xxxxxxxx   Arg1 Arg2 [!]
  516.  
  517.              D1=xxxxxxxx yyyy A1=xxxxxxxx   Arg1 Arg2 [!]
  518.  
  519.              D2=xxxxxxxx yyyy A2=xxxxxxxx   Arg1 Arg2 [!]
  520.  
  521.              D3=xxxxxxxx yyyy A3=xxxxxxxx   Arg1 Arg2 [!]
  522.  
  523.              D4=xxxxxxxx yyyy A4=xxxxxxxx   Arg1 Arg2 [!]
  524.  
  525.              D5=xxxxxxxx yyyy A5=xxxxxxxx   Arg1 Arg2 [!]
  526.  
  527.              D6=xxxxxxxx yyyy A6=xxxxxxxx   Arg1 Arg2 [!]
  528.  
  529.              D7=xxxxxxxx yyyy A7=xxxxxxxx   Arg1 Arg2 [!]
  530.  
  531.            USP=xxxxxxxx  SSP=xxxxxxxx  PC=xxxxxxxx  SR=xxxx
  532.  
  533.    * [!] shows if the address register points on an odd address.
  534.  
  535.    * if the address register points on an illegal memory area the char
  536.      `*' is shown in Arg1 and Arg2 to avoid crashes by reading non
  537.      readable io-addresses.  You can config the readable memory areas.
  538.  
  539.    * if the address register points on the following system structures
  540.      the name of the Node is shown in Arg1 and the Name of the
  541.      structure in Arg2.
  542.  
  543.         * Library
  544.  
  545.         * Device
  546.  
  547.         * Port
  548.  
  549.         * Task
  550.  
  551.         * Resource
  552.  
  553.         * MemHead
  554.  
  555.    * if the address register points to the custom chip area the name of
  556.      the register is shown in Arg1 and the ID-Word CUSTOM is shown in
  557.      Arg2.  Custom register map is $dff000-$dff200.
  558.  
  559.    * if the address register points to a symbol the symbol and the
  560.      contents is shown.
  561.  
  562.    * Otherwise 8Bytes of the memory are shown where the register points
  563.      to.  The 8 Bytes are shown hexadecimal in Arg1 and ascii in Arg2.
  564.  
  565.                            `68010 Registers'
  566.  
  567.                VBR=xxxxxxxx  SFC=xxxxxxxx  DFC=xxxxxxxx
  568.  
  569.                            `68020 Registers'
  570.  
  571.                VBR=xxxxxxxx  SFC=xxxxxxxx  DFC=xxxxxxxx
  572.  
  573.         MSP=xxxxxxxx  ISP=xxxxxxxx CACR=xxxxxxxx CAAR=xxxxxxxx
  574.  
  575.                            `68030 Registers'
  576.  
  577.                VBR=xxxxxxxx  SFC=xxxxxxxx  DFC=xxxxxxxx
  578.  
  579.         MSP=xxxxxxxx  ISP=xxxxxxxx CACR=xxxxxxxx CAAR=xxxxxxxx
  580.  
  581.                CRP=xxxxxxxxxxxxxxxx SRP=xxxxxxxxxxxxxxxx
  582.  
  583.            TT0=xxxxxxxx  TT1=xxxxxxxx   TC=xxxx PSR=xxxxxxxx
  584.  
  585.                            `68040 Registers'
  586.  
  587.                VBR=xxxxxxxx  SFC=xxxxxxxx  DFC=xxxxxxxx
  588.  
  589.                MSP=xxxxxxxx  ISP=xxxxxxxx CACR=xxxxxxxx
  590.  
  591.           URP=xxxxxxxx  SRP=xxxxxxxx   TC=xxxx  PSR=xxxxxxxx
  592.  
  593.         ITT0=xxxxxxxx ITT1=xxxxxxxx DTT0=xxxxxxxx DTT1=xxxxxxxx
  594.  
  595.                            `68060 Registers'
  596.  
  597.                VBR=xxxxxxxx  SFC=xxxxxxxx  DFC=xxxxxxxx
  598.  
  599.               CACR=xxxxxxxx  PCR=xxxxxxxx BUSCR=xxxxxxxx
  600.  
  601.           URP=xxxxxxxx  SRP=xxxxxxxx   TC=xxxx  PSR=xxxxxxxx
  602.  
  603.         ITT0=xxxxxxxx ITT1=xxxxxxxx DTT0=xxxxxxxx DTT1=xxxxxxxx
  604.  
  605.                            Type  Information
  606.  
  607.               xxxxxxxx  [Symbol] Mnemonic operand1[,...]]
  608.  
  609.             (EA): [Address1=Contents]...[Address2=Contents]
  610.  
  611.      In the `(EA)' line you can see the addresses and their contents
  612.      the current command accesses.  The contents of illegal addresses
  613.      aren't shown.
  614.  
  615. Local Menus
  616. -----------
  617.  
  618.    * Close Window
  619.  
  620.      closes the `REGWindow', all connected windows and disactivates the
  621.      Debugger for this task.  To disactivate the Debugger you have to
  622.      choose if the task should keep running so it's the task's business
  623.      to stop.  Furthermore you can end the task by runing the cleanup
  624.      routine of the task or just removing the task from the list but
  625.      this can cause sideeffects you can't always oversee.  If the task
  626.      is a process then the Remove option is equal to the Cleanup option.
  627.      If it's only a task the Cleanup option is equal to the Cleanup
  628.      option.  Note that the Remove option doesn't free any resources of
  629.      the task.
  630.  
  631.           You should really know what you're doing if you, for example,
  632.           remove a task from the system.
  633.  
  634.  
  635.    * ZOOM Windows
  636.  
  637.      expands all windows of the task.
  638.  
  639.    * Log File
  640.  
  641.      activates or disactivates the loging of the register and PC
  642.      changes.
  643.  
  644.    * Big View
  645.  
  646.      shrinks the `REGWindow' to a 68000 register layout or expands it
  647.      back to the full layout.
  648.  
  649.    * Open DissWindow
  650.  
  651.      opens a DissWindow with the configured dimensions.
  652.  
  653.    * Open MemWindow
  654.  
  655.      opens a MemWindow with the configured dimensions.
  656.  
  657.    * Open FPUWindow
  658.  
  659.      opens a FPUWindow with the configured dimensions.  The menu is
  660.      only available if a FPU is installed.
  661.  
  662.    * Open BreakWindow
  663.  
  664.      opens a BreakpointWindow with the configured dimensions.
  665.  
  666.    * Open CoppWindow
  667.  
  668.      opens a CoppWindow with the configured dimensions.
  669.  
  670.    * Open StructWindow
  671.  
  672.      opens a StructWindow with the configured dimensions.
  673.  
  674.    * Open SnoopWindow
  675.  
  676.      opens a SnoopWindow with the configured dimensions.
  677.  
  678.    * Open WatchWindow
  679.  
  680.      opens a WatchpointWindow with the configured dimensions.
  681.  
  682.    * Open ChecksumWindow
  683.  
  684.      opens a ChecksumWindow with the configured dimensions.
  685.  
  686.    * Save Window Settings
  687.  
  688.      saves the positions and count of all window the current task
  689.      controls.  The saved file then contains the appropriate commands
  690.      you have to enter yourself into the configuration file.  Because
  691.      of the Debugger's window concept it doesn't make sense to save a
  692.      complete configuration file.
  693.  
  694. Public Menus
  695. ------------
  696.  
  697.    * Step 1
  698.  
  699.      runs the current command and stops the task afterwords.
  700.  
  701.    * Step X
  702.  
  703.      runs X commands and stops the task afterwards.
  704.  
  705.    * Step Debug Line
  706.  
  707.      runs commands until the PC encounters another source line.  If the
  708.      PC is outside the program or if no debug informations are
  709.      available a single step i used.  The command enters subroutines.
  710.  
  711.    * Trace Debug Line
  712.  
  713.      is similar to `Step Debug Line' with the exception that it runs
  714.      subroutines.
  715.  
  716.    * Trace over Calls
  717.  
  718.      runs the current command or subroutine and stops the task
  719.      afterwards.  Depending on the configuration and the memory area a
  720.      breakpoint or single steps are used.  If a crash happens in
  721.      certain program parts you should remove the command `Tracebreak'
  722.      from the configuration.
  723.  
  724.           You should avoid to use `Tracebreak' in Libraries and Devices
  725.           which are located in the ram.  If another task accesses the
  726.           routine at the same time you can expect an illegal exception.
  727.  
  728.  
  729.           Some Amiga MMU Setups don't like programs writing to the
  730.           kickstart rom. For example when breakpoints are set.
  731.  
  732.  
  733.    * Trace X over Calls
  734.  
  735.      runs X commands or subroutines and stops the task afterwards.
  736.      Depending on the configuration and the memory area a breakpoint or
  737.      single steps are used.
  738.  
  739.    * Trace Work
  740.  
  741.      is similar to the command `Trace over Calls' with the exception
  742.      that all commands are run.  This function is useful to trace loops.
  743.  
  744.  
  745.           Example:
  746.                      moveq        #10,d0
  747.                  0$:
  748.                      dbra         d0,0$
  749.  
  750.           If you use the function on the command `dbra' the Debugger
  751.           sets a breakpoint after the dbra and runs the task. It drops
  752.           back to single step when it hits a `Jmp', `bra', `rts'....
  753.  
  754.  
  755.    * Trace over OS-Calls
  756.  
  757.      runs the current command or the OS function and stops the task
  758.      afterwards.
  759.  
  760.    * Trace on Flow
  761.  
  762.      stops the task when a PC direction occurs.  This means the PC is
  763.      stopped when it hits a `Jsr', `Jmp', `bcc', `rts'....
  764.  
  765.    * Trace on Address
  766.  
  767.      runs the task until the PC is equal to the entered address.  This
  768.      function is not very fast because the task is running in single
  769.      step mode and after each instruction the PC is compared with the
  770.      address.
  771.  
  772.    * Trace out of OS
  773.  
  774.      runs the task until the PC is outside of the kickstart.  This
  775.      function is useful when you catch a task inside the OS and you
  776.      want to get as fast as possible back to the program's code.  It
  777.      works similar as `Trace on address'.
  778.  
  779.           You shouldn't use this command if your task only runs in the
  780.           kickstart.
  781.  
  782.  
  783.    * (PC)++
  784.  
  785.      jumps over the current command.  Useful to jump over `Illegal'
  786.      breakpoints used for debugging purposes in your program.
  787.  
  788.    * PC-2
  789.  
  790.      subtracts 2 Bytes from the PC.
  791.  
  792.    * Write Nop
  793.  
  794.      overwrites the current command with a `Nop'.
  795.  
  796.    * Write Illegal
  797.  
  798.      overwrites the current command with an `Illegal'.
  799.  
  800.    * Run Task
  801.  
  802.      runs the task and stops only on exceptions.
  803.  
  804.    * Run Watched Task
  805.  
  806.      runs the task in trace mode and stops when a WatchPoint condition
  807.      is true.  If there are no watchpoints the command behaves like
  808.      `Run Task'.
  809.  
  810.    * Run History Task
  811.  
  812.      runs the task in trace mode and saves the registers each step into
  813.      the history stack.
  814.  
  815.    * Stop Task
  816.  
  817.      stops the task.
  818.  
  819.    * Send Signal
  820.  
  821.      sends a signal to the task.  Default Signal is CTRL-C = 12
  822.  
  823.    * Undo Level
  824.  
  825.      sets the undobuffer's depth.
  826.  
  827.    * Undo
  828.  
  829.      undos the last changes in the registerframe.
  830.  
  831.    * View Refresh
  832.  
  833.      activates and disactivates the copperlist refresh after each trace
  834.      operation. This function is help for debugging programs which
  835.      install own copperlists.
  836.  
  837.    * Show (EA)
  838.  
  839.      activates and disactivates the output of the address and address
  840.      contents which are accessed by the current assembler command.
  841.  
  842.    * Symbol
  843.  
  844.      activates and disactivates the use of symbols in the `REGWindow'.
  845.  
  846.    * Delete Symbols
  847.  
  848.      erases all symbols of the task.
  849.  
  850.    * Copy Symbols
  851.  
  852.      can copy a symbol list of the task to a different task.  This
  853.      function is helpful if your task is started from another task and
  854.      you want to keep the symbol list.
  855.  
  856.    * Load Symbols
  857.  
  858.      loads the symbols of a program where you can select an alternative
  859.      process's segmentlist for calculating the symbol and debug
  860.      informations.  Normally you choose the same process but sometimes
  861.      it's helpful to select a different process.  For example, if the
  862.      task you debug is created in a program, you have to choose the
  863.      program's task to get the correct symbol addresses.
  864.  
  865.    * Set Hunklist
  866.  
  867.      sets a new segment list for the SourceWindow and some other hunk
  868.      related functions.  Because the position in the SourceWindow
  869.      depends on the segments sometimes help to load new symbols and
  870.      debug informations for this task.  If you load an alternative
  871.      Hunklist by selecting a custom task when you use `Load Symbols'.
  872.  
  873.    * Reset Hunklist
  874.  
  875.      removes the alternative hunklist.
  876.  
  877.    * Show Value
  878.  
  879.      shows the value of an argument.
  880.  
  881.    * Show Last Exception
  882.  
  883.      shows the last exception.
  884.  
  885.    * Open Task Window
  886.  
  887.      opens a window showing the task structure of the task.
  888.  
  889.    * Open System Window
  890.  
  891.      opens a window showing the ExecBase structure.
  892.  
  893.    * Open Proces Window
  894.  
  895.      opens a window showing the process structure of the process.
  896.  
  897.    * Open CLI Window
  898.  
  899.      opens a window showing the cli structure of the process.
  900.  
  901.    * Open Hunk Window
  902.  
  903.      opens a window showing the hunks of the process.
  904.  
  905.    * Open Symbol Window
  906.  
  907.      opens a window showing the symbols of the process.  If you
  908.      doubleclick on a symbol you get the hunk where the symbol is
  909.      located.
  910.  
  911.    * Open Library Window
  912.  
  913.      opens a window showing the libraries.  If you doubleclick on a
  914.      library entry it opens a `FD:' window that shows all functions of
  915.      the library when the library is defined in the `Barfly.FD' file.
  916.      Furthermore if you doublelick on a function you have the choice to
  917.      see the function in a `DissWindow' or the autodocs documentation.
  918.  
  919.    * Open Device Window
  920.  
  921.      opens a window showing the devices.
  922.  
  923.    * Open Resource Window
  924.  
  925.      opens a window showing the resources.
  926.  
  927.    * Open Port Window
  928.  
  929.      opens a window showing the public ports.
  930.  
  931.    * Open Resident Window
  932.  
  933.      opens a window showing the resident modules.
  934.  
  935.    * Open Interrupt Window
  936.  
  937.      opens a window showing the interrupts.
  938.  
  939.    * Open AutoDocs Window
  940.  
  941.      opens a filerequester which lets you choose the needed autodocs
  942.      information of a library.  This opens a window which shows all
  943.      functions of the chosen autodoc file.  If you now click on a
  944.      function another window is opened showing the function
  945.      documentation.
  946.  
  947.    * Open History Window
  948.  
  949.      opens a HistoryWindow showing the last saved registerframes of the
  950.      undobuffer. The undobuffer is organized in a way to make the first
  951.      entry become the last entry in the HistoryWindow.  The
  952.      HistoryWindow isn't updated automaticlly.
  953.  
  954.    * Stack Check
  955.  
  956.      controls the stack check. A warning is displayed if the register
  957.      A7 points out of the stack bounds or points on an odd address.
  958.      The Debugger only checks the task when the task gives back the
  959.      control to the traproutine, so it's not possible to notice every
  960.      stack problem.
  961.  
  962.           You should be aware that this function doesn't work with a
  963.           WShell task because the `WShell' doesn't set the correct
  964.           stack task values.
  965.  
  966.  
  967.    * Find Task of address
  968.  
  969.      tries to find the task which belongs to the entered address.  The
  970.      command checks if the address is in the task, process, cli,
  971.      mementry structure and the hunks.  It's not safe to assume that
  972.      the function can check all cases.
  973.  
  974.    * Load Binary
  975.  
  976.      loads a file with an optional length into a memory area.  If you
  977.      want the Debugger to automaticlly allocate the memory block you
  978.      have to close the memory requester.
  979.  
  980.    * Save Binary
  981.  
  982.      saves a memory area into a file.
  983.  
  984.    * Freeze Task
  985.  
  986.      freezes a selectable task.  When bdebug ends the frozen tasks are
  987.      awakened again.
  988.  
  989.    * Warm up Task
  990.  
  991.      warms up a frozen task.
  992.  
  993.    * Kill Task
  994.  
  995.      kills a selectable task.
  996.  
  997.           You should know which task you can kill.  For example, don't
  998.           kill the input.device or your filesystem.
  999.  
  1000.  
  1001.    * Show Task
  1002.  
  1003.      shows the task structure of a selectable task.
  1004.  
  1005.    * Show Prozess
  1006.  
  1007.      shows the process structure of a selectable process.
  1008.  
  1009.    * Show CLI
  1010.  
  1011.      shows the cli structure of a selectable process.
  1012.  
  1013.    * Show Hunk
  1014.  
  1015.      shows the hunks of a selectable process.
  1016.  
  1017.    * Send Task Signal
  1018.  
  1019.      sends a signal to a selectable task.
  1020.  
  1021.    * Set Task Priority
  1022.  
  1023.      sets a priority of a selectable task.
  1024.  
  1025.    * Refresh Code Cache
  1026.  
  1027.      refreshes the Code Cache.
  1028.  
  1029.    * Refresh Data Cache
  1030.  
  1031.      refreshes the Data Cache
  1032.  
  1033. Usage of BDebug
  1034. ***************
  1035.  
  1036. The FPU Window
  1037. ==============
  1038.  
  1039. FPU Window
  1040. ----------
  1041.  
  1042.    The FPU Window shows the FPU register FP0 to FP7 in the 96Bit
  1043. Extended format and the registers FPCR, FPSR and FPIAR in hexadecimal.
  1044. You can only open this window if a FPU is available.
  1045.  
  1046.      Register Window Layout
  1047.  
  1048.                            FP0=FloatingPoint
  1049.  
  1050.                            FP1=FloatingPoint
  1051.  
  1052.                            FP2=FloatingPoint
  1053.  
  1054.                            FP3=FloatingPoint
  1055.  
  1056.                            FP4=FloatingPoint
  1057.  
  1058.                            FP5=FloatingPoint
  1059.  
  1060.                            FP6=FloatingPoint
  1061.  
  1062.                            FP7=FloatingPoint
  1063.  
  1064.                       FPCR=xxxxxxxx FPSR=xxxxxxxx
  1065.  
  1066.                             FPIAR=xxxxxxxx
  1067.  
  1068. Local Menus
  1069. -----------
  1070.  
  1071.    * Close Window
  1072.  
  1073.      closes the window.
  1074.  
  1075. Usage of BDebug
  1076. ***************
  1077.  
  1078. The Disassembler Window
  1079. =======================
  1080.  
  1081. Disassembler window
  1082. -------------------
  1083.  
  1084.    The `DissWindow' shows the memory contents in assembler mnemonics.
  1085. The address of the window's view can be absolute or relative.  In
  1086. absolut mode, the window shows the contents of a fixed address,
  1087. indicated by the window title `No Link'.  In relative mode the window
  1088. is connected to a register causing the window to update when the the
  1089. register value changes.  This is indicated by the window title which
  1090. reads `Link to *', where * represents the register name.  The PC is
  1091. shown by the colour pen 2.  If the linked register value is outside of
  1092. the window's view area the whole contents of the window will be
  1093. refreshed.  You can change size of the window and scroll through the
  1094. memory area by using the cursors.  In the title you see an ID-String
  1095. with the format `\#x.y' where `X' represents the `REGWindow' number and
  1096. `y' the number of the `MemWindow'.  Doubleclicking a line of the window
  1097. sets or remove a breakpoint.  You can disable this function in the
  1098. configuration.
  1099.  
  1100. Local Menus
  1101. -----------
  1102.  
  1103.    * Close Window
  1104.  
  1105.      closes the window.
  1106.  
  1107.    * Shrink Window
  1108.  
  1109.      shrinks the window.
  1110.  
  1111.    * Expand Window
  1112.  
  1113.      expands the window to screen size.
  1114.  
  1115.    * Link to Register
  1116.  
  1117.      links the window with a register.  If you enter the string `NO' it
  1118.      switches to absolute mode.
  1119.  
  1120.    * Change address
  1121.  
  1122.      changes the view address of the window.
  1123.  
  1124.    * Clear address
  1125.  
  1126.      resets the view address of the window.
  1127.  
  1128.    * Refresh Window
  1129.  
  1130.      refreshes the window.
  1131.  
  1132.    * .W Branches
  1133.  
  1134.      activates and disactivates the output of the old branch width size.
  1135.  
  1136.    * Neg. Offsets
  1137.  
  1138.      activates and disactivates the output of negative values in
  1139.      indirect address modes with offset.
  1140.  
  1141.    * Neg. Data
  1142.  
  1143.      activates and disactivates the output of negative values in direct
  1144.      address mode.
  1145.  
  1146.    * Opcode Data
  1147.  
  1148.      activates and disactivates the additional output of the command
  1149.      bytes.
  1150.  
  1151.    * Auto Refresh
  1152.  
  1153.      activates and disactivates the global refresh of the window after
  1154.      each step.
  1155.  
  1156.    * Symbols
  1157.  
  1158.      activates and disactivates the symbol output in the window.
  1159.  
  1160.    * Show Lib Call
  1161.  
  1162.      activates and disactivates the symbolic output of library
  1163.      functions so all library functions that are defined in the
  1164.      configuration file `<BarflyPath>/Barfly/BARFLY.FD' are recognized.
  1165.  
  1166.    * Guess Lib Call
  1167.  
  1168.      activates and disactivates the guessing of function call names.
  1169.      This only works in connection with the option `Show Lib Call'.
  1170.      Unfortunately you can't expect that the function names always fit
  1171.      because the library base register A6 can change until the program
  1172.      counter meets the function.
  1173.  
  1174.    * Mark Block End
  1175.  
  1176.      activates and deactivates marking after the instruction `JMP',
  1177.      `BRA', `RTS', `RTE', `RTD' and `RTR' to make program blocks more
  1178.      visible.
  1179.  
  1180.    * Set/Clear Breakpoint
  1181.  
  1182.      sets/removes a breakpoint on the first entry in the window.
  1183.      Breakpoints are shown by changing the pen from colour 1 to colour
  1184.      3 and the char `>' at the beginning of a line.
  1185.  
  1186.    * Pick/Clear Breakpoint
  1187.  
  1188.      sets/removes a breakpoint through a symbol list.
  1189.  
  1190.    * Disassemble to File
  1191.  
  1192.      disassembles a memory area into a file.
  1193.  
  1194. Usage of BDebug
  1195. ***************
  1196.  
  1197. The Memory Window
  1198. =================
  1199.  
  1200. Memory window
  1201. -------------
  1202.  
  1203.    The `MemWindow' shows the memory contents hexadecimal and in
  1204. ascii.You can change size of the window and scroll through the memory
  1205. area whith the cursor keys.  In the title you see an ID-String with the
  1206. format `\#x.y' where `X' represents the `REGWindow' number and `y' the
  1207. number of the `MemWindow'.
  1208.  
  1209. Local Menus
  1210. -----------
  1211.  
  1212.    * Close Window
  1213.  
  1214.      closes the window.
  1215.  
  1216.    * Shrink Window
  1217.  
  1218.      shrinks the window.
  1219.  
  1220.    * Expand Window
  1221.  
  1222.      expands the window to screen size.
  1223.  
  1224.    * Link to Register
  1225.  
  1226.      links the window with a register.  If you enter the string `NO' it
  1227.      switches to absolute mode.
  1228.  
  1229.    * Change address
  1230.  
  1231.      changes the view address of the window.
  1232.  
  1233.    * Clear address
  1234.  
  1235.      resets the view address of the window.
  1236.  
  1237.    * Refresh Window
  1238.  
  1239.      refreshes the window.
  1240.  
  1241.    * Memory Offset Step
  1242.  
  1243.      defines the data format in the window.  The following options can
  1244.      be selected: `None', `Byte', `Word' and `Long'.
  1245.  
  1246.    * Edit
  1247.  
  1248.      activates edit mode of the `MemWindow'.  In edit mode you can
  1249.      switch between hex and ascii input by the key `RETURN'. With `ESC'
  1250.      you can leave edit mode. Only the cursor right and left are
  1251.      changed to the normal.  With these both keys you can access each
  1252.      Byte.  In edit mode you can't change the size of the window.
  1253.  
  1254.    * Copy
  1255.  
  1256.      copies a memory area into another memory area.  The function uses
  1257.      `CopyMem' so it doesn't handle memory areas that overlap.
  1258.  
  1259.    * Fill
  1260.  
  1261.      fills a memory area with a value of a certain data-width.
  1262.  
  1263.    * Compare
  1264.  
  1265.      compares a memory area with another memory area.
  1266.  
  1267.    * Search
  1268.  
  1269.      searches a value of a certain data-width in a memory area.  If the
  1270.      value is found, the address and the value are displayed and you
  1271.      can goon with `Search Next' to find the next address.
  1272.  
  1273.    * Search Next
  1274.  
  1275.      Search the next value. Look at `Search'
  1276.  
  1277.    * Pred
  1278.  
  1279.      sets the address of the window tn the preceding entry of the list.
  1280.      If the node points on an odd, illegal or NULL address the command
  1281.      has no effect.  The next node is equal to `LN_PRED', the second
  1282.      longword of the memory view.
  1283.  
  1284.    * Succ
  1285.  
  1286.      sets the address of the window to the next entry of the list.  If
  1287.      the node points on an odd, illegal or NULL address the command has
  1288.      no effect.  The next node is equal to `LN_SUCC', the first longword
  1289.      of the memory view.
  1290.  
  1291. Usage of BDebug
  1292. ***************
  1293.  
  1294. The Copper Window
  1295. =================
  1296.  
  1297. CopperWindow
  1298. ------------
  1299.  
  1300.    The `CopperWindow' shows the memory contents as copper commands.
  1301. The window is sizeable, and you can use the cursor keys to scroll
  1302. through the memry area.  In the title you see an ID-String with the
  1303. format `\#x.y' where `X' represents the `REGWindow' number and `y' the
  1304. number of the `CoppWindow'.
  1305.  
  1306. Local Menus
  1307. -----------
  1308.  
  1309.    * Close Window
  1310.  
  1311.      closes the window.
  1312.  
  1313.    * Shrink Window
  1314.  
  1315.      shrinks the window.
  1316.  
  1317.    * Expand Window
  1318.  
  1319.      expands the window to screen size.
  1320.  
  1321.    * Link to Register
  1322.  
  1323.      links the window with a register.  If you enter the string `NO' it
  1324.      switches to absolute mode.
  1325.  
  1326.    * Change address
  1327.  
  1328.      changes the view address of the window.
  1329.  
  1330.    * Clear address
  1331.  
  1332.      resets the view address of the window.
  1333.  
  1334.    * Refresh Window
  1335.  
  1336.      refreshes the window.
  1337.  
  1338.    * Goto Into List
  1339.  
  1340.      sets the window list on the standard copperlist
  1341.      `GfxBase->gb_copinit'.
  1342.  
  1343. Usage of BDebug
  1344. ***************
  1345.  
  1346. The Structure Window
  1347. ====================
  1348.  
  1349. StructWindow
  1350. ------------
  1351.  
  1352.    opens window which can be connected with a structure.  You can use
  1353. new structure entries by expanding the the
  1354. `<BarflyPath>/Barfly/Barfly.Include' file or loading a new custom file.
  1355. By a doubleclick on a structure window entry you can cause several
  1356. actions depending on the datatype.  Every datatype is connected with an
  1357. action that is normally started automaticlly.  With the configuration
  1358. command `NoAutoStructAction' you can change this behaviour so that an
  1359. action type requester is opened.
  1360.  
  1361.    The following datatypes are available.
  1362.  
  1363.    * APTR opens a MemWindow.
  1364.  
  1365.    * CSTR shows a string.
  1366.  
  1367.    * BPTR opens a MemWindow at the address BPTR*4.
  1368.  
  1369.    * BSTR shows a string at the address (BPTR*4)+1
  1370.  
  1371.    * CPTR opens a DissWindow.
  1372.  
  1373.    * FPTR opens a DissWindow.
  1374.  
  1375.    * BYTE doesn't cause an action.
  1376.  
  1377.    * WORD doesn't cause an action.
  1378.  
  1379.    * LONG doesn't cause an action.
  1380.  
  1381.    * FLOAT doesn't cause an action.
  1382.  
  1383.    * DOUBLE doesn't cause an action.
  1384.  
  1385.    * EXTENDED doesn't cause an action.
  1386.  
  1387.    * RPTR doesn't cause an action.
  1388.  
  1389.    The following action types are available.
  1390.  
  1391.    * MemWindow opens a MemWindow.
  1392.  
  1393.    * DissWindow opens a DissWindow.
  1394.  
  1395.    * CoppWindow opens a CoppWindow.
  1396.  
  1397.    * StructWindow opens a StructWindow.
  1398.  
  1399.    * NewStruct sets a new structure.
  1400.  
  1401. Structure Macro Fileformat
  1402. --------------------------
  1403.  
  1404.    This section describes the file format of structure macros.  In the
  1405. beginning you define the root directory entries with the first Macro
  1406. `Menudir'.  The first parameter is the name of the entry, then the
  1407. address of the parent directory and then the address of the
  1408. subdirectory.  In the root directory the parent address is obviously
  1409. NULL.  The last entry of the directory is defined by the Macro
  1410. `MENUDIREND'.
  1411.  
  1412.      `Label                   ListViewMacro           Link'
  1413.      RootDir:
  1414.                              .
  1415.                              .
  1416.                              MENUDIR                 exec,0,Exec_Dir
  1417.                              .
  1418.                              .
  1419.      MYCUSTOMENTRY:
  1420.                              MENUDIREND              CUSTOM,0,0
  1421.  
  1422.    The design of a subdirectory only differs from the root directory
  1423. entries only by a parent directory address.
  1424.  
  1425.      `Label                   ListViewMacro           Link'
  1426.      Exec_Dir:
  1427.                              .
  1428.                              .
  1429.                              MENUDIR                 nodes.i,RootDir,Nodes_Dir
  1430.                              .
  1431.                              .
  1432.                              MENUDIREND              tasks.i,RootDir,Tasks_Dir
  1433.  
  1434.    to define the structure directory entries you have to use `MENUITEM'
  1435. and `MENUITEMEND'.  The first parameter in the Item Macros is the name
  1436. of the entry and also the name of the structure.  The second parameter
  1437. defines the address of the parent directory.
  1438.  
  1439.      `Label                   ListViewMacro           Link'
  1440.                              .
  1441.                              .
  1442.      Nodes_Dir:
  1443.                              MENUITEM                LN,Exec_Dir
  1444.                              .
  1445.                              .
  1446.                              MENUITEMEND
  1447.  
  1448.    To define a structure you can use the normal assembler syntax that
  1449. you probably have to adjust to your custom needs. For example you can
  1450. tell BDebug more informations about the datatype an entry represents.
  1451. By redefining `APTR' to a `CSTR' you can tell the Debugger that the
  1452. entry is a stringpointer.  Another example is defining that `APTR'
  1453. points to a structure by `APTR LN_SUCC,Node'.
  1454.  
  1455.      `Label                   IncludeTypeMacro        Name,Link'
  1456.      LN_Struct:
  1457.                              STRUCTUREB              LN,0
  1458.                              APTR                    LN_SUCC,LN
  1459.                              APTR                    LN_PRED,LN
  1460.                              UBYTE                   LN_TYPE
  1461.                              BYTE                    LN_PRI
  1462.                              CCSTR                   LN_NAME
  1463.                              LABEL                   LN_SIZE
  1464.  
  1465. Local Menus
  1466. -----------
  1467.  
  1468.    * Close Window
  1469.  
  1470.      closes the window.
  1471.  
  1472.    * Shrink Window
  1473.  
  1474.      shrinks the window.
  1475.  
  1476.    * Expand Window
  1477.  
  1478.      expands the window to screen size.
  1479.  
  1480.    * Link to Register
  1481.  
  1482.      links the window with a register.  If you enter the string `NO' it
  1483.      switches to absolute mode.
  1484.  
  1485.    * Change address
  1486.  
  1487.      changes the view address of the window.
  1488.  
  1489.    * Clear address
  1490.  
  1491.      resets the view address of the window.
  1492.  
  1493.    * Refresh Window
  1494.  
  1495.      refreshes the window.
  1496.  
  1497.    * Load Custom Struct
  1498.  
  1499.      loads additional structure files. The new structure entries are
  1500.      placed in the `CUSTOM' directory.  The format of custom structure
  1501.      files is equal to the file `BARFLY.INCLUDE'.
  1502.  
  1503.    * Select Structure
  1504.  
  1505.      opens the structure include directory requester where you can
  1506.      select the needed structure.  The parent gadget is placed in the
  1507.      upper border.
  1508.  
  1509.    * Goto Sysbase...
  1510.  
  1511.      sets the window address on the ExecBase.
  1512.  
  1513.    * Goto Gfxbase...
  1514.  
  1515.      sets the window address on the GFXBase.
  1516.  
  1517.    * Save Window....
  1518.  
  1519.      saves the contents of the window in a file.
  1520.  
  1521.    * Full Address
  1522.  
  1523.      this switch decides whether the `StructWindow' also shows the
  1524.      address of the entries.
  1525.  
  1526.    * Offset Address
  1527.  
  1528.      this switch decides wheather the `StructWindow' also shows the
  1529.      offset of the entries.
  1530.  
  1531.    * Pred
  1532.  
  1533.      sets the address of the window on the preceding entry of the list.
  1534.      If the node points on an odd, illegal or NULL address the command
  1535.      has no effect.  The next node is equal to `LN_PRED', the second
  1536.      longword of the memory view.
  1537.  
  1538.    * Succ
  1539.  
  1540.      sets the address of the window on the next entry of the list.  If
  1541.      the node points on an odd, illegal or NULL address the command has
  1542.      no effect.  The next node is equal to `LN_SUCC', the first longword
  1543.      of the memory view.
  1544.  
  1545. Usage of BDebug
  1546. ***************
  1547.  
  1548. The Structure Window
  1549. ====================
  1550.  
  1551. Source window
  1552. -------------
  1553.  
  1554.    The `SourceWindow' shows the source line that belongs to the window
  1555. address. If the program file doesn't have the needed debug informations
  1556. the `Source window' can't be opened. If the address points to an area
  1557. with no relevant debug information, for example the Kickstart or beyond
  1558. the program hunks, all you see is a small message.
  1559.  
  1560. Local Menus
  1561. -----------
  1562.  
  1563.    * Close Window
  1564.  
  1565.      closes the window.
  1566.  
  1567.    * Shrink Window
  1568.  
  1569.      shrinks the window.
  1570.  
  1571.    * Expand Window
  1572.  
  1573.      expands the window to screen size.
  1574.  
  1575.    * Link to Register
  1576.  
  1577.      links the window with a register.  If you enter the string `NO' it
  1578.      switches to absolute mode.
  1579.  
  1580.    * Change address
  1581.  
  1582.      changes the view address of the window.
  1583.  
  1584.    * Clear address
  1585.  
  1586.      resets the view address of the window.
  1587.  
  1588.    * Refresh Window
  1589.  
  1590.      refreshes the window.
  1591.  
  1592.    * Set Breakpoint
  1593.  
  1594.      sets a breakpoint on the active line.
  1595.  
  1596.    * Show HunkInfo
  1597.  
  1598.      shows the hunk of the current source line.
  1599.  
  1600. Usage of BDebug
  1601. ***************
  1602.  
  1603. The Snoop Window
  1604. ================
  1605.  
  1606. Snoop Window
  1607. ------------
  1608.  
  1609.    The `SnoopWindow' snoops the task's allocations.
  1610.  
  1611. Local Menus
  1612. -----------
  1613.  
  1614.    * Close Window
  1615.  
  1616.      closes the window.
  1617.  
  1618.    * Shrink Window
  1619.  
  1620.      shrinks the window.
  1621.  
  1622.    * Expand Window
  1623.  
  1624.      expands the window to screen size.
  1625.  
  1626.    * Refresh Window
  1627.  
  1628.      refreshes the window.
  1629.  
  1630.    * Auto Refresh
  1631.  
  1632.      activates/deactivates display refresh by an allocation.
  1633.  
  1634.    * Snoop Memory
  1635.  
  1636.      activates/deactivates snooping.
  1637.  
  1638.    * Snoop Mask
  1639.  
  1640.      sets the allocation filter mask.  If the Mask is set to , only
  1641.      allocations with the size 20 are recorded. Default -1.
  1642.  
  1643.    * Snoop Max Entries
  1644.  
  1645.      sets the maximal recordable snoop entries.
  1646.  
  1647. Usage of BDebug
  1648. ***************
  1649.  
  1650. The Breakpoint Window
  1651. =====================
  1652.  
  1653. Breakpoint window
  1654. -----------------
  1655.  
  1656.    The `BreakWindow' handles all breakpoints and contains the functions
  1657. that are needed with breakpoints.  In general, breakpoints are
  1658. addresses in the program where the task should be stopped.  The
  1659. breakpoints are handled globally so they aren't deleted when close the
  1660. window.
  1661.  
  1662. Local Menus
  1663. -----------
  1664.  
  1665.    * Toggle
  1666.  
  1667.      activates and deactivates all breakpoints.
  1668.  
  1669.    * All
  1670.  
  1671.      selects all breakpoints.
  1672.  
  1673.    * Clear
  1674.  
  1675.      unselects all breakpoints.
  1676.  
  1677.    * On
  1678.  
  1679.      activates all selected breakpoints.
  1680.  
  1681.    * Off
  1682.  
  1683.      deactivates all selected breakpoints.
  1684.  
  1685.    * Hit
  1686.  
  1687.      defines how often a breakpoint must be encountered before the
  1688.      program stops. Default is 1.
  1689.  
  1690.    * ?
  1691.  
  1692.      shows the hunk where the breakpoint is located and also shows if
  1693.      the breakpoint is equal to a symbol.
  1694.  
  1695.    * Input
  1696.  
  1697.      sets and removes a breakpoint.
  1698.  
  1699.    * Pick
  1700.  
  1701.      sets and removes a breakpoint using the symbol list.
  1702.  
  1703.    * Delete
  1704.  
  1705.      removes all selected breakpoint.
  1706.  
  1707.    * Goto
  1708.  
  1709.      opens a DissWindow for each selected breakpoint.
  1710.  
  1711.    * Run
  1712.  
  1713.      runs the program until the PC encounters a selected breakpoint.
  1714.  
  1715. Usage of BDebug
  1716. ***************
  1717.  
  1718. The Watchpoint Window
  1719. =====================
  1720.  
  1721. Watchpoint window
  1722. -----------------
  1723.  
  1724.    The `Watchwindow' allows to set breakpoints that aren't depending on
  1725. a certain PC address but on other conditions.  Every watchpoint has a
  1726. condition, data width and can have one of 3 different watchpoints
  1727. states.  The `Memory' watchpoint compares the saved contents of the
  1728. address with the current contents and dependent on the condition the
  1729. program is stopped or not.  The `Register' watchpoint compares the
  1730. saved contents of a register with the current contents and dependent on
  1731. the condition the program is stopped or not.  The `Argument' watchpoint
  1732. compares the saved value of an argument with the current contents and
  1733. dependent on the condition the program is stopped or not.  The last
  1734. watchpoint type is the most powerful because it can simulate the first
  1735. two types with the cost of a slowdown.  The use of watchpoints is very
  1736. time consuming because the whole program is run in single step mode.
  1737. In order to use watchpoi you have to run the task with `Run Watched
  1738. Task'.
  1739.  
  1740.      If an error occurs in the exception handler during the evaluation
  1741.      of a dynamic arugment, the screen flashes.
  1742.  
  1743.  
  1744. Local Menus
  1745. -----------
  1746.  
  1747.    * Toggle
  1748.  
  1749.      activates and deactivates all watchpoints.
  1750.  
  1751.    * All
  1752.  
  1753.      selects all watchpoints.
  1754.  
  1755.    * Clear
  1756.  
  1757.      unselects all watchpoints.
  1758.  
  1759.    * On
  1760.  
  1761.      activates all selected watchpoints.
  1762.  
  1763.    * Off
  1764.  
  1765.      deactivates all selected watchpoints.
  1766.  
  1767.    * Add
  1768.  
  1769.      opens a requester where the parameters for a watchpoint have to be
  1770.      adjusted and adds the new watchpoint to the list.  You can change
  1771.      the parameters simply by doubeclicking on a watchpoint.
  1772.  
  1773.    * Refresh
  1774.  
  1775.      refreshes the watchpoint arguments.
  1776.  
  1777.    * Check
  1778.  
  1779.      checks all selected watchpoints.
  1780.  
  1781.    * Delete
  1782.  
  1783.      removes all selected watchpoints.
  1784.  
  1785. Usage of BDebug
  1786. ***************
  1787.  
  1788. The Checksum Window
  1789. ===================
  1790.  
  1791. Checksum Window
  1792. ---------------
  1793.  
  1794.    The `ChecksumWindow' controls all checksum areas that are controlled
  1795. each time the task stops.  Helpful to find illegal random writes bugs.
  1796. The checkpoints are controled globally so they aren't deleted when you
  1797. close the window.
  1798.  
  1799. Local Menus
  1800. -----------
  1801.  
  1802.    * Toggle
  1803.  
  1804.      activates or deactivates all checksum areas.
  1805.  
  1806.    * All
  1807.  
  1808.      selects all checksum areas.
  1809.  
  1810.    * Clear
  1811.  
  1812.      unselects all checksum areas.
  1813.  
  1814.    * On
  1815.  
  1816.      activates all selected checksum areas.
  1817.  
  1818.    * Off
  1819.  
  1820.      deactivates all selected checksum areas.
  1821.  
  1822.    * Address
  1823.  
  1824.      adds a checksum area into the list.
  1825.  
  1826.    * Hunk
  1827.  
  1828.      adds a hunk of the current process into the checksum area list.
  1829.  
  1830.    * Task
  1831.  
  1832.      adds a hunk of selectable process into the checksum area list.
  1833.  
  1834.    * Refresh
  1835.  
  1836.      calculate a new checksum for all selected areas.
  1837.  
  1838.    * Delete
  1839.  
  1840.      removes all selected checksum areas.
  1841.  
  1842.    * Check
  1843.  
  1844.      checks all areas for checksum errors.
  1845.  
  1846. Usage of BDebug
  1847. ***************
  1848.  
  1849. Requester Arguments
  1850. ===================
  1851.  
  1852. Argument Structur
  1853. -----------------
  1854.  
  1855.    An argument can use absolut values, symbols and registers as
  1856. operands and the operators +,-,*,/,|,!,&,<<,>>,~.  Additionally to the
  1857. normal symbols, some special symbols are available.
  1858.  
  1859.    * By {Argument}.[b,w,l] you can read from a memory address, that is
  1860.      defined by the argument. An error is indicated if you specify an
  1861.      illegal address with isn't defined in the legal memory space.
  1862.  
  1863.    * \#d?  represents the address of the `Disswindows' with the ID ?
  1864.  
  1865.    * \#m?  represents the address of the `Memwindows' with the ID ?
  1866.  
  1867.    * \#c?  represents the address of the `Coppwindows' with the ID ?
  1868.  
  1869.    * \#h?  represents the address of the hunk ?.  Helpful for Enforcer
  1870.      and CyberGuard Hunk:Offset output
  1871.  
  1872.    * \#ea? represents the address of the EA with the number ?.  Check
  1873.      Register Window.
  1874.  
  1875.    * \#em? represents the contents where the address EA number ?
  1876.      points to.  Check Register Window. If the address EA is illegal an
  1877.      error is shown.
  1878.  
  1879.    * \#ls  represents the start address of a loaded binary file.
  1880.  
  1881.    * \#le  represents the end address of a loaded binary file.
  1882.  
  1883.    * \#ll  represents the length address of a loaded binary file.
  1884.  
  1885.    * \#p   represents the start address of the programs.  Only true for
  1886.      a loaded program.
  1887.  
  1888.    If you have the following Enforcer or CyberGuard hit output `Hunk
  1889. 0:$11c' you can calculate the address by entering the argument #h0+$11c.
  1890.  
  1891. Usage of BDebug
  1892. ***************
  1893.  
  1894. Technical Informations
  1895. ======================
  1896.  
  1897. Exceptions
  1898. ----------
  1899.  
  1900.    The Debugger can catch all exceptions if the system is still working.
  1901. If an exception is caused, the traphandler catches the exception and
  1902. tells the Debugger what went on so it can react on the exception.  If
  1903. the exception wasn't caused by the Debugger, the type and the possible
  1904. reason for the exception is shown.  The `Return-address' of the
  1905. debugged task points on an internal `ILLEGAL'. If the processor
  1906. encounters this `ILLEGAL' the task is closed and all windows are
  1907. removed.  You shouldn't step over this `ILLEGAL' because it increases
  1908. the possibility of a system crash.  If a task is caught by `Debug Next
  1909. Task' and notices a custom `finalPC' routine in the `Addtask()'
  1910. function, the `Return-address' isn't set on the internal `ILLEGAL'
  1911. cleanup function because the `finalPC' pointer is sometimes used for
  1912. parsing an argument.  In this case the Debugger notices that the task
  1913. ends by using the `RemTask()' function.
  1914.  
  1915.      If the task changes the `Return-address' the Debugger tries to
  1916.      determine the taskend by `RemTask'.
  1917.  
  1918.  
  1919. Exception Handler
  1920. -----------------
  1921.  
  1922.    Every task has a pointer in its task structure that points to its
  1923. exception handler, named `TC_TRAPCODE'.  When you load a program
  1924. through the Debugger, the Debugger's standard exception handler is
  1925. installed. It works basicly the same for `Catch Next Task' and `Debug
  1926. Task'.  The only difference is the `Debug Crashed Task' mode where the
  1927. Debugger sets a special catch exception handler in each task that isn't
  1928. controlled by the Debugger.  When an exception occurs and the
  1929. Debugger's exception handler is called the Debugger first checks if it
  1930. knows the task that caused it.  If this is not the case something
  1931. seriously is broken and the Deadend Alert 35000000 will be popped up.
  1932. If all goes well the registers are saved, the Debugger task gets a
  1933. message and the exception handler waits for a message by the Debugger
  1934. to go on.  When the Debugger gets the message it causes the appropriate
  1935. function. For example refreshing the windows.  If the Debugger gets a
  1936. step command it sends the exception handler the appropriate message and
  1937. the handler does a step.
  1938.  
  1939. Debug Informations
  1940. ------------------
  1941.  
  1942.    Currently the following formats are supported.
  1943.  
  1944.    * BASM Specialformat This format allows the Debugger to decide if
  1945.      the code is in the Mainpart, Includes or in a Macro.
  1946.  
  1947.    * SAS D1 This format only allows a Source-Code connection.  It
  1948.      doesn't support local variables, Structures and Macros.
  1949.  
  1950.    * GCC STABS This format is very powerful and offers all a
  1951.      source-level Debugger needs.  Unfortunately the Debugger only
  1952.      supports a simple Source-Code connection at the moment.  It's
  1953.      planned to support more in the future.
  1954.  
  1955. GCC Compiler and BDebug
  1956. -----------------------
  1957.  
  1958.    Unfortunately you can't debug programs that are using the current
  1959. `ixemul.library' because in Openlibrary() initroutine the Task field
  1960. TC_TRAPCODE is changed.  Hopefully there'll be soon an `ixemul.library'
  1961. available that doesn't change the traphandler.  If you're using GCC
  1962. with the link lib `gerlib' that is available on Aminet FTP Servers you
  1963. shouldn't experience any problems with BDebug.
  1964.  
  1965. Usage of BDebug
  1966. ***************
  1967.  
  1968. Configuration
  1969. =============
  1970.  
  1971.    The default configuration file is named `BDEBUG.Config' and is
  1972. located in the directory `<BarflyPath>/' or `s:Barfly/'.  Obviously
  1973. it's not optimal to be forced to use the same config file for different
  1974. programs. Therefore you can also specify a local config file with
  1975. program name and the suffix `.BDebug'.
  1976.  
  1977. ToolTypes
  1978. ---------
  1979.  
  1980.    The following tooltypes are supported to activate the basic
  1981. functions of the commandwindow.
  1982.  
  1983.    * CatchNextTask
  1984.  
  1985.    * CatchCrashedTask
  1986.  
  1987.    * CatchEnforcerHit
  1988.  
  1989. Barfly.FD
  1990. ---------
  1991.  
  1992.    Following steps are necessary to create a new `Barfly.FD' file with
  1993. new library functions.  First the assign `FD:' must point to the
  1994. directory containing the FD files that should be included in the new
  1995. `Barfly.FD'.  Make sure that every FD file contains the Library,
  1996. Resource and Device name in the first line in following format: `*
  1997. "foobar.libary"'.  If necessary, add the name yourself, so that a
  1998. correct FD database can be build up.  If you're more experienced with
  1999. FD files, you can yourself add new entries to the `Barfly.FD' file. The
  2000. layout of the `Barfly.FD' file pretty obvious.
  2001.  
  2002. Configuration Commands
  2003. ----------------------
  2004.  
  2005. Register window
  2006. ---------------
  2007.  
  2008. RegWindow=x/y/width/height/register
  2009. ...................................
  2010.  
  2011.    This command defines the position of a `REGWindow'.
  2012.  
  2013. RegFlags=flag[|flags...]
  2014. ........................
  2015.  
  2016.    This command defines certain flags in the `REGWindows'.
  2017.  
  2018.    * AUTOVIEWREFRESH
  2019.  
  2020.    * SYMBOLS
  2021.  
  2022.    * STACKCHECK
  2023.  
  2024.    * NOBIGVIEW
  2025.  
  2026. FPU Window
  2027. ----------
  2028.  
  2029. FpuWindow=x/y/width/height/register
  2030. ...................................
  2031.  
  2032.    This command defines the position of a `FPUWindow'.
  2033.  
  2034. OpenFPUWindows=Count
  2035. ....................
  2036.  
  2037.    This command tells the Debugger to open a `FPUWindow'.
  2038.  
  2039. Disassembler window
  2040. -------------------
  2041.  
  2042. DissWindow=x/y/width/height/register
  2043. ....................................
  2044.  
  2045.    This command defines the position,the dimension and linked register
  2046. of the `DissWindow'.
  2047.  
  2048.    Example: DISSWINDOW=0/0/300/100/PC
  2049.  
  2050. DissFlags=flag[|flags...]
  2051. .........................
  2052.  
  2053.    This command defines certain flags in the `DISSWindow'.
  2054.  
  2055.    * AUTOREFRESH
  2056.  
  2057.    * SHOWLIB
  2058.  
  2059.    * GUESSLIB
  2060.  
  2061.    * SHOWEA
  2062.  
  2063.    * WORDBRANCHES
  2064.  
  2065.    * NEGOFFSETS
  2066.  
  2067.    * NEGDI
  2068.  
  2069.    * OPCODEDATA
  2070.  
  2071.    * BLANKAFTERJMPBRA
  2072.  
  2073. OpenDissWindows=Count
  2074. .....................
  2075.  
  2076.    This command tells the Debugger to open a number of `DissWindows'.
  2077.  
  2078. Memory window
  2079. -------------
  2080.  
  2081. MemWindow=x/y/width/height/register
  2082. ...................................
  2083.  
  2084.    This command defines the position, the dimension and linked register
  2085. of the `MemWindow'.
  2086.  
  2087.    Example: MEMWINDOW=0/0/300/100/A0
  2088.  
  2089. OpenMemWindows=Count
  2090. ....................
  2091.  
  2092.    This command tells the Debugger to open a number of `MemWindows'.
  2093.  
  2094. MemoryOffsetStep=Count
  2095. ......................
  2096.  
  2097.    This command defines the Offset-Step of the `MemWindows'.
  2098.  
  2099.    * 0 no Space
  2100.  
  2101.    * 1 Space after each Byte.
  2102.  
  2103.    * 2 Space after each Word.
  2104.  
  2105.    * 4 Space after each Longword.
  2106.  
  2107. Copper window
  2108. -------------
  2109.  
  2110. CoppWindow=x/y/width/height/register
  2111. ....................................
  2112.  
  2113.    This command defines the position, the dimension and linked register
  2114. of the `CoppWindow'.
  2115.  
  2116.    Example: COPPWINDOW=0/0/300/100/A0
  2117.  
  2118. OpenCoppWindows=Count
  2119. .....................
  2120.  
  2121.    This command tells the Debugger to open a number of `CoppWindows'.
  2122.  
  2123. StructWindow
  2124. ------------
  2125.  
  2126. StructWindow=x/y/width/height/register
  2127. ......................................
  2128.  
  2129.    This command defines the position, the dimension and linked register
  2130. of the `StructWindow'.
  2131.  
  2132.    Example: StructWINDOW=0/0/300/100/A0
  2133.  
  2134. StructFlags=flag[|flags...]
  2135. ...........................
  2136.  
  2137.    This command defines certain flags for the `StructWindow'
  2138.  
  2139.    * AUTOREFRESH
  2140.  
  2141.    * ADDRESSFORMAT
  2142.  
  2143.    * OFFSETFORMAT
  2144.  
  2145.    * NEWWINDOW
  2146.  
  2147. OpenStructWindows=Count
  2148. .......................
  2149.  
  2150.    This command tells the Debugger to open a number of `StructWindows'.
  2151.  
  2152. Source window
  2153. -------------
  2154.  
  2155. SourceWindow=x/y/width/height/register
  2156. ......................................
  2157.  
  2158.    This command defines the position, the dimension and linked register
  2159. of the `SourceWindow'.
  2160.  
  2161.    Example: SOURCEWINDOW=0/0/300/100/A0
  2162.  
  2163. OpenSourceWindows=Count
  2164. .......................
  2165.  
  2166.    This command tells the Debugger to open a number of `SourceWindows'.
  2167.  
  2168. Breakpoint window
  2169. -----------------
  2170.  
  2171. BreakWindow=x/y/width/height
  2172. ............................
  2173.  
  2174.    This command defines the position of a `BreakPointWindow'.
  2175.  
  2176. OpenBreakWindows=Count
  2177. ......................
  2178.  
  2179.    This command tells the Debugger to open a `BreakPointWindow'.
  2180.  
  2181. Watchpoint window
  2182. -----------------
  2183.  
  2184. WatchWindow=x/y/width/height
  2185. ............................
  2186.  
  2187.    This command defines the position of a `WatchpoinzWindow'.
  2188.  
  2189. OpenWatchWindows=Count
  2190. ......................
  2191.  
  2192.    This command tells the Debugger to open a `WatchPointWindow'.
  2193.  
  2194. Checksum window
  2195. ---------------
  2196.  
  2197. ChecksumWindow=x/y/width/height
  2198. ...............................
  2199.  
  2200.    This command defines the position of a `ChecksumWindow'.
  2201.  
  2202. ChecksumWindows=Count
  2203. .....................
  2204.  
  2205.    This command tells the Debugger to open a `ChecksumWindow'.
  2206.  
  2207. SnoopMemory window
  2208. ------------------
  2209.  
  2210. SnoopMemWindow=x/y/width/height/register
  2211. ........................................
  2212.  
  2213.    This command defines the position of a `SnoopMemWindow'.
  2214.  
  2215. OpenSnoopMemWindow=Count
  2216. ........................
  2217.  
  2218.    This command tells the Debugger to open a `SnoopMemWindow'.
  2219.  
  2220. SnoopMask=Mask
  2221. ..............
  2222.  
  2223.    This command defines the snoop mask. The mask defines the length of
  2224. memory blocks that should be recorded.  Default is -1 so everything is
  2225. recorded.
  2226.  
  2227. SnoopMax=Count
  2228. ..............
  2229.  
  2230.    This command defines the count of snoop entries.  Default is 100.
  2231.  
  2232. HistoryEntrys=Count
  2233. ...................
  2234.  
  2235.    This command defines the count of history entries.  Default is 5.
  2236.  
  2237. Information Windows
  2238. -------------------
  2239.  
  2240. GlobalViewWindow=x/y/width/height
  2241. .................................
  2242.  
  2243.    This command defines the position and dimensions of a standard
  2244. information window. For example the Library Window belongs to this
  2245. group.
  2246.  
  2247.    Example: GLOBALVIEWWINDOW=0/0/300/100
  2248. GLOBALVIEWWINDOW=0/200/300/100
  2249.  
  2250. Other Windows
  2251. -------------
  2252.  
  2253. CommandWindow=x/y/width/height
  2254. ..............................
  2255.  
  2256.    This command defines the position of the small `CommandWindow'.
  2257. This command has no function in local configuration files.
  2258.  
  2259. FileShell=<Window Specifikation>
  2260. ................................
  2261.  
  2262.    This command defines the shell that is opened with the loaded
  2263. program. You should always open the shell on the Debugger's Public
  2264. Screen. The shell parameters are the same you know from the CLI.
  2265.  
  2266. Misc
  2267. ----
  2268.  
  2269. TaskStack=Count
  2270. ...............
  2271.  
  2272.    This command defines the stack of the loaded program.  Defaullt are
  2273. 4096 Bytes.
  2274.  
  2275. Priority=Count
  2276. ..............
  2277.  
  2278.    This command defines the Debugger's priority.
  2279.  
  2280. SetBreak=Argument
  2281. .................
  2282.  
  2283.    This command can be used to define a list of breakpoints that are
  2284. set before the program is started.  This is useful to pass the module
  2285. `Main.c' for example.  If no breakpoints are defined or if a parsing
  2286. problem occurs the standard breakpoint ( the first program instruction
  2287. ) is set.
  2288.  
  2289.    * SETBREAK=_main    ; SAS C Main Program Start
  2290.  
  2291.    * SETBREAK=_main    ; GCC C Main Program Start
  2292.  
  2293.    * SETBREAK=@main   ; DICE C Main Program Start
  2294.  
  2295.    * SETBREAK=!    ; Programstart(Default)
  2296.  
  2297. ClickBreak=State
  2298. ................
  2299.  
  2300.    This command can be used to define the action of the DissWindow on a
  2301. doubleclick.
  2302.  
  2303. `State=0'
  2304.      No Action(Default).
  2305.  
  2306. `State=1'
  2307.      Set/Clear Breakpoint and pop up a Requester for a Set.
  2308.  
  2309. `State=2'
  2310.      Set/Clear Breakpoint.
  2311.  
  2312. ShowMem=Start:End
  2313. .................
  2314.  
  2315.    defines the address areas that are legal to the Debugger so you can
  2316. look at address areas that are not in the memorylist or in the rom.
  2317. Illegal address areas are shown with `*' in the windows.  You should
  2318. `never' define the custom chip areas as legal because a read access on
  2319. a writeonly register can cause a deadly crash.
  2320.  
  2321.    Example: SHOWMEM=$e80000:$f00000          defines the Zorro 2 area
  2322. as free.
  2323.  
  2324.      By this command you can overrule the internal Enforcer or
  2325.      CyberGuard legal memory areas so you should be free of hits.
  2326.  
  2327.  
  2328. DefCommand=Key,Qualifier[|Qualifier...],Function
  2329. ................................................
  2330.  
  2331.    This commands allows to connect menu functions with key sequences.
  2332. Because of the object-oriented concept of the Debugger that allows
  2333. multiple instances of objects it's not easy to decide what object is
  2334. meant.  Therefore if the object is active it's used and if no object of
  2335. this type is active the first entry the object-type list is used.  As
  2336. the key parameter every Rawkey can be used with the exception of `TAB'
  2337. and the functionkeys that are used internally.  The key is searched
  2338. first in the local and then in the global configuration.
  2339.  
  2340.    As qualifiers you can use the following keys.
  2341.  
  2342.    * LSHIFT
  2343.  
  2344.    * RSHIFT
  2345.  
  2346.    * CAPSLOCK
  2347.  
  2348.    * CTRL
  2349.  
  2350.    * LALT
  2351.  
  2352.    * RALT
  2353.  
  2354.    * LCOMMAND
  2355.  
  2356.    * RCOMMAND
  2357.  
  2358.           Bespiel:      DEFCOMMAND=$15,CTRL,"Step 1 Position"
  2359.  
  2360.      Defines CTRL-Z as Step 1 Position
  2361.  
  2362. AutoDocDir=<Path>
  2363. .................
  2364.  
  2365.    This command sets the path for the autodocs directory.
  2366.  
  2367. AutoDocAlias=Library,File
  2368. .........................
  2369.  
  2370.    This command sets an alias for Libraries, Devices or Resources to
  2371. define the connected Autodocs file.  There's no other way because it's
  2372. impossible to build the autodocs file by knowing the library name.
  2373.  
  2374. ArexxPath=<rx-path>
  2375. ...................
  2376.  
  2377.    This command sets the Arexx-Script Start-Command.  In a normal
  2378. system the path should be <sys:Rexxc/rx>.
  2379.  
  2380. ArexxInput=<File>
  2381. .................
  2382.  
  2383.    This command sets the Arexx-Command Input-File.  If you don't
  2384. specify the file, NIL: is used.
  2385.  
  2386. ArexxOutput=<File>
  2387. ..................
  2388.  
  2389.    This command sets the Arexx-Command Output-File.  If you don't
  2390. specify the file, NIL: is used.
  2391.  
  2392. ArexxCommand=[1...10],<Pfad>
  2393. ............................
  2394.  
  2395.    This command sets the 10 entries in the Arexx-Menu.  You specify the
  2396. number and the path of the Arexx-Script.
  2397.  
  2398.    ArexxCommand=1,"Rexx:Example.rexx"
  2399.  
  2400. ExecuteCommand=<File>
  2401. .....................
  2402.  
  2403.    this command can set up a list of programs that should be run before
  2404. the debugged program's task is started.  This parameter only works with
  2405. programs which are loaded by the Debugger. You also have to make sure
  2406. that the loaded programs have to `end' otherwise the task can't be
  2407. started.  For example you could use this command to set breakpoints
  2408. with Arexx-Scripts.
  2409.  
  2410. LoadInclude
  2411. ...........
  2412.  
  2413.    tells the Debugger to load the structure information file
  2414. `Barfly.Include'.
  2415.  
  2416. AddStructFile=Filename
  2417. ......................
  2418.  
  2419.    tells the Debugger to load a custom structure information file and
  2420. adds it into the CUSTOM/ subtree.
  2421.  
  2422. ClicktoFront
  2423. ............
  2424.  
  2425.    activates the Debugger's own `ClicktoFront' handler.  This function
  2426. should only be used if you don't use an own `Commodity' for this task.
  2427.  
  2428. CenterWindow
  2429. ............
  2430.  
  2431.    activates centering mode for all stringrequester windows.
  2432.  
  2433. ScreenInFront
  2434. .............
  2435.  
  2436.    activates `ScreenToFront' mode that pops the screen to front after
  2437. every trace operation.
  2438.  
  2439. OpenScreen[=width,height,depth,mode]
  2440. ....................................
  2441.  
  2442.    tells the Debugger to open its own screen.  If you don't enter
  2443. dimension parameters the wb screen is cloned. For the mode string you
  2444. string you can see in `Prefs/ScreenMode' requester.  This command has
  2445. no function in local configuration files.
  2446.  
  2447.    OPENSCREEN=1448,560,2,PAL:HighRes Interlace
  2448.  
  2449. OpenPubScreen=Name
  2450. ..................
  2451.  
  2452.    tells the Debugger to open on the Pubscreen with the specified name.
  2453. This command has no function in local configuration files.
  2454.  
  2455. ScreenFont=fontname/Height
  2456. ..........................
  2457.  
  2458.    defines a font for a Debugger screen.  This command has no function
  2459. in local configuration files.
  2460.  
  2461. QuietException=Exception Nummer
  2462. ...............................
  2463.  
  2464.    masks off certain exceptions for the exception requester so that
  2465. only a `DisplayBeep' is caused instead of a textrequest.  With the
  2466. value -1 you can mask off every exception and for example with the
  2467. value 4 you mask off the `Illegal' exception.
  2468.  
  2469. DisableXPointer
  2470. ...............
  2471.  
  2472.    deactivate the Wait-Pointer.
  2473.  
  2474. TraceBreak
  2475. ..........
  2476.  
  2477.    tells the Debugger to use breakpoints in the `Subroutine' Traces
  2478. instead of single steps.  The advantage is a speed up and the
  2479. disadvantage is that you can cause crashes while you step through
  2480. resident/reentry code.
  2481.  
  2482. CrashedTask
  2483. ...........
  2484.  
  2485.    activates `CatchCrashedTask' mode.
  2486.  
  2487. CatchEnforcerHit
  2488. ................
  2489.  
  2490.    activates `CatchEnforcerHit' mode.
  2491.  
  2492. DoNotCacheFullFile
  2493. ..................
  2494.  
  2495.    tells the Debugger not to cache program files while reading the
  2496. Symbol/Debug informations to save memory.  Obviously the parsing speed
  2497. will decrease.
  2498.  
  2499. DoNotPopPathRequest
  2500. ...................
  2501.  
  2502.    tells the Debugger to ignore errors from opening source files and
  2503. not to open a path requester.
  2504.  
  2505. NoAutoStructAction
  2506. ..................
  2507.  
  2508.    tells the Debugger to open a type-requester by an action in the
  2509. Structure Window.
  2510.  
  2511. NoBreakpointErrors
  2512. ..................
  2513.  
  2514.    tells the Debugger to ignore SETBREAK= errors that cause the
  2515. Debugger to always set an error on the program start.
  2516.  
  2517. Usage of BDebug
  2518. ***************
  2519.  
  2520. Arexx
  2521. =====
  2522.  
  2523. Commands
  2524. --------
  2525.  
  2526. SIMPLEREQUEST "
  2527. ...............
  2528.  
  2529.    * RC: -
  2530.  
  2531.    * result: 'OK'
  2532.  
  2533. TWOGADREQUEST "
  2534. ...............
  2535.  
  2536.    * RC: -
  2537.  
  2538.    * result: 'OK','FALSE'
  2539.  
  2540. TRIGADREQUEST "
  2541. ...............
  2542.  
  2543.    * RC: -
  2544.  
  2545.    * result: 'OK','FALSE','RESUME'
  2546.  
  2547. NEXT_ROOTWINDOW
  2548. ...............
  2549.  
  2550.    * RC: -
  2551.  
  2552.    * result: 'OK','FALSE'
  2553.  
  2554. NEXT_SUBWINDOW
  2555. ..............
  2556.  
  2557.    * RC: -
  2558.  
  2559.    * result: 'OK','FALSE'
  2560.  
  2561. FIRST_DISSWINDOW
  2562. ................
  2563.  
  2564.    * RC: -
  2565.  
  2566.    * result: 'OK','FALSE'
  2567.  
  2568. FIRST_MEMWINDOW
  2569. ...............
  2570.  
  2571.    * RC: -
  2572.  
  2573.    * result: 'OK','FALSE'
  2574.  
  2575. FIRST_COPPWINDOW
  2576. ................
  2577.  
  2578.    * RC: -
  2579.  
  2580.    * result: 'OK','FALSE'
  2581.  
  2582. FIRST_FPUWINDOW
  2583. ...............
  2584.  
  2585.    * RC: -
  2586.  
  2587.    * result: 'OK','FALSE'
  2588.  
  2589. FIRST_BREAKPOINTWINDOW
  2590. ......................
  2591.  
  2592.    * RC: -
  2593.  
  2594.    * result: 'OK','FALSE'
  2595.  
  2596. FIRST_STRUCTWINDOW
  2597. ..................
  2598.  
  2599.    * RC: -
  2600.  
  2601.    * result: 'OK','FALSE'
  2602.  
  2603. FIRST_SOURCEWINDOW
  2604. ..................
  2605.  
  2606.    * RC: -
  2607.  
  2608.    * result: 'OK','FALSE'
  2609.  
  2610. FIRST_SNOOPWINDOW
  2611. .................
  2612.  
  2613.    * RC: -
  2614.  
  2615.    * result: 'OK','FALSE'
  2616.  
  2617. FIRST_WATCHWINDOW
  2618. .................
  2619.  
  2620.    * RC: -
  2621.  
  2622.    * result: 'OK','FALSE'
  2623.  
  2624. ACTIVATE_ROOTWINDOW
  2625. ...................
  2626.  
  2627.    * RC: -
  2628.  
  2629.    * result: 'OK','FALSE'
  2630.  
  2631. ACTIVATE_SUBWINDOW
  2632. ..................
  2633.  
  2634.    * RC: -
  2635.  
  2636.    * result: 'OK','FALSE'
  2637.  
  2638. OPEN_DISSWINDOW '@REG' | 'Argument'
  2639. ...................................
  2640.  
  2641.    * RC: -
  2642.  
  2643.    * result: -
  2644.  
  2645. OPEN_MEMWINDOW '@REG' | 'Argument'
  2646. ..................................
  2647.  
  2648.    * RC: -
  2649.  
  2650.    * result: -
  2651.  
  2652. OPEN_COPPWINDOW '@REG' | 'Argument'
  2653. ...................................
  2654.  
  2655.    * RC: -
  2656.  
  2657.    * result: -
  2658.  
  2659. OPEN_SOURCEWINDOW '@REG' | 'Argument'
  2660. .....................................
  2661.  
  2662.    * RC: -
  2663.  
  2664.    * result: -
  2665.  
  2666. OPEN_STRUCTWINDOW '@REG' | 'Argument'
  2667. .....................................
  2668.  
  2669.    * RC: -
  2670.  
  2671.    * result: -
  2672.  
  2673. OPEN_BREAKPOINTWINDOW
  2674. .....................
  2675.  
  2676.    * RC: -
  2677.  
  2678.    * result: -
  2679.  
  2680. OPEN_FPUWINDOW
  2681. ..............
  2682.  
  2683.    * RC: -
  2684.  
  2685.    * result: -
  2686.  
  2687. OPEN_SNOOPMEMORYWINDOW
  2688. ......................
  2689.  
  2690.    * RC: -
  2691.  
  2692.    * result: -
  2693.  
  2694. DOMENU 'Menu-String'
  2695. ....................
  2696.  
  2697.    * RC: -
  2698.  
  2699.    * result: -
  2700.  
  2701. SET_BREAKPOINT 'Argument'
  2702. .........................
  2703.  
  2704.    * RC: -
  2705.  
  2706.    * result: 'OK','FALSE'
  2707.  
  2708. CLEAR_ICACHE 'Address,Length'
  2709. .............................
  2710.  
  2711.    * RC: -
  2712.  
  2713.    * result: 'OK'
  2714.  
  2715. CLEAR_ICACHE 'Address,Length'
  2716. .............................
  2717.  
  2718.    * RC: -
  2719.  
  2720.    * result: 'OK'
  2721.  
  2722. GOTO_ADDRESS 'Address'
  2723. ......................
  2724.  
  2725.    * RC: -
  2726.  
  2727.    * result: 'OK','FALSE'
  2728.  
  2729. CLEAR_ADDRESS
  2730. .............
  2731.  
  2732.    * RC: -
  2733.  
  2734.    * result: 'OK','FALSE'
  2735.  
  2736. LINK_REGISTER 'Register'
  2737. ........................
  2738.  
  2739.    * RC: -
  2740.  
  2741.    * result: 'OK','FALSE'
  2742.  
  2743. SET_REGISTER 'Register,Value'
  2744. .............................
  2745.  
  2746.    * RC: -
  2747.  
  2748.    * result: 'OK','FALSE'
  2749.  
  2750. Read_Byte 'Address'
  2751. ...................
  2752.  
  2753.    RC    : 0=Ok    Result: Result-String
  2754.  
  2755. Read_Word 'Address'
  2756. ...................
  2757.  
  2758.    RC    : 0=Ok    Result: Result-String
  2759.  
  2760. Read_Long 'Address'
  2761. ...................
  2762.  
  2763.    RC    : 0=Ok    Result: Result-String
  2764.  
  2765. Write_Byte 'Address,Value'
  2766. ..........................
  2767.  
  2768.    RC    : 0=Ok
  2769.  
  2770. Write_Word 'Address,Value'
  2771. ..........................
  2772.  
  2773.    RC    : 0=Ok
  2774.  
  2775. Write_Long 'Address,Value'
  2776. ..........................
  2777.  
  2778.    RC    : 0=Ok
  2779.  
  2780. ASL_FileRequester_Save
  2781. ......................
  2782.  
  2783.    RC    : 0=Ok    Result: Filepath-String
  2784.  
  2785. ASL_FileRequester_Load
  2786. ......................
  2787.  
  2788.    RC    : 0=Ok    Result: Filepath-String
  2789.  
  2790. IS_ADDRESS_LEGAL 'Address'
  2791. ..........................
  2792.  
  2793.    * RC: -
  2794.  
  2795.    * result: 'OK','FALSE'
  2796.  
  2797. LOAD_BINARY 'Name,Destination,Length'
  2798. .....................................
  2799.  
  2800. SAVE_BINARY 'Name,Source,Length'
  2801. ................................
  2802.  
  2803. Usage of BDebug
  2804. ***************
  2805.  
  2806. How to use BDebug ?
  2807. ===================
  2808.  
  2809. Trouble Shooting
  2810. ----------------
  2811.  
  2812.    First you should be sure that all necessary configurations file have
  2813. been installed because without `Barfly.FD' file you don't see any
  2814. function names in the disassembler window; and without `Barfly.Include'
  2815. the `StructWindow' is unusable.  Are these preconditions fullfilled you
  2816. should analyse the problem and anticipate how the Debugger can be used.
  2817. Because the debugging of programs depends heavily on the situation i
  2818. can only list some general points.  The reality probably looks
  2819. different... as always:-)
  2820.  
  2821.    Point of departure:
  2822.  
  2823.    * Program from the CLI
  2824.  
  2825.         * 1 Task
  2826.  
  2827.           The program can be started by `bdebug Program [Argument]' or
  2828.           can be loaded the command window `Debug File'.  By this
  2829.           method all symbol and debug files are loaded.  If the
  2830.           Debugger can't find a source file you can add additional
  2831.           paths if you haven't disabled this function.  The standard
  2832.           breakpoint is the first command in the program.  Sometimes
  2833.           this is inconvenient, and you may want to set a different
  2834.           start breakpoint for example to jump over the CStartup code
  2835.           or to set it tn an important program position.
  2836.  
  2837.         * Creates further Tasks
  2838.  
  2839.           In this case you should be sure how you want to catch the next
  2840.           Task. You could catch the Task by `Next Task' or compile the
  2841.           program with an `illegal' in the task and catch it with
  2842.           `Crashed Task'.  After you caught the task you probably would
  2843.           like to use see symbols and debug source.  These informations
  2844.           can be loaded afterwards by using `Load Symbols'.
  2845.  
  2846.    * Program from the WB
  2847.  
  2848.      In this case you should use `Next Task' and then catch the task
  2849.      `WBL'. Afterwards you have to activate `Next Task' again and run
  2850.      `WBL'. You could also use the `illegal' strategy.  After the right
  2851.      task was caught you can load the symbols again.
  2852.  
  2853.    * Is it a Handler, Filesystem or something similar.
  2854.  
  2855.      In this case you should use the `illegal' strategy and catch the
  2856.      task by `Crashed Task'.  An alternative method would be to catch
  2857.      the waiting task with `Debug Task' and wait as long as the task
  2858.      gets woken up by a signal.
  2859.  
  2860.    After you've taken the first hurdles in taking control over the task,
  2861. you should think about how the problem looks like and where it could be
  2862. located.
  2863.  
  2864.    Problem Type:
  2865.  
  2866.    * Enforcer/CyberGuard
  2867.  
  2868.      If an Enforcer or CyberGuard hit is caused, these programs output
  2869.      the hit's program address and most of the time the hunk offset as
  2870.      well.  You can now directly jump to the address by entering the
  2871.      address in the DissWindow by `Change Address' or you open a
  2872.      HunkWindow, doubleclick on the hunk where the hit is located and
  2873.      then enter the offset returned by Enforcer or CyberGuard.  The
  2874.      Debugger itself can also automaticlly stop a debugged program if a
  2875.      hit happens.
  2876.  
  2877.    * Mungwall
  2878.  
  2879.      These hits aren't as easy to find as Enforcer or CyberGuard hits
  2880.      because Mungwall hits aren't shown when the problem happened but
  2881.      only after a `FreeMem'.  In this case you should remember the
  2882.      memoryblock where it happened and determine where the responsible
  2883.      AllocMem is located in the program, so you get an overview in what
  2884.      area the problem is caused.  Now you should open a MemWindow that
  2885.      points to this certain memory area and step through the program
  2886.      and look if something changes the mungwall borders in the
  2887.      MemWindow.  Mungwall borders are before and after the allocated
  2888.      memory area.  If you're more experienced you could also use the
  2889.      WatchpointWindow and set a watchpoint on the certain memory block.
  2890.  
  2891.    * Crash
  2892.  
  2893.      If it's just an ordinary crash the error should be pretty easy to
  2894.      find by single stepping through the responsible code area.  If
  2895.      it's a random crash you should try `Crashed Task' and hope that
  2896.      the task can be caught.  After the task got caught you should
  2897.      check the instructions that caused the crash. If the PC points to
  2898.      data fields that don't look like real code the PC is probably set
  2899.      wrong by a stack cleanup error.  In this case you should check if
  2900.      the next addresses on the stack point to legal program code.
  2901.  
  2902.    * Side effects and mysterious bugs
  2903.  
  2904.      These bugs are the worst to find and there's no general strategy
  2905.      how to find them. In such cases only intuition and patience can
  2906.      help.
  2907.  
  2908. Problems that can happen
  2909. ------------------------
  2910.  
  2911.    * Why does the Debugger react so slow on keyboard commands that
  2912.      control the tracing ?
  2913.  
  2914.      This happens if you debug a task with a higher priority than the
  2915.      Debugger's priority.  For example. DOS-Handler.  Workaround is to
  2916.      increase the priority of the Debugger.
  2917.  
  2918.    * Why do filerequesters block the Debugger.
  2919.  
  2920.      This happens when you debug a handler, because the filerequester
  2921.      normally tests every handler with a IsFilesystem(). When you debug
  2922.      a handler it can't reply the IsFilesystem packet and therefore the
  2923.      filerequester is busy.
  2924.  
  2925.    * If you debug the following program on a 68040 with 68040.library
  2926.      or 68060.library the instruction `rts' is run if you cause a
  2927.      Single-Step on the instruction `fetox'.  Because this command
  2928.      isn't implemented in the 68040 and 68060 it has to be emulated. It
  2929.      seems to forget the tracebit.
  2930.  
  2931.               mc68040
  2932.               fmove.x    #1.3,fp0
  2933.               fmove.x    #255,fp1
  2934.               fetox.x    fp0,fp1
  2935.               rts
  2936.  
  2937.    * If a program doesn't return from a DOS function, check whether you
  2938.      accidently entered a char in shell window.
  2939.  
  2940.                                BAsm 1.0
  2941.  
  2942.                     A cli/arexx controled Assembler
  2943.  
  2944.                   Copyright (c) 1989-94 Ralph Schmidt
  2945.  
  2946.                              - Shareware -
  2947.  
  2948. The Assembler
  2949. *************
  2950.  
  2951.    The assembler understands the commands and addressmodes from the
  2952. 68000 through the 68060 and both the Floating-Point Units, 68881 and
  2953. 68882.  It supports only the 68851 MMU commands, which are also
  2954. supported by the 68030.  The assembler achieves it's speed by
  2955. translating the source in a single pass, followed by a backpatch phase
  2956. which corrects all unresolved references.
  2957.  
  2958. Syntax
  2959. ======
  2960.  
  2961. Comments
  2962. --------
  2963.  
  2964.    A comment can start in several different ways.  In a pure comment it
  2965. starts either with a ; or *.  A comment can only be started after an
  2966. assembler command or symbol with a ; if an assembler command or symbol
  2967. exists within that line.
  2968.  
  2969.          ;A comment
  2970.      *A comment
  2971.          move.l a0,a0    ;A comment
  2972.  
  2973. Opcode/Instructions arrangement
  2974. -------------------------------
  2975.  
  2976.    `[label[:]] [opcode] [operand[, operand[, operand...]]]]]'
  2977.  
  2978.    * Opcodes
  2979.  
  2980.      An Opcode can be a Motorola Mnemonic, an assembler command, or a
  2981.      Macro call.
  2982.  
  2983.    * Operations
  2984.  
  2985.      In a Motorola mnemonic operands are based on legal addressmoes; in
  2986.      assembler privat instructions the parameters depend on the
  2987.      instruction.
  2988.  
  2989. Symbol structure
  2990. ----------------
  2991.  
  2992.    A symbol can represent the following types:
  2993.  
  2994.    * Value
  2995.  
  2996.    * Program Counter
  2997.  
  2998.    * Register
  2999.  
  3000.    * Register List
  3001.  
  3002.    * Macro
  3003.  
  3004.    Symbols can only be defined once. The exceptions are local labels
  3005. and symbols defined by Set.
  3006.  
  3007.                      Structure rules for Symbols.
  3008.  
  3009.    * The first letter of a symbol can be one of the following: a...z,
  3010.      A...Z,_, @,. and \.
  3011.  
  3012.    * From the second letter on, the symbol can contain the following
  3013.      letters: a...z, A...Z, 0...9, _,@ and ..
  3014.  
  3015.    * If a symbol consists of only numbers and ends with $, then it is a
  3016.      numerical local label.
  3017.  
  3018.    * A symbol is ended by an illegal letter.
  3019.  
  3020.    * If a symbol begins with a . or \, then it is a local label.
  3021.  
  3022.    * A macro symbol should not contain a ..
  3023.  
  3024.    * To avoid a conflict, a symbol should not end with .b, .w or .l.
  3025.  
  3026.  
  3027.      ThisIsALabel              ;That is a normal label
  3028.      ThisIsALabel1.loop:       ;That is a normal label
  3029.      This@_Is_@A_@Label
  3030.      1$:                       ;That is a numerical local label
  3031.      .ThisIsALabel             ;That is a local label
  3032.      .ThisIsALael1:            ;That is a local label
  3033.      \ThisIsALabel.loop:       ;That is a local label
  3034.      ThisIsASymbol=10
  3035.      ThisIsASymbol = 10
  3036.      ThisIsASymbol equ 10
  3037.  
  3038. The relative label
  3039. ------------------
  3040.  
  3041.    This symbol represents an offset to the start of a program.
  3042.  
  3043.  
  3044.      label
  3045.      label:
  3046.      label    nop
  3047.      label: nop
  3048.  
  3049. The local Label
  3050. ---------------
  3051.  
  3052.    A local label is only valid between two normal relative labels, thus
  3053. you cannot reference local labels outside of that scope.  Otherwise it
  3054. works similar as a normal label.  There are 2 different prefixes that
  3055. introduce a local label: . and \ that define 2 different local labels.
  3056. A special case is the Backward Reference Label that is introduced with
  3057. ... It doesn't depend on a certain define area between normal labels
  3058. thus you can only access the symbol if it were defined earlier.
  3059.  
  3060.  
  3061.      ..:
  3062.      label_0:
  3063.      .local:
  3064.       bra.s .local
  3065.      label_1:
  3066.      .local:
  3067.       bra.s \local
  3068.      \local:
  3069.       nop
  3070.      label_end:
  3071.      ..:
  3072.       dbra d0,..
  3073.      ..:
  3074.       dbra d1,..
  3075.      ..Hello:
  3076.       dbra d1,..Hello
  3077.  
  3078. The local numerical label
  3079. -------------------------
  3080.  
  3081.    Addionally to the non-numerical local label there are also the
  3082. numerical labels which are based of 4 digits with the postfix $.  BASM
  3083. handles the number as a hash key with the consequence that there's no
  3084. difference between 001$ and 1$.
  3085.  
  3086.  
  3087.  
  3088.      label_0:
  3089.      123$:    nop
  3090.      label_1:
  3091.      123$:    nop
  3092.  
  3093. The absolute Symbol
  3094. -------------------
  3095.  
  3096.    The absolute symbol is defined by a direct value initializing that
  3097. is initiated by =, equ or set.  If you define a symbol by set you can
  3098. change it as often as needed.
  3099.  
  3100.  
  3101.  
  3102.      value1=2
  3103.      value2 equ value1*2
  3104.      value3 set value2
  3105.  
  3106. The Register Symbol
  3107. -------------------
  3108.  
  3109.    The register symbol is defined by `equr' or `fequr' that is used for
  3110. FPU registers.
  3111.  
  3112.  
  3113.  
  3114.      Ptr    equr    a1
  3115.      PI    fequr    fp2
  3116.       move.l   (Ptr),d0   ;move.l  (a1),d0
  3117.       fmove.x  PI,fp0     ;fmove.x fp2,fp0
  3118.  
  3119. The Register List Symbol
  3120. ------------------------
  3121.  
  3122.    The register list symbol is defined by `reg' and represents the
  3123. register mask for `Movem' and `fmovem'.  You must not mix FPU and
  3124. Integer registers with each other in a register list.
  3125.  
  3126.  
  3127.      mask    reg    d0/d2/d4-d7/a0-a4/a6-a7
  3128.      mask1    reg    d0-a6
  3129.      mask2    reg    d0-6
  3130.      fmask    reg    fp0-fp2/fp4-fp5
  3131.  
  3132. The Macro Symbol
  3133. ----------------
  3134.  
  3135.    By using the command `macro' or `cmacro' after the symbol, the
  3136. symbol is defined as a macro.  The macro block is terminated by the
  3137. command endm.  The Macro cmacro is case-insensitive and therefore
  3138. useful to emulate commands that are missing from the core.
  3139.  
  3140.  
  3141.  
  3142.  
  3143.      Symbol[:] macro
  3144.      .
  3145.      .
  3146.      Symbol[:] endm
  3147.  
  3148. Datatypes
  3149. ---------
  3150.  
  3151.    The assembler understands 3 distinct datatypes.
  3152.  
  3153.    * 32Bit Integer
  3154.  
  3155.    * 96Bit Extended Floating Point
  3156.  
  3157.    * 96Bit Packed Binary Floating Point
  3158.  
  3159.    At the moment only integer datatypes are supported in arithmetic
  3160. arguments so you can only use the FPU datatypes as constants.
  3161.  
  3162.      +-------------+--------------------+
  3163.      | Format      | Representation     |
  3164.      +-------------+--------------------+
  3165.      +-------------+--------------------+
  3166.      | Decimal     | 1024               |
  3167.      +-------------+--------------------+
  3168.      | Hexadecimal | $400               |
  3169.      +-------------+--------------------+
  3170.      | Binary      | %10000000000       |
  3171.      +-------------+--------------------+
  3172.      | Ascii       | "OK", 'OK' or `OK` |
  3173.      +-------------+--------------------+
  3174.  
  3175.    Furthermore you can use symbols or the character `*' that represents
  3176. the program counter in arguments.  There are limitation in the use of
  3177. symbols in arguments.  For example you can only add or subtract
  3178. constants from an external label, Floatingpoint Values can only be used
  3179. as simple constants,...  By the postfix `k' after decimal value the
  3180. value is multply by $1000.
  3181.  
  3182.                         `Floating Point Format'
  3183.  
  3184.      +-------------+-------------------------------------+
  3185.      | Format      | Representation                      |
  3186.      +-------------+-------------------------------------+
  3187.      +-------------+-------------------------------------+
  3188.      | Extended    | '[+,-]3. 145637848298628[e[+,-]123] |
  3189.      +-------------+-------------------------------------+
  3190.      | Packed      | ''[+,-]3. 145637848298628[e[+,-]123]|
  3191.      +-------------+-------------------------------------+
  3192.  
  3193. Datatype Conversion
  3194. -------------------
  3195.  
  3196.    All commands are performed with these 3 datatypes and then converted
  3197. into the required datatype.  For example a 32Bit integer can be
  3198. converted into 16Bit and 8 Bit; an extended floating point into a
  3199. double or single floating point.  Floating point datatypes are rounded
  3200. by a convertation.  If a rouding error occurs the parser returns with
  3201. an error.
  3202.  
  3203. Datatype Format
  3204. ---------------
  3205.  
  3206.                       Internal Datatype Structure
  3207.  
  3208.    * Integer
  3209.  
  3210.      +--------+---------+
  3211.      | Bit 31 | 30..0   |
  3212.      +--------+---------+
  3213.      +--------+---------+
  3214.      |    S   | Integer |
  3215.      +--------+---------+
  3216.  
  3217.    * Single Floating Point
  3218.  
  3219.      +--------+-----------------+------------+
  3220.      | Bit 31 | Bits 30..23     | Bits 22..0 |
  3221.      +--------+-----------------+------------+
  3222.      +--------+-----------------+------------+
  3223.      |  Sign  | Biased Exponent |  Fraction  |
  3224.      +--------+-----------------+------------+
  3225.  
  3226.    * Double Floating Point
  3227.  
  3228.      +--------+-----------------+------------+
  3229.      | Bit 63 | Bits 62..52     | Bits 51..0 |
  3230.      +--------+-----------------+------------+
  3231.      +--------+-----------------+------------+
  3232.      |  Sign  | Biased Exponent |  Fraction  |
  3233.      +--------+-----------------+------------+
  3234.  
  3235.    * Extended Floating Point
  3236.  
  3237.      +--------+-----------------+------------+
  3238.      | Bit 95 | Bits 94..80     | Bits 62..0 |
  3239.      +--------+-----------------+------------+
  3240.      +--------+-----------------+------------+
  3241.      |  Sign  | Biased Exponent |  Mantisse  |
  3242.      +--------+-----------------+------------+
  3243.  
  3244.    * Packed Binary Floating Point
  3245.  
  3246.      +------+------+------+------+------+------+------+------+
  3247.      | MEYY | EXP2 | EXP1 | EXP0 | EXP3 | 0000 | 0000 | M016 |
  3248.      +------+------+------+------+------+------+------+------+
  3249.      | M015 | M014 | M013 | M012 | M011 | M010 | M009 | M008 |
  3250.      +------+------+------+------+------+------+------+------+
  3251.      | M007 | M006 | M005 | M004 | M003 | M002 | M001 | M000 |
  3252.      +------+------+------+------+------+------+------+------+
  3253.  
  3254.    * M is the sign (+ or -) of the fraction
  3255.  
  3256.    * E is the sign (+ or -) of the exponent
  3257.  
  3258.    * Y are the internal flags for infinity and NAN
  3259.  
  3260.    * E002-000 are the numbers of the exponent from 2 to 0, EXP3 is used
  3261.      internally.
  3262.  
  3263.    * M016-000 are the numbers of the fraction from 16 to 0. Each number
  3264.      lies in the range from 0 to 9..
  3265.  
  3266. Operations
  3267. ----------
  3268.  
  3269. Operators
  3270. ---------
  3271.  
  3272.      +----------+-------------------------------+
  3273.      | Operator | Function                      |
  3274.      +----------+-------------------------------+
  3275.      +----------+-------------------------------+
  3276.      |   `+'    | 32Bit signed Addition         |
  3277.      +----------+-------------------------------+
  3278.      |   `-'    | 32Bit signed Subtraction      |
  3279.      +----------+-------------------------------+
  3280.      |   `*'    | 32Bit signed Multiplication   |
  3281.      +----------+-------------------------------+
  3282.      |   `/'    | 32Bit signed Division         |
  3283.      +----------+-------------------------------+
  3284.      |   '|'    | 32Bit Or                      |
  3285.      +----------+-------------------------------+
  3286.      |   `!'    | 32Bit Or                      |
  3287.      +----------+-------------------------------+
  3288.      |   `&'    | 32Bit And                     |
  3289.      +----------+-------------------------------+
  3290.      |   `^'    | 32Bit Eor                     |
  3291.      +----------+-------------------------------+
  3292.      |   `<<'   | logic 32Bit Shift to the left |
  3293.      +----------+-------------------------------+
  3294.      |   `>>'   | logic 32Bit Shift to the right|
  3295.      +----------+-------------------------------+
  3296.      |   `~'    | 32Bit Not                     |
  3297.      +----------+-------------------------------+
  3298.  
  3299.      Basm cares for the operator priorities but be careful while
  3300.      porting Seka Sources because Seka doesn't care for the priorities.
  3301.  
  3302. Functions
  3303. ---------
  3304.  
  3305.    The following functions are supported.
  3306.  
  3307.    * _bitnum(Argument) calculates the bit number of the argument. If
  3308.      this is impossible an error occurs.
  3309.  
  3310.    * _bitfield(Argument) calculates the bit mask of the argument. If
  3311.      this is impossible an error occurs.
  3312.  
  3313.    * _extb(Argument) equal to the 680xx command extb
  3314.  
  3315.    * _extw(Argument) equal to the 680xx command extw
  3316.  
  3317.    * _min(Argument[,Argument,...]) calculate the minimum of the
  3318.      argument.
  3319.  
  3320.    * _max(Argument[,Argument,...]) calculate the maximum of the
  3321.      argument.
  3322.  
  3323. Assembler Commands
  3324. ==================
  3325.  
  3326. Hunk/Link Commands
  3327. ------------------
  3328.  
  3329. [Label] section Name[,Typ[,[RelocModus,Memtyp]
  3330. ..............................................
  3331.  
  3332.    defines a new logical unit so that the DOS-Loader has the
  3333. opportuntity to place smaller hunks into free memory blocks.  Another
  3334. use for this command is to set different memory types for the hunk to
  3335. load gfx data into the chipmem.  If you don't specify the section type
  3336. it assumes "",Code,Public.
  3337.  
  3338.    * Name = Hunkname
  3339.  
  3340.    * Hunk type
  3341.  
  3342.     `CODE'
  3343.           starts a code segment.
  3344.  
  3345.     `DATA'
  3346.           starts a data segment.
  3347.  
  3348.     `BSS'
  3349.           starts an undefined data segment.
  3350.  
  3351.     `DEBUG'
  3352.           starts a custom debug segment.
  3353.  
  3354.     `CUSTOM'
  3355.           starts a Custom-Hunk area.
  3356.  
  3357.    * Reloc-Mode defines the width of the hunk relocation. Default 32Bit
  3358.  
  3359.     `RELOC16'
  3360.           sets the reloc width to 16bit.(V37)
  3361.  
  3362.     `RELOC32'
  3363.           sets the reloc width to 32bit.(Default)
  3364.  
  3365.    * Memtype defines the memory attributes of the hunk.  If you add a
  3366.      `_p', `_c', or `_f' upon the type parameter, you cannot use more
  3367.      memtypes.The memtype `DEBUG' does not allow memory attribute
  3368.      suffixes.
  3369.  
  3370.     `PUBLIC'
  3371.           loads the hunk into the memory with the highest priority.
  3372.           Code Suffix _p.
  3373.  
  3374.     `CHIP'
  3375.           loads the hunk into chip memory. Code Suffix _c.
  3376.  
  3377.     `FAST'
  3378.           loads the hunk into fast memory. Code Suffix _f.
  3379.  
  3380.     `ADVISORY'
  3381.           ignores the hunk if the OS doesn't understand the type. A
  3382.           kind of Debug-Hunk that can be used by the OS.(V39)
  3383.  
  3384.     `ATTR=?'
  3385.           loads the hunk into the memory with specified memory
  3386.           attributs. (V37)
  3387.  
  3388. [Label] code [Name[, Memtyp]]
  3389. .............................
  3390.  
  3391.    defines a new code hunk and is equivalent to the command `section
  3392. ?,code,?'.
  3393.  
  3394.    * Name = Hunkname
  3395.  
  3396.    * Memtype defines the memory attributes for the hunk.
  3397.  
  3398.     `PUBLIC'
  3399.           loads the hunk into the memory with the highest priority.
  3400.           Code Suffix _p.
  3401.  
  3402.     `CHIP'
  3403.           loads the hunk into chip memory. Code Suffix _c.
  3404.  
  3405.     `FAST'
  3406.           loads the hunk into fast memory. Code Suffix _f.
  3407.  
  3408.     `ADVISORY'
  3409.           ignores the hunk if the OS doesn't understand the type. A
  3410.           kind of Debug-Hunk that can be used by the OS.(V39)
  3411.  
  3412.     `ATTR=?'
  3413.           loads the hunk into the memory with specified memory
  3414.           attributs. (V37)
  3415.  
  3416. [Label] data [Name[, Memtyp]]
  3417. .............................
  3418.  
  3419.    defines a new data hunk and is equivalent to the command `section
  3420. ?,data,?'.
  3421.  
  3422.    * Name = Hunkname
  3423.  
  3424.    * Memtype defines the memory attributes for the hunk.
  3425.  
  3426.     `PUBLIC'
  3427.           loads the hunk into the memory with the highest priority.
  3428.           Code Suffix _p.
  3429.  
  3430.     `CHIP'
  3431.           loads the hunk into chip memory. Code Suffix _c.
  3432.  
  3433.     `FAST'
  3434.           loads the hunk into fast memory. Code Suffix _f.
  3435.  
  3436.     `ADVISORY'
  3437.           ignores the hunk if the OS doesn't understand the type. A
  3438.           kind of Debug-Hunk that can be used by the OS.(V39)
  3439.  
  3440.     `ATTR=?'
  3441.           loads the hunk into the memory with specified memory
  3442.           attributs. (V37)
  3443.  
  3444. [Label] bss [Name[, Memtyp]]
  3445. ............................
  3446.  
  3447.    defines a new BSS hunk and is equivalent to the command `section
  3448. ?,bss,?'.
  3449.  
  3450.    * Name = Hunkname
  3451.  
  3452.    * Memtype defines the memory attributes for the hunk.
  3453.  
  3454.     `PUBLIC'
  3455.           loads the hunk into the memory with the highest priority.
  3456.           Code Suffix _p.
  3457.  
  3458.     `CHIP'
  3459.           loads the hunk into chip memory. Code Suffix _c.
  3460.  
  3461.     `FAST'
  3462.           loads the hunk into fast memory. Code Suffix _f.
  3463.  
  3464.     `ADVISORY'
  3465.           ignores the hunk if the OS doesn't understand the type. A
  3466.           kind of Debug-Hunk that can be used by the OS.(V39)
  3467.  
  3468.     `ATTR=?'
  3469.           loads the hunk into the memory with specified memory
  3470.           attributs. (V37)
  3471.  
  3472. [Label] cseg [Name[, Memtyp]]
  3473. .............................
  3474.  
  3475.    has the same function as the command `code'.
  3476.  
  3477. [Label] dseg [Name[, Memtyp]]
  3478. .............................
  3479.  
  3480.    has the same function as the command `data'.
  3481.  
  3482. idnt Name
  3483. .........
  3484.  
  3485.    defines the name of the `HUNK_UNIT' hunk in the object file.
  3486.  
  3487.    * Name = Hunkname
  3488.  
  3489. identify Name
  3490. .............
  3491.  
  3492.    defines the name of the actual hunk.
  3493.  
  3494.    * Name = Hunkname
  3495.  
  3496. BDebugArg Argument
  3497. ..................
  3498.  
  3499.    defines a parameter in env:BDebugProgram. It doesn't active this
  3500. function you have to activate by option "-J" in *Note BOPT: MI_BOPT.
  3501.  
  3502.    * Argument = Argument Text
  3503.  
  3504. smalldata [Register]
  3505. ....................
  3506.  
  3507.    activates smalldata mode for the hunk.  Optionally, you can also
  3508. define the smalldata register.  Default register is `A4'.  The program
  3509. itself must initialize the smalldata register with the address of the
  3510. smalldata data hunk.
  3511.  
  3512.  
  3513.  
  3514.       bopt    w2-            ;68020 addressmode warnings off
  3515.       mc68020            ;68020 mode activated
  3516.      
  3517.       smalldata    a3        ;Default is A4!!!
  3518.       xref    _LinkerDB        ;Special linker symbol
  3519.      
  3520.       lea.l    _LinkerDB,a3        ;Address of the smalldata data segments
  3521.       move.l    #0,(d_test.l,a3)
  3522.       move.l    #"TEST",d_test(a3)
  3523.       moveq    #0,d0
  3524.       tst.b    array(a3,d0.w)
  3525.       rts
  3526.      
  3527.       section    "__MERGED",BSS    ;The smalldata data segments are defined
  3528.                                      ;the following way
  3529.      d_test:
  3530.       ds.l    1
  3531.      array:
  3532.       ds.b    20
  3533.  
  3534. xref Symbol[, Symbol...]
  3535. ........................
  3536.  
  3537.    imports a symbol so that you can access symbols that were exported
  3538. by XDef.  The linker resolves these reference during the link process
  3539. and creates a program file.  If the assembler finds a XRef in the source
  3540. it creates an object file. This decision can be overruled.
  3541.  
  3542.    * Symbol = Name of the importet symbol.
  3543.  
  3544. xdef Symbol[, Symbol...]
  3545. ........................
  3546.  
  3547.    exports a symbol as global so that other object files can import the
  3548. symbol by XRef.  There's no need to define a symbol before you mark them
  3549. with XDef. If the assembler finds a XRef in the source it creates an
  3550. object file. This decision can be overruled.
  3551.  
  3552.    * Symbol = Name of the global symbol
  3553.  
  3554. global Symbol[, Symbol...]
  3555. ..........................
  3556.  
  3557.    has the same function like XDef.
  3558.  
  3559. public Symbol[, Symbol...]
  3560. ..........................
  3561.  
  3562.    has the same function like XDef.
  3563.  
  3564. output Name
  3565. ...........
  3566.  
  3567.    sets an output filename.  If you don't specify a filename the
  3568. assembler uses the source filename and adds the appropriate filetype
  3569. suffix.
  3570.  
  3571.    * Name = Filename
  3572.  
  3573. objfile
  3574. .......
  3575.  
  3576.    has the same function like Output.
  3577.  
  3578. exeobj
  3579. ......
  3580.  
  3581.    writes a program file if you want to overrule the assembler.
  3582.  
  3583. linkobj
  3584. .......
  3585.  
  3586.    writes an object file if you want to overrule the assembler.
  3587.  
  3588. org Address
  3589. ...........
  3590.  
  3591.    activates absolute mode.  All command that refer to hunk related
  3592. functions aren't allowed.  For example:. section, xdef, xref.  The
  3593. parameter address sets the base address of the created code.
  3594.  
  3595.    * Address = Absolute Address
  3596.  
  3597. addsym
  3598. ......
  3599.  
  3600.    writes a symbol hunk.
  3601.  
  3602. debug
  3603. .....
  3604.  
  3605.    writes a SAS D1 debug hunk to see  source level informations while
  3606. debugging the program through bdebug.
  3607.  
  3608. Symbol Commands
  3609. ---------------
  3610.  
  3611. CArgs [#Offset,]Symbol[,Symbol.w[,Symbol.l]
  3612. ...........................................
  3613.  
  3614.    defines the symbol offsets for a stack function. The first Symbol
  3615. starts with the offset 4 but if you like to use a different Offset it's
  3616. possible to specify one.  Then the offset is increased according to the
  3617. size of the symbol. If the symbol has no size specifier the default size
  3618. is word. Sorry..i would use a longword here but to be compatible with
  3619. Devpac i'm forced to use word.
  3620.  
  3621.       cargs Test1.w,Test2.l
  3622.       move.w    Test1(a7),d0    ;Test1=4
  3623.       move.l    Test2(a7),d0    ;Test2=4+2=6
  3624.  
  3625. Symbol rs[.width] Count
  3626. .......................
  3627.  
  3628.    initializes the Symbol with the value of the counter __RS and
  3629. increases the __RS counter afterwards by Count*Width.  You can use this
  3630. command as a replacement for the include exec/types.i macros to
  3631. increase the parsing speed.
  3632.  
  3633.    * Width
  3634.  
  3635.     `B'
  3636.           1 Byte Valuearea: -$80 <= x < $100
  3637.  
  3638.     `W'
  3639.           2 Bytes Valuearea: -$8000 <= x < $10000
  3640.  
  3641.     `L'
  3642.           4 Bytes Valuearea: -$80000000 <= x < $10000000
  3643.  
  3644.     `S'
  3645.           4 Bytes (Single IEEE-Float)
  3646.  
  3647.     `D'
  3648.           8 Bytes (Double IEEE-Float)
  3649.  
  3650.     `X'
  3651.           12 Bytes (Extended IEEE-Float)
  3652.  
  3653.     `P'
  3654.           12 Bytes (Packed BCD-Float)
  3655.  
  3656.     `Q'
  3657.           16 Bytes (Quadword)
  3658.  
  3659. Symbol so[.width] Count
  3660. .......................
  3661.  
  3662.    This command has the same function like rs with the exception that
  3663. the Symbol __SO is used instead of the __RS symbol.  Internally both
  3664. symbols are handled equal.  Devpac has introduced the symbol __RS and
  3665. Macro68k knows the functionality by the name __SO.
  3666.  
  3667. Symbol fo[.width] Count
  3668. .......................
  3669.  
  3670.    decreases the counter __FO by Count*Width and initializes the Symbol
  3671. with the new value.  Useful to create the negative local stackframe
  3672. symbols needed by link.
  3673.  
  3674.    * Width
  3675.  
  3676.     `B'
  3677.           1 Byte Valuearea: -$80 <= x < $100
  3678.  
  3679.     `W'
  3680.           2 Bytes Valuearea: -$8000 <= x < $10000
  3681.  
  3682.     `L'
  3683.           4 Bytes Valuearea: -$80000000 <= x < $10000000
  3684.  
  3685.     `S'
  3686.           4 Bytes (Single IEEE-Float)
  3687.  
  3688.     `D'
  3689.           8 Bytes (Double IEEE-Float)
  3690.  
  3691.     `X'
  3692.           12 Bytes (Extended IEEE-Float)
  3693.  
  3694.     `P'
  3695.           12 Bytes (Packed BCD-Float)
  3696.  
  3697.     `Q'
  3698.           16 Bytes (Quadword)
  3699.  
  3700. rsreset
  3701. .......
  3702.  
  3703.    initializes the counter __RS to 0.
  3704.  
  3705. rsset Value
  3706. ...........
  3707.  
  3708.    initializes the counter __RS with the Value
  3709.  
  3710.    * Value = New Index
  3711.  
  3712. clrso
  3713. .....
  3714.  
  3715.    has the same function like rsreset
  3716.  
  3717. clrfo
  3718. .....
  3719.  
  3720.    has the same function like foreset.
  3721.  
  3722. setso Value
  3723. ...........
  3724.  
  3725.    has the same function like rsset
  3726.  
  3727. setrs Value
  3728. ...........
  3729.  
  3730.    has the same function like rsset
  3731.  
  3732. setfo Value
  3733. ...........
  3734.  
  3735.    initializes the counter __FO with the Value
  3736.  
  3737.    * Value = New Index
  3738.  
  3739. Symbol rsval
  3740. ............
  3741.  
  3742.    initializes the Symbol with the value of the __RS counter.
  3743.  
  3744. Symbol soval
  3745. ............
  3746.  
  3747.    has the same function like rsval.
  3748.  
  3749. Symbol foval
  3750. ............
  3751.  
  3752.    initializes the Symbol with the value of the __FO counter.
  3753.  
  3754. Data Commands
  3755. -------------
  3756.  
  3757. align Value
  3758. ...........
  3759.  
  3760.    aligns the program counter to an address that can be devided by the
  3761. value.  Useful because certain DOS structures have to be aligned on 4
  3762. Byte boundaries. For example FileInfoBlock.  Furthermore it's also
  3763. useful to align subroutines on longword boundaries that they fit better
  3764. into the cache structure.
  3765.  
  3766.    * Value = Align Mask
  3767.  
  3768. cnop Offset,Align
  3769. .................
  3770.  
  3771.    aligns the program counter to an address that can be devided by the
  3772. Align value and adds the value onto the address.  Internally only Align
  3773. values < 16 are supported.
  3774.  
  3775. pad.Width Align[,Value]
  3776. .......................
  3777.  
  3778.    aligns the program counter to an address that can be devided by the
  3779. Align*Width and fills the aligned area by the optional mask value.
  3780.  
  3781. quad
  3782. ....
  3783.  
  3784.    aligns the program counter to a 16 Byte address.
  3785.  
  3786. even
  3787. ....
  3788.  
  3789.    aligns the program counter to an even address.  This function is
  3790. useful if you define an odd sized data area and you need a word aligned
  3791. for OS data structures or assembler instructions.
  3792.  
  3793. odd
  3794. ...
  3795.  
  3796.    aligns the program counter to an odd address.
  3797.  
  3798. dc[.width] Value[,Value...]
  3799. ...........................
  3800.  
  3801.    inserts data of the Width into the code.
  3802.  
  3803.    * Width
  3804.  
  3805.     `B'
  3806.           1 Byte Valuearea: -$80 <= x < $100
  3807.  
  3808.     `W'
  3809.           2 Bytes Valuearea: -$8000 <= x < $10000
  3810.  
  3811.     `L'
  3812.           4 Bytes Valuearea: -$80000000 <= x < $10000000
  3813.  
  3814.     `S'
  3815.           4 Bytes (Single IEEE-Float)
  3816.  
  3817.     `D'
  3818.           8 Bytes (Double IEEE-Float)
  3819.  
  3820.     `X'
  3821.           12 Bytes (Extended IEEE-Float)
  3822.  
  3823.     `P'
  3824.           12 Bytes (Packed BCD-Float)
  3825.  
  3826. db Value[,Value,...]
  3827. ....................
  3828.  
  3829.    inserts a byte with a value in the valuearea -$80 <= x < $100.
  3830.  
  3831. dw Value[,Value,...]
  3832. ....................
  3833.  
  3834.    inserts a word with a value in the valuearea -$8000 <= x < $10000.
  3835.  
  3836. dl Value[,Value,...]
  3837. ....................
  3838.  
  3839.    inserts a longword with a value in the valuearea -$80000000 <= x <
  3840. $100000000.
  3841.  
  3842. ub Value[,Value,...]
  3843. ....................
  3844.  
  3845.    inserts a byte with a value in the valuearea -$80 <= x < $80.
  3846.  
  3847. uw Value[,Value,...]
  3848. ....................
  3849.  
  3850.    inserts a word with a value in the valuearea -$8000 <= x < $8000.
  3851.  
  3852. ul Value[,Value,...]
  3853. ....................
  3854.  
  3855.    inserts a longword with a value in the valuearea -$80000000 <= x <
  3856. $80000000.
  3857.  
  3858. sb Value[,Value,...]
  3859. ....................
  3860.  
  3861.    inserts a byte with a value in the valuearea -$80 <= x < $100.
  3862.  
  3863. sw Value[,Value,...]
  3864. ....................
  3865.  
  3866.    inserts a word with a value in the valuearea -$8000 <= x < $10000.
  3867.  
  3868. sl Value[,Value,...]
  3869. ....................
  3870.  
  3871.    inserts a longword with a value in the valuearea -$80000000 <= x <
  3872. $100000000.
  3873.  
  3874. pb Value[,Value,...]
  3875. ....................
  3876.  
  3877.    inserts a byte with a value in the valuearea 0 <= x < $80.
  3878.  
  3879. pw Value[,Value,...]
  3880. ....................
  3881.  
  3882.    inserts a word with a value in the valuearea 0 <= x < $8000.
  3883.  
  3884. pl Value[,Value,...]
  3885. ....................
  3886.  
  3887.    inserts a longword with a value in the valuearea 0 <= x < $80000000.
  3888.  
  3889. nb Value[,Value,...]
  3890. ....................
  3891.  
  3892.    inserts a byte with a value in the valuearea -$80 <= x < 0.
  3893.  
  3894. nw Value[,Value,...]
  3895. ....................
  3896.  
  3897.    inserts a word with a value in the valuearea -$8000 <= x < 0.
  3898.  
  3899. nl Value[,Value,...]
  3900. ....................
  3901.  
  3902.    inserts a longword with a value in the valuearea -$80000000 <= x < 0.
  3903.  
  3904. ds[.width] Count[,Value]
  3905. ........................
  3906.  
  3907.    defines a memory area with the length Count * Width and fills the
  3908. area with an optional Value.  Default fill value is 0.  Is the Count 0
  3909. a cnop 0,Width is run.
  3910.  
  3911.    * Width
  3912.  
  3913.     `B'
  3914.           1 Byte Valuearea: -$80 <= x < $100
  3915.  
  3916.     `W'
  3917.           2 Bytes Valuearea: -$8000 <= x < $10000
  3918.  
  3919.     `L'
  3920.           4 Bytes Valuearea: -$80000000 <= x < $10000000
  3921.  
  3922.     `S'
  3923.           4 Bytes (Single IEEE-Float)
  3924.  
  3925.     `D'
  3926.           8 Bytes (Double IEEE-Float)
  3927.  
  3928.     `X'
  3929.           12 Bytes (Extended IEEE-Float)
  3930.  
  3931.     `P'
  3932.           12 Bytes (Packed BCD-Float)
  3933.  
  3934.    * Count = Length of the memory area.
  3935.  
  3936.    * Value = optional Fill Value.
  3937.  
  3938. dsb[.width] Count[,Value]
  3939. .........................
  3940.  
  3941.    has the same function like ds
  3942.  
  3943. dsb[.width] Count[,Value]
  3944. .........................
  3945.  
  3946.    has the same function like ds
  3947.  
  3948. blk[.width] Count[,Value...]
  3949. ............................
  3950.  
  3951.    has the same function like ds
  3952.  
  3953. ascii String1[,String2,...]
  3954. ...........................
  3955.  
  3956.    inserts Strings.
  3957.  
  3958. cstring String1[,String2,...]
  3959. .............................
  3960.  
  3961.    inserts C-Strings.
  3962.  
  3963. dstring dtype1,dtype2,dtype3
  3964. ............................
  3965.  
  3966.    inserts the current date string.
  3967.  
  3968.                               Datentypen
  3969.  
  3970.    * "w" WeekDay
  3971.  
  3972.    * "d" Date
  3973.  
  3974.    * "t" Time
  3975.  
  3976.  
  3977.       dc.b    " ("
  3978.       dstring    w,d,t
  3979.       dc.b    ")"
  3980.       dc.b    $a,$d,0
  3981.      ;=> (Thursday 14-Okt-93 15:32:06)
  3982.  
  3983. pstring String[,String,...]
  3984. ...........................
  3985.  
  3986.    inserts a BCPL string.
  3987.  
  3988. istring String[,String,...]
  3989. ...........................
  3990.  
  3991.    inserts strings that terminate with a char that has Bit 7 set.
  3992.  
  3993. bitstream Mask
  3994. ..............
  3995.  
  3996.    inserts a bitmask for an image object for example.  The bits are
  3997. aligned to bytes.
  3998.  
  3999.    * Mask =  Mask is a string that is based only of 0 and 1.
  4000.  
  4001.  
  4002.       bitstream "01001000001"
  4003.  
  4004. sprintx "Formatstring"[,Value[,...]]
  4005. ....................................
  4006.  
  4007.    inserts the resulting string into the code.  The string isn't
  4008. terminated by a 0 so that you can add other strings rather easy.
  4009.  
  4010.    * FormatString - is a string in C-Notation so you can
  4011.            use the known C char types n,t,...
  4012.      The following options are allowed.
  4013.  
  4014.    * FormatSyntax - %[flags][width][.limit][length]type
  4015.  
  4016.         * flags - '-' deactivates left side layout.
  4017.  
  4018.         * width - Field Length. If the first char is '0' the field is
  4019.           filled by '0' on the left side.
  4020.  
  4021.         * limit - defines the maximal count of char that can be inserted
  4022.           from a string. Only legal for %s and %b.
  4023.  
  4024.         * length - The size of the datatype. Default is 16-bit for the
  4025.           typs %d,%u and %x. %l is long (32Bit). Attention! The
  4026.           Assembler always pushes a longword on the stack so always use
  4027.           %l if you don't know what you're doing.
  4028.  
  4029.         * type - The following types are supported.
  4030.  
  4031.           b - BSTR, a 32-bit BPTR Pointer on a bytelength     string.
  4032.             A NULL BPTR is handled like an empty string.  d - signed
  4033.           decimal u - unsigned decimal x - hexadezimal in lower case.
  4034.           X - hexadecimal in upper case.  s - String, a 32-bit Pointer
  4035.           on a     NULL-terminated Byte-String.      A NULL BPTR is
  4036.           handled like an empty string.  c - Char
  4037.  
  4038.    * Value - is an argument that has to be resolvable.
  4039.  
  4040. Listing I/O Commands
  4041. --------------------
  4042.  
  4043. list
  4044. ....
  4045.  
  4046.    activates the listing output. Has no function if the global listing
  4047. output wasn't activated.
  4048.  
  4049.                             Listing Format:
  4050.  
  4051.             LINE ADDRESS[Flag1] COMMAND-BYTES[Flag2] SOURCE
  4052.  
  4053.    * Flag1
  4054.  
  4055.         * + shows that the line was created by a macro.
  4056.  
  4057.         * > shows that the Assembler searches the closing ENDC.
  4058.  
  4059.         * < shows that the Assembler searches the closing ENDM.
  4060.  
  4061.    * Flag2
  4062.  
  4063.         * + shows a line overflow and that Bytes are ignored.  Can
  4064.           often happen during data definitions.
  4065.  
  4066. nolist
  4067. ......
  4068.  
  4069.    deactivates the listing output. Has no function if the global
  4070. listing output wasn't activated.
  4071.  
  4072. printx "Formatstring"[,Value[,...]]
  4073. ...................................
  4074.  
  4075.    outputs the string to the current Stdout and works similar as the
  4076. known C-Printf function. Look at SPRINTF
  4077.  
  4078. errfile Name
  4079. ............
  4080.  
  4081.    defines the filename for the error output.
  4082.  
  4083.    * Name = Filename
  4084.  
  4085. lisfile Name
  4086. ............
  4087.  
  4088.    defines the filename for the listing output.  If no error file was
  4089. defined the error output is also written into the listing file.
  4090.  
  4091.    * Name = Filename
  4092.  
  4093. Structuring
  4094. -----------
  4095.  
  4096. symbol[:] macro
  4097. ...............
  4098.  
  4099.    starts a Macro block.
  4100.  
  4101. endm
  4102. ....
  4103.  
  4104.    ends a macroblock.
  4105.  
  4106. mexit
  4107. .....
  4108.  
  4109.    ends a macro call.
  4110.  
  4111. fail
  4112. ....
  4113.  
  4114.    creates an error.
  4115.  
  4116. end
  4117. ...
  4118.  
  4119.    ends the assembling.
  4120.  
  4121. if Symbol
  4122. .........
  4123.  
  4124.    checks if the symbol value is not NULL and assembles the block
  4125. depending on the success.
  4126.  
  4127. ifd Symbol
  4128. ..........
  4129.  
  4130.    checks if the Symbol exists and assembles the block depending on the
  4131. success.
  4132.  
  4133. ifnd Symbol
  4134. ...........
  4135.  
  4136.    checks if the Symbol doesn't exist and assembles the block depending
  4137. on the success.
  4138.  
  4139. ifv String
  4140. ..........
  4141.  
  4142.    This is a privat command that is used for internal functionality and
  4143. subject to change. Touch an burn!
  4144.  
  4145. ifnv String
  4146. ...........
  4147.  
  4148.    This is a privat command that is used for internal functionality and
  4149. subject to change. Touch an burn!
  4150.  
  4151. ifmacrod Macro
  4152. ..............
  4153.  
  4154.    checks if the Macro exists and assembles the block depending on the
  4155. success.
  4156.  
  4157. ifmacrond Macro
  4158. ...............
  4159.  
  4160.    checks if the Macro doesn't exist and assembles the block depending
  4161. on the success.
  4162.  
  4163. ifcmacrod CMacro
  4164. ................
  4165.  
  4166.    checks if the CMacro exists and assembles the block depending on the
  4167. success.
  4168.  
  4169. ifcmacrond CMacro
  4170. .................
  4171.  
  4172.    checks if the CMacro doesn't exist and assembles the block depending
  4173. on the success.
  4174.  
  4175. ifc Symbol,Symbol
  4176. .................
  4177.  
  4178.    compares the first string with the second string and if they are
  4179. equal the block is assembled.
  4180.  
  4181. ifnc 'String','String'
  4182. ......................
  4183.  
  4184.    compares the first string with the second string and if they differ
  4185. the block is assembled.
  4186.  
  4187. if[condition] Symbol=Symbol
  4188. ...........................
  4189.  
  4190.    compares the first symbol with the second symbol and decides
  4191. according to the condition if the block is assembled.
  4192.  
  4193.    * Condition = Normal Bcc-Condition Syntax
  4194.  
  4195.    * Symbol = Normal Symbol
  4196.  
  4197. else
  4198. ....
  4199.  
  4200.    activates the condition block if the block above wasn't assembled.
  4201.  
  4202. elseif
  4203. ......
  4204.  
  4205.    activates the condition block if the block above wasn't assembled.
  4206.  
  4207. endc
  4208. ....
  4209.  
  4210.    defines the end of a condition block.
  4211.  
  4212. endif
  4213. .....
  4214.  
  4215.    defines the end of a condition block.
  4216.  
  4217. repeat Count
  4218. ............
  4219.  
  4220.    repeats the blocks that is located between repeat and endr by the
  4221. number Count.
  4222.  
  4223. rept Count
  4224. ..........
  4225.  
  4226.    has the same function like Repeat
  4227.  
  4228. procstart
  4229. .........
  4230.  
  4231.    defines a function in a Dice-C assembler output and is used to
  4232. optimize Link and Unlk.  This optimize method isn't working yet.
  4233.  
  4234. procend
  4235. .......
  4236.  
  4237.    defines a function in a Dice-C assembler output and is used to
  4238. optimize Link and Unlk.  This optimize method isn't working yet.
  4239.  
  4240. File I/O Commands
  4241. -----------------
  4242.  
  4243. incdir Dir[,Dir[,...]]
  4244. ......................
  4245.  
  4246.    adds directories to the include path list.  BASM uses 2 internal
  4247. path lists and the current directory to find the include and incbin
  4248. files.  First BASM checks for a : character in the filename and if it
  4249. finds a volume the file is loaded direct instead of searching it
  4250. through the pathlists.  The first path list contains the paths that
  4251. were defined in the commandline or *Note BOPT: MI_BOPT by the option -i
  4252. or through incdir.  The second path list contains the paths that were
  4253. defined in global configuration file ENV:BASMOption.  The entries of
  4254. the second list will be removed when the assembler is closed so that
  4255. the paths are still correct in ARexx-Mode.  The first list is removed
  4256. every pass.
  4257.  
  4258.    * Dir = Name of the Include-Path.
  4259.  
  4260. Incpath
  4261. .......
  4262.  
  4263.    has the same function like incdir.
  4264.  
  4265. include Name
  4266. ............
  4267.  
  4268.    loads the external include file, for example the OS-Includes.  If
  4269. the file is a precompiled include file it's detected automaticlly.
  4270. Includes are loaded from the editor or cachefile.library.
  4271.  
  4272.    * Name = Filename
  4273.  
  4274. include2 Name
  4275. .............
  4276.  
  4277.    has the same function like include with the exception that the
  4278. cachefile.library isn't ignored.
  4279.  
  4280.    * Name = Filename
  4281.  
  4282. incbin Name[,size]
  4283. ..................
  4284.  
  4285.    inserts the file with the optional length at the current address
  4286. into the code. Normally used for sounds and graphics.
  4287.  
  4288. incbin2 Name[,size]
  4289. ...................
  4290.  
  4291.    has the same function like incbin with the exception that the
  4292. cachefile.library isn't used.
  4293.  
  4294.    * Name = Name of the data file.
  4295.  
  4296. ibytes Name[,Length]
  4297. ....................
  4298.  
  4299.    has the same function like incbin
  4300.  
  4301. dsbin Name[,Length]
  4302. ...................
  4303.  
  4304.    defines a memory area with the length of the file specified by the
  4305. file. Optinally you can defined the maximal file length.
  4306.  
  4307.    * Name = Filename
  4308.  
  4309.    * Length = maximal file length
  4310.  
  4311. doscmd Name
  4312. ...........
  4313.  
  4314.    runs the program Name.
  4315.  
  4316.       dc.b    0,"$VER: Fubar 1.0 by Joe User"
  4317.       doscmd    "c:date >ram:Temp"
  4318.       incbin    ram:Temp
  4319.       doscmd    "c:delete ram:Temp"
  4320.  
  4321. filecom Name
  4322. ............
  4323.  
  4324.    sets the file comment of output file.
  4325.  
  4326.       filecom "This is a file comment"
  4327.  
  4328. pure
  4329. ....
  4330.  
  4331.    sets the Pure Bit while writing a program file.
  4332.  
  4333. Miscellaneous
  4334. -------------
  4335.  
  4336. trashreg Reglist
  4337. ................
  4338.  
  4339.    defines the registers that are available to the optimizer.
  4340.  
  4341.    * RegList = A normal Registerlist known by Movem.
  4342.  
  4343. super
  4344. .....
  4345.  
  4346.    deactivates Supervisor warnings.
  4347.  
  4348. mc[Type]
  4349. ........
  4350.  
  4351.    defines the processor type to allow certain commands and
  4352. addressmodes.
  4353.  
  4354.                             Processor-Type
  4355.  
  4356.    * 68000 default mode
  4357.  
  4358.    * 68010
  4359.  
  4360.    * 68020
  4361.  
  4362.    * 68030
  4363.  
  4364.    * 68040
  4365.  
  4366.    * 68060
  4367.  
  4368.    * 68881
  4369.  
  4370.    * 68882
  4371.  
  4372. bopt [opt[,...],...]
  4373. ....................
  4374.  
  4375.    sets the assembler options.
  4376.  
  4377.                                 Options
  4378.  
  4379. `m1[+,-]'
  4380.      activates/deactivates 68010 mode.
  4381.  
  4382. `m2[+,-]'
  4383.      activates/deactivates 68020 mode.
  4384.  
  4385. `m3[+,-]'
  4386.      activates/deactivates 68030 mode.
  4387.  
  4388. `m4[+,-]'
  4389.      activates/deactivates 68040 mode.
  4390.  
  4391. `m6[+,-]'
  4392.      activates/deactivates 68060 mode.
  4393.  
  4394. `mf[+,-]'
  4395.      activates/deactivates 68881/2 mode.
  4396.  
  4397. `ue[+,-]'
  4398.      activates/deactivates writing an executable file.
  4399.  
  4400. `uo[+,-]'
  4401.      activates/deactivates writing an object file.
  4402.  
  4403. `ua[+,-]'
  4404.      activates/deactivates writing an absolut file.
  4405.  
  4406. `un[+,-]'
  4407.      activates/deactivates writing file.
  4408.  
  4409. `p[+,-]'
  4410.      activates/deactivates writing a preassembled Include file.
  4411.  
  4412. `g[+,-]'
  4413.      activates/deactivates adding the prefix _ to each exported symbol.
  4414.      Default is off.
  4415.  
  4416. `sx[+,-]'
  4417.      activates/deactivates writing all XRef/XDef symbols to a symbol
  4418.      hunk.  Default is off.
  4419.  
  4420. `sl[+,-]'
  4421.      activates/deactivates writing all normal symbols to a symbol hunk.
  4422.      Default is off.
  4423.  
  4424. `sa[+,-]'
  4425.      activates/deactivates writing all symbols to a symbol hunk.
  4426.      Default is off.
  4427.  
  4428. `sd[+,-]'
  4429.      activates/deactivates writing a BASM custom format Debug Hunk.
  4430.      Makes only sense as a program file and it needs a lot hd space
  4431.      because it includes all sources. Default is off.
  4432.  
  4433. `s1[+,-]'
  4434.      activates/deactivates writing a SAS D1 compatible Debug Hunk.
  4435.      Default is off.
  4436.  
  4437. `sf[+,-]'
  4438.      activates/deactivates writing the full sourcefile path into the
  4439.      debug hunk.  You should only use this for your own development
  4440.      system because other users may have different HD layouts. This
  4441.      option has only a meaning with in a SAS D1 Debug Hunk. Default is
  4442.      off.
  4443.  
  4444. `j[+,-]'
  4445.      activates/deactivates setting the PURE Bit for a program file.
  4446.      The PURE Bit tells the Shell that this program can be loaded
  4447.      resident.  Default is off.
  4448.  
  4449. `J[+,-]'
  4450.      activates/deactivates creating the file ENV:BDebugProgram that
  4451.      contains the assembled filename for BDebug.  Default is off.
  4452.  
  4453. `a[+,-]'
  4454.      activates/deactivates creating of an .info file for each program.
  4455.      Useful if you use the assembler through the WB.  Default is off.
  4456.  
  4457. `A[+,-]'
  4458.      activates/deactivates Arexxmode. Only allowed in the commandline.
  4459.      Default is off.
  4460.  
  4461. `i<DirName>'
  4462.      defines the include path.
  4463.  
  4464. `o<FileName>'
  4465.      defines the object filename. If not specified the assembler uses
  4466.      the source file name without the source suffix as the output name.
  4467.      For object files it adds the suffix `.o'.
  4468.  
  4469. `P<Priority>'
  4470.      sets the task priority.
  4471.  
  4472. `c[+,-]'
  4473.      activates/deactivates that the assembler interpretes Upper and
  4474.      Lower case as 2 different chars.  Default is on.
  4475.  
  4476. `f[+,-]'
  4477.      activates/deactivates a faster mode that resolves all references
  4478.      in the 2nd pass.  Fortunately this mode needs more memory and has
  4479.      some disadvantages like uncorrect values during the listing.  This
  4480.      option has no effect during optimizing.  Default is off.
  4481.  
  4482. `F[+,-]'
  4483.      activates/deactivates a faster IO mode that keeps include paths as
  4484.      locks instead of strings.  The older basm versions used locks to
  4485.      store paths but as this isn't compatible with multi-assigns I
  4486.      changed that.
  4487.  
  4488. `M<Bytes>'
  4489.      defines the max macro expansion size.  If you get a macromemerror
  4490.      you should increase the size. Default 1000 Bytes.
  4491.  
  4492. `Z<Address>'
  4493.      tells the assembler that the source is starts in the memory at the
  4494.      defined address.  Useful for ARexx scripts.  Option is only
  4495.      available in the commandline.
  4496.  
  4497. `x[+,-]'
  4498.      uses the `cachefile.library' to load resident Includes/Incbins or
  4499.      add unknown files to the cachefile.library database.  Default is
  4500.      off.
  4501.  
  4502. `X[+,-]'
  4503.      erases all files that are controled by the cachefile.library.
  4504.      Default is off.
  4505.  
  4506. `y[+,-]'
  4507.      shows all files that are controled by the cachefile.library.
  4508.      Default is off.
  4509.  
  4510. `l[+,-]'
  4511.      activates/deactivates the listing output.  Default is off.
  4512.  
  4513. `l0[+,-]'
  4514.      activates/deactivates the listing macro expansion.  Default is on.
  4515.  
  4516. `L<Listingfile>'
  4517.      defines the Listing filename.
  4518.  
  4519. `h[+,-]'
  4520.      activates/deactivates the symbol listing output.  Default is off.
  4521.  
  4522. `H[+,-]'
  4523.      activates/deactivates the unused symbol output.  Default is off.
  4524.  
  4525. `v[+,-]'
  4526.      outputs a statistic after assembling.  Default is off.
  4527.  
  4528. `V[+,-]'
  4529.      as little status output as possible Default is off.
  4530.  
  4531. `e[+,-]'
  4532.      creates an error list.  Default is on.
  4533.  
  4534. `es[+,-]'
  4535.      outputs the error list in the Barfly shell.  This option has no
  4536.      meaning in BASM.
  4537.  
  4538. `wo[+,-]'
  4539.      activates/deactivates Optimizing warnings.  Default is on.
  4540.  
  4541. `ws[+,-]'
  4542.      activates/deactivates Supervisor warnings.  Default is on.
  4543.  
  4544. `wm[+,-]'
  4545.      activates/deactivates Move16 warnings because the use of the
  4546.      move16 command is dangerous if you don't know the problems.
  4547.      Default is on.
  4548.  
  4549. `wp[+,-]'
  4550.      activates/deactivates pc-relative access to different section
  4551.      warnings. The linker is needed to resolve such files.  Default is
  4552.      on.
  4553.  
  4554. `w2[+,-]'
  4555.      activates/deactivates 68020 addressmode warnings.  Default is on.
  4556.  
  4557. `w4[+,-]'
  4558.      activates/deactivates 64k-Access warnings.  It's useful if you
  4559.      accidently avoid to forget the address register.  Example: move.l
  4560.      8,d0 instead of move.l 8(an),d0 Default is on.
  4561.  
  4562. `b0'
  4563.      sets the Default Branch Length to 8-Bit. .b Default is off.
  4564.  
  4565. `b1'
  4566.      sets the Default Branch Length to 16-Bit. .w Default is on.
  4567.  
  4568. `b2'
  4569.      sets the Default Branch Length to 32-Bit. .l Default is off.
  4570.  
  4571. `B0'
  4572.      sets the Default BaseDisplacement-Width to 8 Bit. .b Default is on.
  4573.  
  4574. `B1'
  4575.      sets the Default BaseDisplacement-Width to 16 Bit. .w Default is
  4576.      off.
  4577.  
  4578. `B2'
  4579.      sets the Default BaseDisplacement-Width to 32 Bit. .l Default is
  4580.      off.
  4581.  
  4582. `n0'
  4583.      sets the Default OuterDisplacement-Width to 16 Bit. .w Default is
  4584.      off.
  4585.  
  4586. `n1'
  4587.      sets the Default OuterDisplacement-Width to 32 Bit. .l Default is
  4588.      on.
  4589.  
  4590. `q[+,-]'
  4591.      activates/deactivates align long after each rts, bra or jmp to
  4592.      align blocks to the cache structure.  Default is off.
  4593.  
  4594. `O[+,-]'
  4595.      activates/deactivates the Optimizer.  Without this option no
  4596.      optimizing will happen besides addressmode converting.  Default is
  4597.      off.
  4598.  
  4599. `OG[+,-]'
  4600.      activates/deactivates Forward Reference Optimizing to use every
  4601.      possibility. In this mode the source is assembled until no further
  4602.      optimizing method is found.  First the source is assembled
  4603.      normally.  This is shown by the Output Pass 1.  Afterwards the
  4604.      optimize passes are started and continued until no further symbol
  4605.      changes and length errors occur.  This can take a while and
  4606.      depends on the source size. Default is off.
  4607.  
  4608. `OT[+,-]'
  4609.      activates/deactivates Time Optimizing.  Default is off.
  4610.  
  4611.      Addressmode Converting
  4612.  
  4613. `OC0[+,-]'
  4614.      *Note bdwan: OP_DIRECT
  4615.  
  4616. `OC1[+,-]'
  4617.      *Note bdwpc: OP_DIRECT
  4618.  
  4619. `OC2[+,-]'
  4620.      *Note anxn: OP_DIRECT
  4621.  
  4622. `OC3[+,-]'
  4623.      *Note pcxn: OP_DIRECT
  4624.  
  4625. `OC4[+,-]'
  4626.      *Note bdw: OP_DIRECT
  4627.  
  4628. `OC5[+,-]'
  4629.      *Note bdl: OP_DIRECT
  4630.  
  4631. `OC6[+,-]'
  4632.      *Note an: OP_DIRECT
  4633.  
  4634. `OC7[+,-]'
  4635.      *Note pc: OP_DIRECT
  4636.  
  4637. `ODD[+,-]'
  4638.      activates Direct Addressmode Optimizing
  4639.  
  4640.      Direct Optimizing
  4641.  
  4642. `OD0[+,-]'
  4643.      *Note move: OP_OPTIMIZE
  4644.  
  4645. `OD00[+,-]'
  4646.      *Note move: OP_OPTIMIZE
  4647.  
  4648. `OD01[+,-]'
  4649.      *Note move: OP_OPTIMIZE
  4650.  
  4651. `OD02[+,-]'
  4652.      *Note move: OP_OPTIMIZE
  4653.  
  4654. `OD03[+,-]'
  4655.      *Note move: OP_OPTIMIZE
  4656.  
  4657. `OD04[+,-]'
  4658.      *Note move: OP_OPTIMIZE
  4659.  
  4660. `OD05[+,-]'
  4661.      *Note move: OP_OPTIMIZE
  4662.  
  4663. `OD06[+,-]'
  4664.      *Note move: OP_OPTIMIZE
  4665.  
  4666. `OD07[+,-]'
  4667.      *Note move: OP_OPTIMIZE
  4668.  
  4669. `OD08[+,-]'
  4670.      *Note move: OP_OPTIMIZE
  4671.  
  4672. `OD09[+,-]'
  4673.      *Note move: OP_OPTIMIZE
  4674.  
  4675. `OD0a[+,-]'
  4676.      *Note move: OP_OPTIMIZE
  4677.  
  4678. `OD1[+,-]'
  4679.      *Note clr: OP_OPTIMIZE
  4680.  
  4681. `OD2[+,-]'
  4682.      *Note add: OP_OPTIMIZE
  4683.  
  4684. `OD3[+,-]'
  4685.      *Note sub: OP_OPTIMIZE
  4686.  
  4687. `OD4[+,-]'
  4688.      *Note lea: OP_OPTIMIZE
  4689.  
  4690. `OD5[+,-]'
  4691.      *Note cmp: OP_OPTIMIZE
  4692.  
  4693. `OD6[+,-]'
  4694.      *Note bcc: OP_OPTIMIZE
  4695.  
  4696. `OD7[+,-]'
  4697.      *Note jsr: OP_OPTIMIZE
  4698.  
  4699. `OD8[+,-]'
  4700.      *Note jmp: OP_OPTIMIZE
  4701.  
  4702. `OD9[+,-]'
  4703.      *Note asl: OP_OPTIMIZE
  4704.  
  4705. `ODa[+,-]'
  4706.      *Note or: OP_OPTIMIZE  ( This Optimizing is deactivated internal )
  4707.  
  4708. `ODb[+,-]'
  4709.      *Note eor: OP_OPTIMIZE ( This Optimizing is deactivated internal )
  4710.  
  4711. `ODc[+,-]'
  4712.      *Note and: OP_OPTIMIZE
  4713.  
  4714. `ODd[+,-]'
  4715.      *Note mulu: OP_OPTIMIZE
  4716.  
  4717. `ODe[+,-]'
  4718.      *Note muls: OP_OPTIMIZE
  4719.  
  4720. `ODf[+,-]'
  4721.      *Note jsr+rts: OP_OPTIMIZE
  4722.  
  4723. `ODg[+,-]'
  4724.      *Note jmp+rts: OP_OPTIMIZE
  4725.  
  4726. `ODh[+,-]'
  4727.      *Note MovemNoRegister: OP_OPTIMIZE
  4728.  
  4729. `ODi[+,-]'
  4730.      *Note MovemOneRegister: OP_OPTIMIZE
  4731.  
  4732. `ODj[+,-]'
  4733.      *Note Link: OP_OPTIMIZE
  4734.  
  4735. `OAP[+,-]'
  4736.      activates *Note PC-Relative: OP_ADDRESS Optimizing
  4737.  
  4738. `OAS[+,-]'
  4739.      activates *Note Smalldata: OP_ADDRESS Optimizing
  4740.  
  4741. `OAL[+,-]'
  4742.      activates *Note long to word: OP_ADDRESS Optimizing
  4743.  
  4744. `OAX[+,-]'
  4745.      activates *Note x(An) to (An): OP_ADDRESS Optimizing
  4746.  
  4747. `OAY[+,-]'
  4748.      activates *Note 68020 An-EA: OP_ADDRESS Optimizing
  4749.  
  4750. `OAZ[+,-]'
  4751.      activates *Note 68020 PC-EA: OP_ADDRESS Optimizing
  4752.  
  4753. `OAR[+,-]'
  4754.      activates *Note Register: OP_REGISTER Optimizing
  4755.  
  4756.    You should be careful with the command *Note BOPT: MI_BOPT when you
  4757. activate Global-Optimize.  In every parse the default config is set and
  4758. therefore you should define all global options in the commandline or in
  4759. the configuration file.
  4760.  
  4761. 680xx Meta Commands
  4762. -------------------
  4763.  
  4764. mb Operand1,Operand2
  4765. ....................
  4766.  
  4767.    has the same function as move.b.
  4768.  
  4769. mw Operand1,Operand2
  4770. ....................
  4771.  
  4772.    has the same function as move.w.
  4773.  
  4774. ml Operand1,Operand2
  4775. ....................
  4776.  
  4777.    has the same function as move.l.
  4778.  
  4779. mq Operand1,Operand2
  4780. ....................
  4781.  
  4782.    has the same function as moveq.
  4783.  
  4784. xor.? Operand1,Operand2
  4785. .......................
  4786.  
  4787.    has the same function as eor.?.
  4788.  
  4789. xori.? Operand1,Operand2
  4790. ........................
  4791.  
  4792.    has the same function as eori.?.
  4793.  
  4794. bhs.? Label
  4795. ...........
  4796.  
  4797.    has the same function as bcc.?.
  4798.  
  4799. blo.? Label
  4800. ...........
  4801.  
  4802.    has the same function as bcs.?.
  4803.  
  4804. Assembler Macros
  4805. ================
  4806.  
  4807.    Macros are meta commands that can be based of many assembler
  4808. instructions to achieve an abstracter source layout.  In a macro you
  4809. can use several different pattern that are replaced by appropriate
  4810. parameters when the macro is called.  The parameter that are passed
  4811. during a macro call are represented by the following patterns:
  4812. \0,...,\9, \a,...,\z, \A,...,\Z.  The pattern ids are using the
  4813. hexadecimal format.  If a pattern is used with no related parameter an
  4814. empty string is inserted.  Furthermore if a parameter contains
  4815. tabulators or spaces it has to be placed between <...>.  When a macro
  4816. needs relative labels and is should be called more than one time you
  4817. should use the special pattern @.  This pattern is replaced by a number
  4818. that is based of 4 digits and that is increased after each call.  The
  4819. pattern \# is replaced by the value of the symbol narg that represents
  4820. the count of macro parameters.  Besides the standard patterns there are
  4821. some more advanced pattern functions supported that look like
  4822. \*Function-Name.  These functions don't belong to the motorola standard
  4823. thus they aren't supported by every assembler.  Another important point
  4824. is that you can also call macros from from macros but you can't define
  4825. macros in macros.
  4826.  
  4827.    The standard macro pattern
  4828.  
  4829.    Label & [. string] & [, string] & [, string] & [,...]        & [\\0]
  4830. & [\\1|] & [\\2|] & [\\3|]...[\\n|]
  4831.  
  4832.    The advanced macro pattern functions
  4833.  
  4834.    * ` \(Argument)' inserts the string of the macroparameter with the
  4835.      number the argument defines.
  4836.  
  4837.  
  4838.           \(1) =  \1
  4839.           \(1+3+4) = \8
  4840.  
  4841.    * `\*upper(String)' inserts the string in upper case.
  4842.  
  4843.    * `\*lower(String)' inserts the string in lower case.
  4844.  
  4845.    * `\*valof(Argument)' inserts the decimal value of the argument as a
  4846.      string.
  4847.  
  4848.    * `\*strlen(Symbol)' inserts the length of a symbol as a string.
  4849.  
  4850.    * `\*right(String,n)' inserts n chars of the right side of the
  4851.      string.  If the string contains less than n chars the whole string
  4852.      is inserted.
  4853.  
  4854.    * `\*left(String,n)' inserts n chars of the left side of the string.
  4855.      If the string contains less than n chars the whole string is
  4856.      inserted.
  4857.  
  4858.    * `\*mid(String,n,m)' inserts chars from position n to m from the
  4859.      string.  If the position is outside of the string length the chars
  4860.      till the end of the string is inserted.
  4861.  
  4862.  
  4863.      openwind MACRO
  4864.               move.l     intbase,a6
  4865.               lea.l      \1,a0
  4866.               jsr        OpenWindow(a6)
  4867.               ENDM
  4868.      
  4869.      start:
  4870.               openwind   newwindow
  4871.  
  4872.  
  4873.  
  4874.      movewind MACRO
  4875.               move.l     intbase,a6
  4876.               move.l     \1,a0
  4877.               moveq      #0,d0
  4878.               move.\0    \2,d1
  4879.               IFC        `\0',`b'
  4880.               ext.w      d1
  4881.               ENDC
  4882.               jsr        MoveWindow(a6)
  4883.               ENDM
  4884.      
  4885.      start:
  4886.               move.b     #10,d2
  4887.      1$:
  4888.               movewind.b newwindow,d2
  4889.               addq.b     #1,d2
  4890.               cmp.b      #100,d2
  4891.               bne.s      1$
  4892.  
  4893.  
  4894.      wait MACRO
  4895.               moveq      #-1,d0
  4896.      wait\
  4897.               dbra       d0,wait\
  4898.               ENDM
  4899.      
  4900.      start:
  4901.               wait
  4902.               wait
  4903.               wait
  4904.  
  4905.  
  4906.      test MACRO
  4907.               move.l     #\*upper(Hello),d0
  4908.               move.l     #\*lower(Hello),d0
  4909.               move.l     #\*strlen(1234567890123456),d0
  4910.               move.l     #\*valof(value),d0
  4911.               rts
  4912.      
  4913.               cstring    "\*left(abcdefgh,4)"
  4914.               even
  4915.               cstring    "\*left(abcdefgh,10)"
  4916.               even
  4917.               cstring    "\*right(abcdefgh,4)"
  4918.               even
  4919.               cstring    "\*right(abcdefgh,10)"
  4920.               even
  4921.               cstring    "\*mid(abcdefgh,2,4)"
  4922.               even
  4923.               cstring    "\*mid(abcdefgh,2,8)"
  4924.               even
  4925.      
  4926.               ENDM
  4927.      
  4928.      value = 123456789
  4929.      hello:
  4930.               test
  4931.  
  4932.  
  4933.       value = 123456789
  4934.      
  4935.      
  4936.      hello:
  4937.               move.l     #HELLO,d0
  4938.               move.l     #hello,d0
  4939.               move.l     #16,d0
  4940.               move.l     #123456789,d0
  4941.               rts
  4942.               cstring    "abcd"
  4943.               even
  4944.               cstring    "abcdefgh"
  4945.               even
  4946.               cstring    "efgh"
  4947.               even
  4948.               cstring    "abcdefgh"
  4949.               even
  4950.               cstring    "cdef"
  4951.               even
  4952.               cstring    "cdefgh"
  4953.               even
  4954.  
  4955.  
  4956.      PUTTAG MACRO
  4957.               IFC        "\2",""
  4958.      PUTTAG_COUNT set 0
  4959.               ENDC
  4960.      
  4961.               IFNC       "\2",""
  4962.               move.l     \2,-(a7)
  4963.      PUTTAG_COUNT SET PUTTAG_COUNT+4
  4964.               ENDC
  4965.      
  4966.               move.l     \1,-(a7)
  4967.      PUTTAG_COUNT SET PUTTAG_COUNT+4
  4968.      
  4969.               IFC        "\1","#TAG_END"
  4970.      PUTTAG_COUNT SET 4
  4971.               ENDC
  4972.      
  4973.               ENDM
  4974.      
  4975.      CLEARTAG MACRO
  4976.               lea.l      PUTTAG_COUNT(a7),a7
  4977.               ENDM
  4978.      
  4979.      
  4980.      
  4981.               PUTTAG     #TAG_END
  4982.               PUTTAG     #WA_Width,#100
  4983.               PUTTAG     #WA_ScreenTitle,#Title
  4984.               .
  4985.               .
  4986.               move.l     a7,a1
  4987.               sub.l      a0,a0
  4988.               jsr        OpenWindowTagList(a6)
  4989.               CLEARTAG
  4990.  
  4991. Highlevel Macros
  4992. ================
  4993.  
  4994.    In highlevel macros the operands are based of legal addressmodes.
  4995. Arguments are based of operands and the operators +,-,<<,>>. Conditions
  4996. are based of !,=, <,>,<=,>=,<>.  By using highlevel macros you can make
  4997. the programming of non critical source areas easier and more abstract.
  4998. Blame Mike Schwartz for this idea...he forced me to do it:-B
  4999.  
  5000. .REG
  5001. ....
  5002.  
  5003.    sets the accumulator register that is used to calculate arguments.
  5004. Default register is D0.
  5005.  
  5006. .BRANCH b|w|l
  5007. .............
  5008.  
  5009.    sets the length of branch commands that are used in the highlevel
  5010. macros.  Standard length is .b.
  5011.  
  5012. .FOR Operand[.b|w|l] = Operand TO Operand STEP Operand
  5013. ......................................................
  5014.  
  5015.    creates code for a for loop.  The optional width you define after
  5016. the first operand sets the width for all operations in the for loop.
  5017.  
  5018.  
  5019.        .FOR   d0.w = #1 to  STEP #2
  5020.        addq.w #1,d1
  5021.        .NEXT
  5022.      
  5023.        ;Compiled Code
  5024.      
  5025.        move.w #1,d0
  5026.      __for1:
  5027.        addq.w #1,d1
  5028.        add.w  #2,d0
  5029.        cmp.w  ,d0
  5030.        blt.b  __for1
  5031.  
  5032. .NEXT
  5033. .....
  5034.  
  5035.    closes the outer .FOR loop.
  5036.  
  5037. .IF [Argument] =,!, < , > , <> Operand
  5038. ......................................
  5039.  
  5040.    creates code for an IF-Operation.  You can remove the first argument
  5041. if you want to test the operand.  For example .IF <>
  5042.  
  5043.  
  5044.        .IF    (a0) + #0 <> d1
  5045.        moveq  #0,d0
  5046.        .ELSE
  5047.        moveq  #1,d0
  5048.        .ENDIF
  5049.      
  5050.        ;Compiled Code
  5051.      
  5052.        move.l (a0),d7
  5053.        add.l  #0,d7
  5054.        cmp.l  d1,d7
  5055.        beq.b  __else1
  5056.        moveq  #0,d0
  5057.        bra.b  __endif1
  5058.      __else1:
  5059.        moveq  #1,d0
  5060.      __endif1:
  5061.  
  5062. .ELSE
  5063. .....
  5064.  
  5065.    starts an alternative IF-Block.
  5066.  
  5067. .ENDIF
  5068. ......
  5069.  
  5070.    closes the outer .IF block.
  5071.  
  5072. .WHILE [Argument] =,!, < , > , <> Operand
  5073. .........................................
  5074.  
  5075.    creates code for a while loop The optional width you define after
  5076. the first operand sets the width for all operations in the while loop.
  5077.  
  5078.  
  5079.        .WHILE d0 <> #0
  5080.        addq.w #1,d1
  5081.        .ENDWHILE
  5082.      
  5083.        ;Compiled Code
  5084.      
  5085.      __while1:
  5086.        cmp.l  #0,d0
  5087.        beq.s  __endwhile1
  5088.        addq.w #1,d1
  5089.        bra.s  __while1
  5090.      __endwhile1:
  5091.  
  5092. .ENDWHILE
  5093. .........
  5094.  
  5095.    closes the outer while loop.
  5096.  
  5097. .CALL Function [, Argument [, Argument [,...]]]
  5098. ...............................................
  5099.  
  5100.    calls a C-Function by parsing the arguments through the stack.
  5101. Arguments are calculated in the accumulator register.
  5102.  
  5103.  
  5104.  
  5105.        .CALL func , test + 0 - #20 , #test
  5106.      
  5107.        ;Compiled Code
  5108.      
  5109.        move.l test,d7
  5110.        add.l  0,d7
  5111.        sub.l  #20,d7
  5112.        move.l d7,-(a7)
  5113.        move.l #test,-(a7)
  5114.        jsr    func
  5115.        ifnc   "8","0"             ;Were there any parameters ?
  5116.        lea.l  __CALLSize(a7),a7
  5117.        endc
  5118.  
  5119. .RETURN Argument
  5120. ................
  5121.  
  5122.    returns a result value in the accumulator register.
  5123.  
  5124.  
  5125.        .return d1 + d2 + #$100
  5126.      
  5127.        ;Compiled Code
  5128.      
  5129.      
  5130.        move.l d1,d7
  5131.        add.l  d2,d7
  5132.        add.l  #$100,d7
  5133.  
  5134. .DEF func [, Operand [, Operand [,...]]]
  5135. ........................................
  5136.  
  5137.    defines a C-Stack function and loads the defined parameters into the
  5138. operands.
  5139.  
  5140.  
  5141.        .DEF func , d0.w , d1 , (a0)
  5142.        .ENDDEF
  5143.      
  5144.        ;Compiled Code
  5145.      
  5146.        XDEF   func
  5147.        link   a5,#0
  5148.        move.w $0a(a5),d0
  5149.        move.l $0c(a5),d1
  5150.        move.l $10(a5),(a0)
  5151.        unlk   a5            ;.ENDDEF
  5152.        rts
  5153.  
  5154. .ENDDEF
  5155. .......
  5156.  
  5157.    closes a function that was started by .DEF
  5158.  
  5159. .LET [ Operand =] Argument
  5160. ..........................
  5161.  
  5162.    calculates an argument in an accumulator or moves the value to a
  5163. defined operand.
  5164.  
  5165.  
  5166.        .LET + 4 - #LN_SIZE << #7
  5167.        .LET d1 = (a1) - (a0)
  5168.      
  5169.        ;Compiled Code
  5170.      
  5171.        add.l  4,d7
  5172.        sub.l  #LN_SIZE,d7
  5173.        lsl.l  #7,d7
  5174.      
  5175.        move.l (a1),d7
  5176.        sub.l  (a0),d7
  5177.        move.l d7,d1
  5178.  
  5179. Predefined Symbols
  5180. ==================
  5181.  
  5182. NARG
  5183. ....
  5184.  
  5185.    represents the macro parameter count in a macro.
  5186.  
  5187. BARFLY
  5188. ......
  5189.  
  5190.    represents the assembler version.
  5191.  
  5192. 680xx
  5193. .....
  5194.  
  5195.    represents the CPU processor type.
  5196.  
  5197. 6888x
  5198. .....
  5199.  
  5200.    represents the FPU processor type.
  5201.  
  5202. _MOVEMBYTES
  5203. ...........
  5204.  
  5205.    represents the byte count the last movem transfer used.
  5206.  
  5207.  
  5208.       lea    _MOVEMBYTES(a7),a7    ;frees the stack
  5209.  
  5210. _MOVEMREGS
  5211. ..........
  5212.  
  5213.    represents the last movem register mask.
  5214.  
  5215.  
  5216.       movem    (a7)+,_MOVEMREGS
  5217.  
  5218. __RS
  5219. ....
  5220.  
  5221.    represents the RS-Counter.
  5222.  
  5223. __SO
  5224. ....
  5225.  
  5226.    represents the RS-Counter.
  5227.  
  5228. __FO
  5229. ....
  5230.  
  5231.    represents the FO-Counter.
  5232.  
  5233. Optimizing
  5234. ==========
  5235.  
  5236.    Optimize Methods...
  5237.  
  5238. Direct Addressmode Optimizing
  5239. -----------------------------
  5240.  
  5241.    The assembler can direct optimize certain 68020...60 Addressmodes if
  5242. a faster 68000 addressmode exists.  This optimizing method should
  5243. always be activated because of compatibility reasons.
  5244.  
  5245.    * `(bd.w,an)' can be optimized to `x(an)' that removes 1 word and
  5246.      some cycles.
  5247.  
  5248.      +------------------------+--------------------+--------+
  5249.      |       Addressmode      |     Optimizing     | Option |
  5250.      +------------------------+--------------------+--------+
  5251.      +------------------------+--------------------+--------+
  5252.      | move. l (1000.w,an),dn | move.l 1000(an),dn |  -OC0  |
  5253.      +------------------------+--------------------+--------+
  5254.  
  5255.    * `(bd.w,pc)' can be optimized to `x(pc)' that removes 1 word and
  5256.      some cycles.
  5257.  
  5258.      +------------------------+--------------------+--------+
  5259.      |       Addressmode      |     Optimizing     | Option |
  5260.      +------------------------+--------------------+--------+
  5261.      +------------------------+--------------------+--------+
  5262.      | move. l (1000.w,pc),dn | move.l 1000(pc),dn |  -OC1  |
  5263.      +------------------------+--------------------+--------+
  5264.  
  5265.    * `(bd.w)' can be optimized to `bd.w' that removes 1 word and some
  5266.      cycles.
  5267.  
  5268.      +------------------------+--------------------+--------+
  5269.      |       Addressmode      |     Optimizing     | Option |
  5270.      +------------------------+--------------------+--------+
  5271.      +------------------------+--------------------+--------+
  5272.      |  move. l (bd.w),dn     |   move.l bd.w,dn   |  -OC4  |
  5273.      +------------------------+--------------------+--------+
  5274.  
  5275.    * `(bd.l)' can be optimized to `bd.l' that removes 1 word and some
  5276.      cycles.
  5277.  
  5278.      +------------------------+--------------------+--------+
  5279.      |       Addressmode      |     Optimizing     | Option |
  5280.      +------------------------+--------------------+--------+
  5281.      +------------------------+--------------------+--------+
  5282.      |  move. l (bd.l),dn     |   move.l bd.l,dn   |  -OC5  |
  5283.      +------------------------+--------------------+--------+
  5284.  
  5285.    * `(an)' can be optimized to `(an)' that removes 1 word and some
  5286.      cycles.  The addressmode `(an)' can be interpreted as a subgroup
  5287.      of `(bd,an,xn)'. Because `(an)' is a normal 68000 addressmode you
  5288.      should never switch off this optimizing method.
  5289.  
  5290.      +------------------------+--------------------+--------+
  5291.      |       Addressmode      |     Optimizing     | Option |
  5292.      +------------------------+--------------------+--------+
  5293.      +------------------------+--------------------+--------+
  5294.      |     move. l (an),dn    |   move.l (an),dn   |  -OC6  |
  5295.      +------------------------+--------------------+--------+
  5296.  
  5297.    * `(pc)' can be optimized to `(pc)' that removes 1 word and some
  5298.      cycles.  The addressmode `(pc)' can be interpreted as a subgroup
  5299.      of `(bd,pc,xn)'. Because `(pc)' is a normal 68000 addressmode you
  5300.      should never switch off this optimizing method.
  5301.  
  5302.      +------------------------+--------------------+--------+
  5303.      |       Addressmode      |     Optimizing     | Option |
  5304.      +------------------------+--------------------+--------+
  5305.      +------------------------+--------------------+--------+
  5306.      |     move. l (pc),dn    |   move.l (pc),dn   |  -OC7  |
  5307.      +------------------------+--------------------+--------+
  5308.  
  5309. Address Optimizing
  5310. ------------------
  5311.  
  5312.    * `Long'
  5313.  
  5314.      +---------------+----------------+---------------------+--------+
  5315.      | Addressmode   |   Optimizing   |         Note        | Option |
  5316.      +---------------+----------------+---------------------+--------+
  5317.      +---------------+----------------+---------------------+--------+
  5318.      |     x.l,EA    |    x.w,EA      | $ffff8000<=x<=$7fff |        |
  5319.      +---------------+----------------+---------------------+  -OAL  |
  5320.      |     EA,x.l    |    EA,x.l      | $ffff8000<=x<=$7fff |        |
  5321.      +---------------+----------------+---------------------+--------+
  5322.  
  5323.    * `x(an)'
  5324.  
  5325.      +---------------+----------------+---------------------+--------+
  5326.      | Addressmode   |   Optimizing   |         Note        | Option |
  5327.      +---------------+----------------+---------------------+--------+
  5328.      +---------------+----------------+---------------------+--------+
  5329.      |   x(an),EA    |    (an),EA     |         x=0         |        |
  5330.      +---------------+----------------+---------------------+  -OAX  |
  5331.      |   EA,x(an)    |    EA,(an)     |         x=0         |        |
  5332.      +---------------+----------------+---------------------+--------+
  5333.  
  5334.    * `PC-Relative'
  5335.  
  5336.      +---------------+----------------+---------------------+--------+
  5337.      | Addressmode   |   Optimizing   |         Note        | Option |
  5338.      +---------------+----------------+---------------------+--------+
  5339.      +---------------+----------------+---------------------+--------+
  5340.      |   label,EA    |  label(pc),EA  | $ffff8000<=x<=$7fff |  -OAP  |
  5341.      +---------------+----------------+---------------------+--------+
  5342.  
  5343.    * `A4-Smalldata'
  5344.  
  5345.      +---------------+----------------+---------------------+--------+
  5346.      | Addressmode   |   Optimizing   |         Note        | Option |
  5347.      +---------------+----------------+---------------------+--------+
  5348.      +---------------+----------------+---------------------+--------+
  5349.      |     x.l,EA    |    x(a4),EA    | $ffff8000<=x<=$7fff |        |
  5350.      +---------------+----------------+---------------------+  -OAS  |
  5351.      |     EA,x.l    |    EA,x(a4)    | $ffff8000<=x<=$7fff |        |
  5352.      +---------------+----------------+---------------------+--------+
  5353.  
  5354.    * `68020-An'
  5355.  
  5356.      +---------------+----------------+---------------------+--------+
  5357.      | Addressmode   |   Optimizing   |         Note        | Option |
  5358.      +---------------+----------------+---------------------+--------+
  5359.      +---------------+----------------+---------------------+--------+
  5360.      |   (x.l,an)    |    (an)        | x=0                 |  -OAY  |
  5361.      +---------------+----------------+---------------------+        |
  5362.      |   (x.l,an)    |    x(an)       | $ffffff80<=x<=$7f   |        |
  5363.      +---------------+----------------+---------------------+        |
  5364.      |   (x,an,xn)   |    0(an,xn)    | x=0                 |        |
  5365.      +---------------+----------------+---------------------+        |
  5366.      |   (x,an,xn)   |    (x.b,an,xn) | $ffffff80<=x<=$7f   |        |
  5367.      +---------------+----------------+---------------------+        |
  5368.      |   (x,an,xn)   |    (x.w,an,xn) | $ffff8000<=x<=$7fff |        |
  5369.      +---------------+----------------+---------------------+        |
  5370.      |   ([?],x)     |    ([?])       | x=0                 |        |
  5371.      |               |                | ? is also optimized |        |
  5372.      +---------------+----------------+---------------------+        |
  5373.      |   ([?],x)     |    ([?],x.w)   | $ffff8000<=x<=$7fff |        |
  5374.      |               |                | ? is also optimized |        |
  5375.      +---------------+----------------+---------------------+        |
  5376.      |   ([?],xn,x)  |    ([?],xn)    | x=0                 |        |
  5377.      |               |                | ? is also optimized |        |
  5378.      +---------------+----------------+---------------------+        |
  5379.      |   ([?],xn,x)  |    ([?],xn,x.w)| $ffff8000<=x<=$7fff |        |
  5380.      |               |                | ? is also optimized |        |
  5381.      +---------------+----------------+---------------------+--------+
  5382.  
  5383.    * `68020-PC'
  5384.  
  5385.      +---------------+----------------+---------------------+--------+
  5386.      | Addressmode   |   Optimizing   |         Note        | Option |
  5387.      +---------------+----------------+---------------------+--------+
  5388.      +---------------+----------------+---------------------+--------+
  5389.      |   (x.l,pc)    |    (pc)        | x=0                 |  -OAZ  |
  5390.      +---------------+----------------+---------------------+        |
  5391.      |   (x.l,pc)    |    x(pc)       | $ffffff80<=x<=$7f   |        |
  5392.      +---------------+----------------+---------------------+        |
  5393.      |   (x,pc,xn)   |    0(pc,xn)    | x=0                 |        |
  5394.      +---------------+----------------+---------------------+        |
  5395.      |   (x,pc,xn)   |    (x.b,pc,xn) | $ffffff80<=x<=$7f   |        |
  5396.      +---------------+----------------+---------------------+        |
  5397.      |   (x,pc,xn)   |    (x.w,pc,xn) | $ffff8000<=x<=$7fff |        |
  5398.      +---------------+----------------+---------------------+        |
  5399.      |   ([?],x)     |    ([?])       | x=0                 |        |
  5400.      |               |                | ? is also optimized |        |
  5401.      +---------------+----------------+---------------------+        |
  5402.      |   ([?],x)     |    ([?],x.w)   | $ffff8000<=x<=$7fff |        |
  5403.      |               |                | ? is also optimized |        |
  5404.      +---------------+----------------+---------------------+        |
  5405.      |   ([?],xn,x)  |    ([?],xn)    | x=0                 |        |
  5406.      |               |                | ? is also optimized |        |
  5407.      +---------------+----------------+---------------------+        |
  5408.      |   ([?],xn,x)  |    ([?],xn,x.w)| $ffff8000<=x<=$7fff |        |
  5409.      |               |                | ? is also optimized |        |
  5410.      +---------------+----------------+---------------------+--------+
  5411.  
  5412. #x Optimizing
  5413. -------------
  5414.  
  5415.    * `Move'
  5416.  
  5417.      +-------------------+------------------+-------------------------+--------+
  5418.      | Addressmode       |   Optimizing     |         Note            | Option |
  5419.      +-------------------+------------------+-------------------------+--------+
  5420.      |                   |                  |                         |  -OD0  |
  5421.      +-------------------+------------------+-------------------------+--------+
  5422.      |  move.l #x,dn     |   moveq #x,dn    |    $ffffff80<=$7f       |  -OD00 |
  5423.      +-------------------+------------------+-------------------------+        |
  5424.      |  move.? #0,an     |  suba.l an,an    |      ? = w or l         |  -OD01 |
  5425.      +-------------------+------------------+-------------------------+        |
  5426.      |  move.l #x,dn     | moveq #y,dn      | $10000<=x<=$7f0000      |  -OD02 |
  5427.      |                   | swap dn          |                         |        |
  5428.      +-------------------+------------------+-------------------------+        |
  5429.      |  move.l #x,dn     | moveq #y,dn      | $ff80ffff<=x<=$fffEffff |  -OD03 |
  5430.      |                   | swap dn          |                         |        |
  5431.      +-------------------+------------------+-------------------------+        |
  5432.      |  move.l #x,dn     | moveq #y,dn      |      $80<=x<=$ff        |  -OD04 |
  5433.      |                   | not.b dn         |                         |        |
  5434.      +-------------------+------------------+-------------------------+        |
  5435.      |  move.l #x,dn     | moveq #y,dn      |     $ffff<=x<=$ff81     |  -OD05 |
  5436.      |                   | neg.w dn         |                         |        |
  5437.      +-------------------+------------------+-------------------------+        |
  5438.      |  move.l #x,dn     | moveq #y,dn      | $ffff0080<=x<=$ffff0001 |  -OD06 |
  5439.      |                   | neg.w dn         |                         |        |
  5440.      +-------------------+------------------+-------------------------+        |
  5441.      |  move.? #0,EA     | clr.? EA         | ? = w or l.See Trashreg |  -OD07 |
  5442.      |                   |                  | optimizing. I also check|        |
  5443.      |                   |                  | if it accesses the HW   |        |
  5444.      +-------------------+------------------+-------------------------+        |
  5445.      | move.b #$ff,EA    | st EA            |                         |  -OD08 |
  5446.      +-------------------+------------------+-------------------------+        |
  5447.      | movea.l -4(an),an | movea.l -(an),an |                         |  -OD09 |
  5448.      +-------------------+------------------+-------------------------+        |
  5449.      | movea.w -2(an),an | movea.w -(an),an |                         |  -OD0a |
  5450.      +-------------------+------------------+-------------------------+--------+
  5451.  
  5452.    * `Clr'
  5453.  
  5454.      +---------------+----------------+-------------------------+--------+
  5455.      | Addressmode   |   Optimizing   |         Note            | Option |
  5456.      +---------------+----------------+-------------------------+--------+
  5457.      +---------------+----------------+-------------------------+--------+
  5458.      |    clr.l dn   |   moveq #0,dn  |                         |  -OD1  |
  5459.      +---------------+----------------+-------------------------+--------+
  5460.  
  5461.    * `Add'
  5462.  
  5463.      +---------------+----------------+-------------------------+--------+
  5464.      | Addressmode   |   Optimizing   |         Note            | Option |
  5465.      +---------------+----------------+-------------------------+--------+
  5466.      +---------------+----------------+-------------------------+--------+
  5467.      |  add.? #x,EA  |  addq.? #x,EA  |       1<=x<=8           |  -OD2  |
  5468.      +---------------+----------------+-------------------------+        |
  5469.      |  add.? #x,EA  |  subq.? #x,EA  |      -8<=x<=-1          |        |
  5470.      +---------------+----------------+-------------------------+        |
  5471.      |  add.? #x,an  | lea.l x(an),an |   $ffff8000<=x<=$7fff   |        |
  5472.      +---------------+----------------+-------------------------+        |
  5473.      |  add.? #0,EA  | tst.? EA       |       legal EA          |        |
  5474.      +---------------+----------------+-------------------------+        |
  5475.      |  add.? #0,an  | removed        |                         |        |
  5476.      +---------------+----------------+-------------------------+--------+
  5477.  
  5478.    * `Sub'
  5479.  
  5480.      +---------------+----------------+-------------------------+--------+
  5481.      | Addressmode   |   Optimizing   |         Note            | Option |
  5482.      +---------------+----------------+-------------------------+--------+
  5483.      +---------------+----------------+-------------------------+--------+
  5484.      |  sub.? #x,EA  |  subq.? #x,EA  |       1<=x<=8           |  -OD3  |
  5485.      +---------------+----------------+-------------------------+        |
  5486.      |  sub.? #x,EA  |  addq.? #x,EA  |      -8<=x<=-1          |        |
  5487.      +---------------+----------------+-------------------------+        |
  5488.      |  sub.? #x,an  |lea.l -x(an),an |   $ffff8000<=x<=$7fff   |        |
  5489.      +---------------+----------------+-------------------------+        |
  5490.      |  sub.? #0,EA  | tst.? EA       |       legal EA          |        |
  5491.      +---------------+----------------+-------------------------+        |
  5492.      |  sub.? #0,an  | removed        |                         |        |
  5493.      +---------------+----------------+-------------------------+--------+
  5494.  
  5495.    * `Lea'
  5496.  
  5497.      +---------------+----------------+-------------------------+--------+
  5498.      | Addressmode   |   Optimizing   |         Note            | Option |
  5499.      +---------------+----------------+-------------------------+--------+
  5500.      +---------------+----------------+-------------------------+--------+
  5501.      | lea x(an),an  |  addq.w #x,an  |       1<=x<=8           |        |
  5502.      +---------------+----------------+-------------------------+  -OD4  |
  5503.      | lea x(an),an  |  subq.w #x,an  |      -8<=x<=-1          |        |
  5504.      +---------------+----------------+-------------------------+--------+
  5505.  
  5506.    * `Cmp'
  5507.  
  5508.      +---------------+----------------+-------------------------+--------+
  5509.      | Addressmode   |   Optimizing   |         Note            | Option |
  5510.      +---------------+----------------+-------------------------+--------+
  5511.      +---------------+----------------+-------------------------+--------+
  5512.      |  cmp.? #0,EA  |   tst.? EA     |                         |  -OD5  |
  5513.      +---------------+----------------+-------------------------+--------+
  5514.  
  5515.    * `Bcc'
  5516.  
  5517.      The assembler tries to optimize the branch on the smallest
  5518.      possible length so that can win max 2 words and some cycles.
  5519.  
  5520.      +---------------+----------------+-------------------------+--------+
  5521.      | Addressmode   |   Optimizing   |         Note            | Option |
  5522.      +---------------+----------------+-------------------------+--------+
  5523.      +---------------+----------------+-------------------------+--------+
  5524.      |  Bcc.l label  |  Bcc.w label   |   $8000<=label<=$7fff   |  -OD6  |
  5525.      +---------------+----------------+-------------------------+        |
  5526.      |  Bcc.l label  |  Bcc.s label   |     $80<=label<=$7f     |        |
  5527.      +---------------+----------------+-------------------------+        |
  5528.      |  Bcc.w label  |  Bcc.s label   |     $80<=label<=$7f     |        |
  5529.      +---------------+----------------+-------------------------+--------+
  5530.  
  5531.      Attention! This optimizing methid is unsafe when you use
  5532.      BRANCH-Tables.  You should switch off the optimize method over
  5533.      this area.
  5534.  
  5535.  
  5536.    * `Jsr'
  5537.  
  5538.      +---------------+----------------+-------------------------+--------+
  5539.      | Addressmode   |   Optimizing   |         Note            | Option |
  5540.      +---------------+----------------+-------------------------+--------+
  5541.      +---------------+----------------+-------------------------+--------+
  5542.      |   jsr label   |  bsr.w label   |   $8000<=Offset<=$7fff  |        |
  5543.      +---------------+----------------+-------------------------+  -OD7  |
  5544.      |   jsr label   |  bsr.s label   |     $80<=Offset<=$7f    |        |
  5545.      +---------------+----------------+-------------------------+--------+
  5546.  
  5547.      Attention! This optimizing methid is unsafe when you use
  5548.      JSR-Tables.  You should switch off the optimize method over this
  5549.      area.
  5550.  
  5551.  
  5552.    * `Jmp'
  5553.  
  5554.      +---------------+----------------+-------------------------+--------+
  5555.      | Addressmode   |   Optimizing   |         Note            | Option |
  5556.      +---------------+----------------+-------------------------+--------+
  5557.      +---------------+----------------+-------------------------+--------+
  5558.      |   jmp label   |  bra.w label   |$ffff8000<=Offset<=$7fff |        |
  5559.      +---------------+----------------+-------------------------+  -OD8  |
  5560.      |   jmp label   |  bra.s label   |$ffffff80<=Offset<=$7f   |        |
  5561.      +---------------+----------------+-------------------------+--------+
  5562.  
  5563.    * `Asl'
  5564.  
  5565.      +---------------+----------------+-------------------------+--------+
  5566.      | Addressmode   |   Optimizing   |         Note            | Option |
  5567.      +---------------+----------------+-------------------------+--------+
  5568.      +---------------+----------------+-------------------------+--------+
  5569.      |  asl.? #1,dn  |  add.? dn,dn   |                         |  -OD9  |
  5570.      +---------------+----------------+-------------------------+--------+
  5571.  
  5572.    * `Or' This optimizing method isn't safe because of the changed
  5573.      condition flags.
  5574.  
  5575.      +---------------+----------------+-------------------------+--------+
  5576.      | Addressmode   |   Optimizing   |         Note            | Option |
  5577.      +---------------+----------------+-------------------------+--------+
  5578.      +---------------+----------------+-------------------------+--------+
  5579.      |  or.? #x,dn   |  bset #y,dn    | x=y^2                   |  -ODa  |
  5580.      +---------------+----------------+-------------------------+--------+
  5581.  
  5582.    * `Eor' This optimizing method isn't safe because of the changed
  5583.      condition flags.
  5584.  
  5585.      +---------------+----------------+-------------------------+--------+
  5586.      | Addressmode   |   Optimizing   |         Note            | Option |
  5587.      +---------------+----------------+-------------------------+--------+
  5588.      +---------------+----------------+-------------------------+--------+
  5589.      |  eor.? #x,dn  |  bchg #y,dn    | x=y^2                   |  -ODb  |
  5590.      +---------------+----------------+-------------------------+--------+
  5591.  
  5592.    * `Mulu'
  5593.  
  5594.      Be very careful with this optimizing.
  5595.  
  5596.      +---------------+----------------+-------------------------+--------+
  5597.      | Addressmode   |   Optimizing   |         Note            | Option |
  5598.      +---------------+----------------+-------------------------+--------+
  5599.      +---------------+----------------+-------------------------+--------+
  5600.      | mulu.w #x,dn  | swap dn        | x=2^y                   |  -ODc  |
  5601.      |               | clr.w dn       | y=y1+y2                 |        |
  5602.      |               | swap dn        | y=1,add.l dn,dn         |        |
  5603.      |               | lsl.l #y1,dn   |                         |        |
  5604.      |               | lsl.l #y2,dn   |                         |        |
  5605.      +---------------+----------------+-------------------------+        |
  5606.      | mulu.l #x,dn  | lsl.l #y1,dn   | x=2^y                   |        |
  5607.      |               | lsl.l #y2,dn   | y=y1+y2                 |        |
  5608.      |               |                | y >= 16                 |        |
  5609.      |               |                | swap dn , y-16          |        |
  5610.      +---------------+----------------+-------------------------+--------+
  5611.  
  5612.    * `Muls'
  5613.  
  5614.      Be very careful with this optimizing.
  5615.  
  5616.      +---------------+----------------+-------------------------+--------+
  5617.      | Addressmode   |   Optimizing   |         Note            | Option |
  5618.      +---------------+----------------+-------------------------+--------+
  5619.      +---------------+----------------+-------------------------+--------+
  5620.      | muls.w #x,dn  | ext.l dn       | x=2^y                   |  -ODd  |
  5621.      |               | asl.l #y1,dn   | y=y1+y2                 |        |
  5622.      |               | asl.l #y2,dn   | y=1 , add.l dn,dn       |        |
  5623.      +---------------+----------------+-------------------------+        |
  5624.      | muls.l #x,dn  | asl.l #y1,dn   | x=2^y                   |        |
  5625.      |               | asl.l #y2,dn   | y=y1+y2                 |        |
  5626.      |               |                | y >= 16                 |        |
  5627.      |               |                | swap dn ,y-16           |        |
  5628.      +---------------+----------------+-------------------------+--------+
  5629.  
  5630.    * `Jsr+Rts'
  5631.  
  5632.      +--------------+---------------+------------------------+-------+
  5633.      | Addressmode   |   Optimizing   |         Note            |
  5634.      Option |
  5635.      +--------------+---------------+------------------------+-------+
  5636.      +--------------+---------------+------------------------+-------+
  5637.      | jsr EA        | jmp EA         | No optimizing if there's|  -ODe
  5638.      | | rts           |                | a label before RTS      |
  5639.         |
  5640.      +--------------+---------------+------------------------+-------+
  5641.  
  5642.    * `Bsr+Rts'
  5643.  
  5644.      +--------------+---------------+------------------------+-------+
  5645.      | Addressmode   |   Optimizing   |         Note            |
  5646.      Option |
  5647.      +--------------+---------------+------------------------+-------+
  5648.      +--------------+---------------+------------------------+-------+
  5649.      | jmp EA        | jmp EA         | No optimizing if there's|  -ODf
  5650.      | | rts           |                | a label before RTS      |
  5651.         |
  5652.      +--------------+---------------+------------------------+-------+
  5653.  
  5654.    * `MovemNoRegister'
  5655.  
  5656.      +---------------+----------------+-------------------------+--------+
  5657.      | Addressmode   |   Optimizing   |         Note            | Option |
  5658.      +---------------+----------------+-------------------------+--------+
  5659.      +---------------+----------------+-------------------------+--------+
  5660.      |  movem.l ,EA  |     Removed    |                         |        |
  5661.      +---------------+----------------+-------------------------+  -ODh  |
  5662.      |  movem.l EA,  |     Removed    |                         |        |
  5663.      +---------------+----------------+-------------------------+--------+
  5664.  
  5665.    * `MovemOneRegister'
  5666.  
  5667.      +---------------+----------------+-------------------------+--------+
  5668.      | Addressmode   |   Optimizing   |         Note            | Option |
  5669.      +---------------+----------------+-------------------------+--------+
  5670.      +---------------+----------------+-------------------------+--------+
  5671.      | movem.l Xn,EA |  Move.l Xn,EA  | Alter the status flags! |        |
  5672.      +---------------+----------------+-------------------------+  -ODi  |
  5673.      | movem.l EA,Xn |  Move.l EA,Xn  | Alter the status flags! |        |
  5674.      +---------------+----------------+-------------------------+--------+
  5675.  
  5676. Register Optimizing
  5677. -------------------
  5678.  
  5679.    * `#xxx' is switched off.
  5680.  
  5681.         * An address register is set free by `trashreg'.
  5682.  
  5683.           +---------------+--------------------+-------------------------+--------+
  5684.           | Addressmode   |   Optimizing       |         Note            | Option |
  5685.           +---------------+--------------------+-------------------------+--------+
  5686.           +---------------+--------------------+-------------------------+--------+
  5687.           |move.? EA,label| lea.l label(pc),an | $ffff8000<=label<=$7fff |        |
  5688.           |               | move.? EA,(an)     |                         |  -OAR  |
  5689.           +---------------+--------------------+-------------------------+        |
  5690.           |  tst.?  label | lea.l label(pc),an | $ffff8000<=label<=$7fff |        |
  5691.           |               | tst.? (an)         |                         |        |
  5692.           +---------------+--------------------+-------------------------+        |
  5693.           |  not.?  label | lea.l label(pc),an | $ffff8000<=label<=$7fff |        |
  5694.           |               | not.? (an)         |                         |        |
  5695.           +---------------+--------------------+-------------------------+        |
  5696.           |  neg.?  label | lea.l label(pc),an | $ffff8000<=label<=$7fff |        |
  5697.           |               | neg.? (an)         |                         |        |
  5698.           +---------------+--------------------+-------------------------+        |
  5699.           |  negx.? label | lea.l label(pc),an | $ffff8000<=label<=$7fff |        |
  5700.           |               | negx.? (an)        |                         |        |
  5701.           +---------------+--------------------+-------------------------+        |
  5702.           |  nbcd label   | lea.l label(pc),an | $ffff8000<=label<=$7fff |        |
  5703.           |               | nbcd (an)          |                         |        |
  5704.           +---------------+--------------------+-------------------------+        |
  5705.           |   scc label   | lea.l label(pc),an | $ffff8000<=label<=$7fff |        |
  5706.           |               | scc (an)           |                         |        |
  5707.           +---------------+--------------------+-------------------------+--------+
  5708.  
  5709.    * `#x' Optimizing on.
  5710.  
  5711.         * A data register is set free by `trashreg'.
  5712.  
  5713.           +---------------+--------------------+-------------------------+--------+
  5714.           | Addressmode   |   Optimizing       |         Note            | Option |
  5715.           +---------------+--------------------+-------------------------+--------+
  5716.           +---------------+--------------------+-------------------------+--------+
  5717.           | move.l #x,EA  | moveq  #x,dn       |    $ffffff80<=x<=$7f    |        |
  5718.           |               | move.l dn,EA       |                         |  -OAR  |
  5719.           +---------------+--------------------+-------------------------+        |
  5720.           | ori.l  #x,EA  | moveq  #x,dn       |    $ffffff80<=x<=$7f    |        |
  5721.           |               | or.l   dn,EA       |                         |        |
  5722.           +---------------+--------------------+-------------------------+        |
  5723.           | eori.l #x,EA  | moveq  #x,dn       |    $ffffff80<=x<=$7f    |        |
  5724.           |               | eor.l  dn,EA       |                         |        |
  5725.           +---------------+--------------------+-------------------------+        |
  5726.           | andi.l #x,EA  | moveq  #x,dn       |    $ffffff80<=x<=$7f    |        |
  5727.           |               | and.l  dn,EA       |                         |        |
  5728.           +---------------+--------------------+-------------------------+        |
  5729.           | addi.l #x,EA  | moveq  #x,dn       |    $ffffff80<=x<=$7f    |        |
  5730.           |               | add.l  dn,EA       |                         |        |
  5731.           +---------------+--------------------+-------------------------+        |
  5732.           | subi.l #x,EA  | moveq  #x,dn       |    $ffffff80<=x<=$7f    |        |
  5733.           |               | sub.l  dn,EA       |                         |        |
  5734.           +---------------+--------------------+-------------------------+        |
  5735.           | cmpi.l #x,EA  | moveq  #x,dn       |    $ffffff80<=x<=$7f    |        |
  5736.           |               | cmp.l  EA,dn       |                         |        |
  5737.           +---------------+--------------------+-------------------------+        |
  5738.           | move.? #0,EA  | moveq  #0,dn       | Time optimizing         |        |
  5739.           |               | move.l dn,EA       | must be on              |        |
  5740.           +---------------+--------------------+-------------------------+--------+
  5741.  
  5742. How does Optimizing work ?
  5743. --------------------------
  5744.  
  5745.    In single-pass Optimizing the assembler can only optimize commands
  5746. where it can resolve the reference in the first pass.  This means the
  5747. label or symbol has to be known before.  In multi-pass Optimizing it
  5748. can optimize every command without bothering where the label is defined.
  5749. The Assembler keeps all labels each pass but increases a change counter
  5750. if the old contents differs with the new contents.  The exception is
  5751. that the assembler can't optimize commands that depend on symbols that
  5752. are defined after the command.  The reason is that the Assembler has to
  5753. remove each pass every symbol to avoid problems with `IFD' and `IFND'
  5754. that can cause that certain areas aren't assembled in multi-pass mode.
  5755. You probably noticed that i assume that nobody used `IFD' or `IFND'
  5756. with labels because that would also break multi-pass.
  5757.  
  5758.    An example for a construct that can't be optimized.
  5759.  
  5760.           move.l #1,NULL(a0)
  5761.      NULL=0
  5762.  
  5763. Problems...
  5764. -----------
  5765.  
  5766.    You should always be careful with optimizing because it can cause
  5767. bugs in certain source areas.  Branch optimizing for example has to be
  5768. switched off if you use JMP-Towers.
  5769.  
  5770.  
  5771.           lsl.w #1,d0
  5772.           jmp   Tower(pc,d0.w)
  5773.      
  5774.       Tower:
  5775.           bra.w func1
  5776.           bra.w func2
  5777.           bra.w func3
  5778.      
  5779.       could be be optimized to
  5780.      
  5781.       Tower:
  5782.           bra.w func1
  5783.           bra.s func2
  5784.           bra.s func3
  5785.      
  5786.       that leads to program bugs.
  5787.      
  5788.       Solution:
  5789.      
  5790.       bopt OD6-
  5791.      
  5792.       Tower:
  5793.           bra.w func1
  5794.           bra.w func2
  5795.           bra.w func3
  5796.      
  5797.       bopt OD6+
  5798.  
  5799. Preassembled Includes
  5800. =====================
  5801.  
  5802.    If you want to assemble a program that needs to load a lot includes
  5803. it's useful to preassemble the includes and load one file because  the
  5804. real slowdown factor is the need loading time.   You can only use
  5805. absolut symbols and macros in a preassembled file.   All relative and
  5806. symbols defined by `set' aren't written into  a preassembled file.
  5807. The created file isn't compress to avoid any slowdown but if  the file
  5808. size is critical you can compress the file by xpk and  load it through
  5809. the xfh filesystem.
  5810.  
  5811.      basm -p Source.S creates the preassembled file Source.p
  5812.  
  5813.  
  5814.      An error location could be absolut symbols that are calculated  by
  5815.      relative symbols. You should avoid these symbols.
  5816.  
  5817.      Symbol=Label1-Label2
  5818.  
  5819.  
  5820. Resident includes
  5821. =================
  5822.  
  5823.    `BASM' can control an Include and Incbin database by the library
  5824. `cachefile.library' to get rid of the loading delays.  The files in the
  5825. database can be shown and deleted.
  5826.  
  5827. Basm Assembler System
  5828. =====================
  5829.  
  5830. Cli Calling Convention
  5831. ----------------------
  5832.  
  5833.    `Format:'
  5834.  
  5835.      BASM [-Option] Name
  5836.  
  5837.  
  5838.    This is the commandline version of the assembler and can be easy
  5839. integrated in own development system, for example `Make' and `CED'.  An
  5840. assembler error is indicated by the result 20 and the result 10 is used
  5841. if no source file were specified.
  5842.  
  5843.    * `Option'
  5844.  
  5845.      The same options are accepted that are described in the assembler
  5846.      command *Note BOPT: MI_BOPT.  The following options are accepted
  5847.      additionally.
  5848.  
  5849.         * A[+,-] Turns ARexx mode on/off
  5850.  
  5851.         * C <Configuration> loads a configuration file
  5852.  
  5853.         * d <Symbol=Value> defines a symbol
  5854.  
  5855.    * `Standard-Optionen'
  5856.  
  5857.  
  5858.           ;All other options are deactivated.
  5859.           
  5860.           c+,e+,m1000,wo+,ws+,wm+,w2+,w4+,wp+
  5861.           b1+,B0+,n1+
  5862.           OC0+,OC1+,OC2+,OC3+,OC4+,OC5+,OC6+,OC7+,
  5863.           ODD+,OD0+,OD1+,OD2+,OD3+,OD4+,OD5+,OD6+,OD7+,OD8+,
  5864.           OD9+,ODc+,ODe+,ODf+,ODg+
  5865.           OAP+,OAL+,OAX+,OAY+,OAZ+,OAR+
  5866.  
  5867. Configuration
  5868. -------------
  5869.  
  5870. Global
  5871. ......
  5872.  
  5873.    You can define the global configuration through the file
  5874. `ENV:BASMOption'. The internal standard configuration  is not replaced
  5875. but can only be changed.
  5876.  
  5877.    File `ENV:BASMOption'
  5878.  
  5879.  
  5880.       -v
  5881.       -f
  5882.       -c-
  5883.       -iASM:
  5884.  
  5885.      If a line doesn't start with - it's ignored.
  5886.  
  5887.  
  5888. WB Tooltypes
  5889. ............
  5890.  
  5891.    Additionally you can also define the above described configuration
  5892. options in the tooltypes of the source file icon.   Furthermore `BASM'
  5893. allows a special tooltype to define  an output window.
  5894.  
  5895.    o Window= <Window Defintion>
  5896.  
  5897. ARexx
  5898. =====
  5899.  
  5900.    The `BASM' ARexx Port Name is `rexx_BASM' and the  ARexx Script
  5901. suffix `.basm'.   To activate the `BASM' ARexx mode you have to start
  5902. `BASM' with the option -A.
  5903.  
  5904. BASM
  5905. ....
  5906.  
  5907.    `BASM [-Option] Name'
  5908.  
  5909.    This ARexx command starts the assembler and coincides with the
  5910. CLI-syntax structure.
  5911.  
  5912. BEND
  5913. ....
  5914.  
  5915.    `BEND'
  5916.  
  5917.    This ARexx command closes the ARexx port and shuts down the
  5918. assembler.
  5919.  
  5920. BGETERROR
  5921. .........
  5922.  
  5923.    `BGETERROR'
  5924.  
  5925.    With this ARexx command you will receive an explanation of the actual
  5926. errors. If no errors exist it will return a status code 20.
  5927.  
  5928.    Error Format String
  5929.  
  5930.    OFFSET|FILE|<Error Description>
  5931.  
  5932. BNEXTERROR
  5933. ..........
  5934.  
  5935.    `BNEXTERROR'
  5936.  
  5937.    This ARexx command will cause a jump to the next error in the list.
  5938. If there are no further errors in the list it will return a status
  5939. code 20.
  5940.  
  5941. BINITERROR
  5942. ..........
  5943.  
  5944.    `BINITERROR'
  5945.  
  5946.    This ARexx command will cause a jump to the first entry in the error
  5947. list. If no error exists it will return a status code 20.
  5948.  
  5949. BGETWARNING
  5950. ...........
  5951.  
  5952.    `BGETWARNING'
  5953.  
  5954.    works like `BGETERROR' only for Warnings.
  5955.  
  5956. BNEXTWARNING
  5957. ............
  5958.  
  5959.    `BNEXTWARNING'
  5960.  
  5961.    works like `BNEXTERROR' only for Warnings.
  5962.  
  5963. BINITWARNING
  5964. ............
  5965.  
  5966.    `BINITWARNING'
  5967.  
  5968.    works like `BINITERROR' only for Warnings.
  5969.  
  5970. Compatibility
  5971. =============
  5972.  
  5973. to other assemblers...
  5974. ----------------------
  5975.  
  5976.  
  5977.      Fortunately `BASM' can't be 100% compatible to every assembler on
  5978.      the amiga market.  Thus you can expect problems with different
  5979.      sources.  In general you can expect problems with commands that
  5980.      don't belong to a standard like option commands.  Furthermore you
  5981.      should also be careful with sources that directly depend on the
  5982.      assembler implementation.  Because `BASM' is a 1-Pass Assembler in
  5983.      the normal mode with an additional backpatch phase you shouldn't
  5984.      define symbols that can't be resolved at once.  An ideal example
  5985.      for this practice is the `Xoper2.2' Source that was developed with
  5986.      the PD Assembler A68k.  While assembling with `BASM' the assembler
  5987.      detects that a not defined symbols is accessed through the `SET'
  5988.      command.  Generally this should cause an error at once but
  5989.      unfortunately `A68k' doesn't show anything and uses the last value
  5990.      of `cmdnum'.
  5991.  
  5992.  
  5993.  
  5994.           ADDCMD        MACRO
  5995.           cmdnum        set     cmdnum+1
  5996.                   dc.b    \1,0
  5997.                   ENDM
  5998.                       .
  5999.                       .
  6000.                       .
  6001.           ;Here it's using `cmdnum' although
  6002.           ;the symbol wasn't defined yet
  6003.                   addq    #1,d2
  6004.                   cmp.w   #cmdnum,d2
  6005.                   bne.s   1$
  6006.                       .
  6007.                       .
  6008.                       .
  6009.           
  6010.           ;Here the cmdnum is first defined
  6011.           cmdnum        set      0
  6012.           commds        ADDCMD  'time'
  6013.                   ADDCMD  'taskpri'
  6014.                   ADDCMD  'info'
  6015.                   ADDCMD  'pri'
  6016.                   ADDCMD  'flush'
  6017.  
  6018.      Because the A68k is a 2-Pass Assembler he can assemble this Source
  6019.      without problems.
  6020.  
  6021.  
  6022.      Another Problem is that the assembler argument parser doesn't
  6023.      detect Overflow because of speed reasons. I don't think it's worth
  6024.      it...if you differ tell me your opinion.
  6025.  
  6026.  
  6027.      The assembler doesn't support the following motorola syntax bugs
  6028.      because of the internal structure of the parser it would cause
  6029.      major problems in the multi-pass mode.
  6030.  
  6031.  
  6032.           symbol: equ 0
  6033.           symbol: equr d0
  6034.  
  6035. C-Compiler Assembler
  6036. --------------------
  6037.  
  6038. Dice
  6039. ....
  6040.  
  6041.    If you use Basm as a `DASM' replacement you have to run `Basm' with
  6042. the option -OAS to activate the Smalldata mode.  If you want to emulate
  6043. the advanced `Link', `UnLink', `Movem' optimizing `DASM' supports you
  6044. have to use the options -O, -OG, -ODh, -ODi and -ODj.  The option -OG
  6045. is needed because the link stackframe register list symbols are defined
  6046. after the commands so the assembler doesn't know them in 1 pass mode.
  6047. Sorry...i had to disable this mode because i later detected that i have
  6048. to keep track of the used registers.  I'll try to fix this in a later
  6049. version
  6050.  
  6051. Literature
  6052. **********
  6053.  
  6054.    * [Addison Wesley] RKM Libraries 2.04,CATS
  6055.  
  6056.    * [Addison Wesley] RKM Devices 2.04,CATS
  6057.  
  6058.    * [Addison Wesley] RKM Autodocs\&Includes 2.04,CATS
  6059.  
  6060.    * [Addison Wesley] RKM Hardware 2.04,CATS
  6061.  
  6062.    * [Addison Wesley] RKM Styleguide,CATS
  6063.  
  6064.    * [Addison Wesley] RKM Libraries 1.1,CATS
  6065.  
  6066.    * [Addison Wesley] RKM Intuition 1.1,CATS
  6067.  
  6068.    * [Addison Wesley] RKM Exec 1.1,CATS
  6069.  
  6070.    * [Addison Wesley] RKM Hardware 1.1,CATS
  6071.  
  6072.    * [Edotronik] Kommentiertes Rom-Listing 1,Dr. Ruprecht
  6073.  
  6074.    * [Edotronik] Kommentiertes Rom-Listing 2,Dr. Ruprecht
  6075.  
  6076.    * [Edotronik] Kommentiertes Rom-Listing 3,Dr. Ruprecht
  6077.  
  6078.    * [Ralph Babel] Guru Book,Selbstvertrieb
  6079.  
  6080. Software
  6081. ********
  6082.  
  6083.    For the development of Barfly the following programs were used:
  6084.  
  6085.    * [CATS] Developer CD V2.0
  6086.  
  6087.    * [B.Hawes] WShell V2.0
  6088.  
  6089.    * [M.Sinz] Enforcer
  6090.  
  6091.    * [R.Schmidt] CyberGuard
  6092.  
  6093.    * [C.Scheppner] Mungwall
  6094.  
  6095.    * [SAS Institute] SAS/C
  6096.  
  6097.    * [GNU] GCC
  6098.  
  6099.    * [ASDG] CED
  6100.  
  6101.    * [Georg Hessmann] PasTex
  6102.  
  6103.    * [Stefan Stuntz] MFR 2.0d
  6104.  
  6105.    * [Mathias Scheler] Filer
  6106.  
  6107.    * [Matthew Dillon] DNet
  6108.  
  6109.    * [Brian Cerveny] Grapevine
  6110.  
  6111.    * [Ezy] MLink
  6112.  
  6113. Assembler Addressmodes
  6114. **********************
  6115.  
  6116.      +--------------+------------------------+
  6117.      |   Notation   | Description            |
  6118.      +--------------+------------------------+
  6119.      +--------------+------------------------+
  6120.      |      EA      | Effective Address      |
  6121.      |      Dn      | D0...D7                |
  6122.      |      An      | A0...A7                |
  6123.      |      Xn      | D0...D7, A0...A7       |
  6124.      |      .b      | Operand Width  8Bit    |
  6125.      |      .w      | Operand Width 16Bit    |
  6126.      |      .l      | Operand Width 32Bit    |
  6127.      |     size     | w,l                    |
  6128.      |     Size     | b,w,l                  |
  6129.      |     Scale    | 1,2,4 or 8             |
  6130.      | Xn.size*Scale| 68000-10 only Scale 1. |
  6131.      +---------------------------------------+
  6132.  
  6133. `Data register direct'
  6134.      Syntax: Dn
  6135.  
  6136. `Address register direct'
  6137.      Syntax: An
  6138.  
  6139. `Address register indirect'
  6140.      Syntax: (An)
  6141.  
  6142. `Address register indirect with postincrement'
  6143.      Syntax: (An)+
  6144.  
  6145. `Address register indirect with predecrement'
  6146.      Syntax: -(An)
  6147.  
  6148. `Address register indirect with offset'
  6149.      Syntax: bd.w(An)
  6150.  
  6151. `Address register indirect with index and offset'
  6152.      Syntax: bd.b(An,Xn{.Size*Scale})
  6153.  
  6154. `Address register indirect with index and offset'
  6155.      Syntax: (bd,An,Xn{.Size*Scale})
  6156.  
  6157. `Address register indirect with index and offset'
  6158.      Syntax: (bd.b,An,Xn{.Size*Scale})
  6159.  
  6160. `Address register indirect with index and base displacement'
  6161.      Syntax: ({bd.size{,An{,Xn{.Size{*Scale}}}}})
  6162.  
  6163. `Indirect Memory Addressierung mit postindex'
  6164.      Syntax: ({[{bd.size{,An}}]}{Xn{.Size{*Scale}{,od.size}}})
  6165.  
  6166. `Indirect Memory Addressierung mit preindex'
  6167.      Syntax: ({[{bd.size{,An}}{,Xn{.Size{*Scale}]}{,od.size}}})
  6168.  
  6169. `PC Indirect'
  6170.      Syntax: (PC)
  6171.  
  6172. `PC Indirect with offset'
  6173.      Syntax: bd.w(PC)
  6174.  
  6175. `PC Indirect with index and offset'
  6176.      Syntax: bd.b(PC,Xn{.Size*Scale})
  6177.  
  6178. `PC Indirect with index and offset'
  6179.      Syntax: bd.b(ZPC,Xn{.Size*Scale})
  6180.  
  6181. `PC Indirect with index and base displacement'
  6182.      Syntax: ({bd.size{,PC{,Xn{.Size{*Scale}}}}})
  6183.  
  6184. `PC Indirect with index and base displacement'
  6185.      Syntax: ({bd.size{,ZPC{,Xn{.Size{*Scale}}}}})
  6186.  
  6187. `PC Indirect memory Addressing with post-index'
  6188.      Syntax: ({[{bd.size{,PC}}]}{,Xn{.Size{*Scale}{,od.size}}})
  6189.  
  6190. `PC Indirect memory Addressing with post-index'
  6191.      Syntax: ({[{bd.size{,ZPC}}]}{,Xn{.Size{*Scale}{,od.size}}})
  6192.  
  6193. `PC Indirect memory Addressing with pre-index'
  6194.      Syntax: ({[{bd.size{,PC}}{,Xn{.Size{*Scale}]}{,od.size}}})
  6195.  
  6196. `PC Indirect memory addressing with pre-index'
  6197.      Syntax: ({[{bd.size{,ZPC}}{,Xn{.Size{*Scale}]}{,od.size}}})
  6198.  
  6199. `Absolut short'
  6200.      Syntax: bd.w
  6201.  
  6202. `Absolut long'
  6203.      Syntax: bd[.l]
  6204.  
  6205. `Immediate Data'
  6206.      Syntax: #xxx
  6207.  
  6208. Addressmode Examples
  6209. ====================
  6210.  
  6211.    To avoid some problems here are some small examples how addressmode
  6212. have to build up.
  6213.  
  6214.  
  6215.      x=$40
  6216.      y=$400
  6217.        move.b (x,A0,D2.W),D0
  6218.        move.b x(A0,D2.W),D0
  6219.      
  6220.      ;Both lines are correct
  6221.      ;(x,a0,d2.w) is optimized internal to (x,a0,d2.w).
  6222.      ;For more information please check the chapter about
  6223.      ;Optimizing Direct Addressmodes.
  6224.      
  6225.        move.b (y,A0,D2.W),D0
  6226.        move.b y(A0,D2.W),D0
  6227.      
  6228.      ;Now you get 2 errors, because y is not an 8bit word.
  6229.      ;These 2 lines shows the correct version.
  6230.      
  6231.        move.b (y.w,A0,D2.W),D0
  6232.        move.b (y.w,A0,D2.W),D0
  6233.      
  6234.      ;or
  6235.      
  6236.        move.b (y.l,A0,D2.W),D0
  6237.        move.b (y.l,A0,D2.W),D0
  6238.  
  6239. 680xx Opcode Overview
  6240. *********************
  6241.  
  6242.      +----------+---------+-------------------------------------------+
  6243.      |  Opcode  |  Size   | 68000 68010 68020 68030 68040 68060 6888x |
  6244.      +----------+---------+-------------------------------------------+
  6245.      +----------+---------+-------------------------------------------+
  6246.      | abcd     | b       |   x     x     x     x     x     x         |
  6247.      | add      | b,w,l   |   x     x     x     x     x     x         |
  6248.      | addq     | b,w,l   |   x     x     x     x     x     x         |
  6249.      | adda     | w,l     |   x     x     x     x     x     x         |
  6250.      | addi     | b,w,l   |   x     x     x     x     x     x         |
  6251.      | addx     | b,w,l   |   x     x     x     x     x     x         |
  6252.      | and      | b,w,l   |   x     x     x     x     x     x         |
  6253.      | andi     | b,w,l   |   x     x     x     x     x     x         |
  6254.      | asr      | b,w,l   |   x     x     x     x     x     x         |
  6255.      | asl      | b,w,l   |   x     x     x     x     x     x         |
  6256.      | bcc      | b,w,l   |   x     x     x     x     x     x         |
  6257.      | bchg     | b,l     |   x     x     x     x     x     x         |
  6258.      | bclr     | b,l     |   x     x     x     x     x     x         |
  6259.      | bfchg    | unsized |               x     x     x     x         |
  6260.      | bfclr    | unsized |               x     x     x     x         |
  6261.      | bfext    | unsized |               x     x     x     x         |
  6262.      | bfffo    | unsized |               x     x     x     x         |
  6263.      | bfins    | unsized |               x     x     x     x         |
  6264.      | bfset    | unsized |               x     x     x     x         |
  6265.      | bftst    | unsized |               x     x     x     x         |
  6266.      | bkpt     | unsized |         x     x     x     x     x         |
  6267.      | bset     | b,l     |   x     x     x     x     x     x         |
  6268.      | btst     | b,l     |   x     x     x     x     x     x         |
  6269.      | callm    | unsized |               x                           |
  6270.      | cas      | b,w,l   |   x     x     x     x     x     x,2       |
  6271.      | cas2     | b,w,l   |   x     x     x     x     x     x,2       |
  6272.      | chk      | b,w,l   |   x     x     x     x     x     x         |
  6273.      | chk2     | b,w,l   |               x     x     x     2         |
  6274.      | cinv¹    | unsized |                           x     x         |
  6275.      | clr      | b,w,l   |   x     x     x     x     x     x         |
  6276.      | cmp      | b,w,l   |   x     x     x     x     x     x         |
  6277.      | cmpa     | w,l     |   x     x     x     x     x     x         |
  6278.      | cmpi     | b,w,l   |   x     x     x     x     x     x         |
  6279.      | cmpm     | b,w,l   |   x     x     x     x     x     x         |
  6280.      | cmp2     | b,w,l   |               x     x     x     2         |
  6281.      | cpush¹   | unsized |                           x     x         |
  6282.      | dbcc     | w       |   x     x     x     x     x     x         |
  6283.      | divs     | w,l     |   x     x     x     x     x     x,2       |
  6284.      | divsl    | l       |               x     x     x     x         |
  6285.      | divu     | w,l     |   x     x     x     x     x     x,2       |
  6286.      | divul    | l       |               x     x     x     x         |
  6287.      | eor      | b,w,l   |   x     x     x     x     x     x         |
  6288.      | eori     | b,w,l   |   x     x     x     x     x     x         |
  6289.      | eori/ccr | b       |   x     x     x     x     x     x         |
  6290.      | eori/sr¹ | w       |   x     x     x     x     x     x         |
  6291.      | exg      | l       |   x     x     x     x     x     x         |
  6292.      | ext      | w,l     |   x     x     x     x     x     x         |
  6293.      | extb     | l       |               x     x     x     x         |
  6294.      | fabs     |         |                           x     x     x   |
  6295.      | fsabs    |         |                           x     x         |
  6296.      | fdabs    |         |                           x     x         |
  6297.      | facos    |         |                           2     2     x   |
  6298.      | fadd     |         |                           x     x     x   |
  6299.      | fsadd    |         |                           x     x         |
  6300.      | fdadd    |         |                           x     x         |
  6301.      | fasin    |         |                           2     2     x   |
  6302.      | fatan    |         |                           2     2     x   |
  6303.      | fatanh   |         |                           2     2     x   |
  6304.      | fbcc     |         |                           x     x     x   |
  6305.      | fcmp     |         |                           x     x     x   |
  6306.      | fcos     |         |                           2     2     x   |
  6307.      | fcosh    |         |                           2     2     x   |
  6308.      | fdbcc    |         |                           x     2     x   |
  6309.      | fdiv     |         |                           x     x     x   |
  6310.      | fsdiv    |         |                           x     x         |
  6311.      | fddiv    |         |                           x     x         |
  6312.      | fetox    |         |                           2     2     x   |
  6313.      | fetoxm1  |         |                           2     2     x   |
  6314.      | fgetexp  |         |                           2     2     x   |
  6315.      | fgetman  |         |                           2     2     x   |
  6316.      | fint     |         |                           2     x     x   |
  6317.      | fintrz   |         |                           2     x     x   |
  6318.      | flogn    |         |                           2     2     x   |
  6319.      | flognp1  |         |                           2     2     x   |
  6320.      | flog2    |         |                           2     2     x   |
  6321.      | flog10   |         |                           2     2     x   |
  6322.      | fmod     |         |                           2     2     x   |
  6323.      | fmove    |         |                           x     x     x   |
  6324.      | fsmove   |         |                           x     x         |
  6325.      | fdmove   |         |                           x     x         |
  6326.      | fmovecr  |         |                           2     2     x   |
  6327.      | fmovem   |         |                           x     x,2   x   |
  6328.      | fmul     |         |                           x     x     x   |
  6329.      | fsmul    |         |                           x     x         |
  6330.      | fdmul    |         |                           x     x         |
  6331.      | fneg     |         |                           x     x     x   |
  6332.      | fsneg    |         |                           x     x         |
  6333.      | fdneg    |         |                           x     x         |
  6334.      | fnop     |         |                           x     x     x   |
  6335.      | frem     |         |                           2     2     x   |
  6336.      | frestore¹|         |                           x     x     x   |
  6337.      | fscc     |         |                           2     2     x   |
  6338.      | fsub     |         |                           x     x     x   |
  6339.      | fssub    |         |                           x     x         |
  6340.      | fdsub    |         |                           x     x         |
  6341.      | fsave¹   |         |                           x     x     x   |
  6342.      | fscale   |         |                           2     2     x   |
  6343.      | fsglmul  |         |                           2     2     x   |
  6344.      | fsgldiv  |         |                           2     2     x   |
  6345.      | fsin     |         |                           2     2     x   |
  6346.      | fsinh    |         |                           2     2     x   |
  6347.      | fsincos  |         |                           2     2     x   |
  6348.      | fsqrt    |         |                           x     x     x   |
  6349.      | fssqrt   |         |                           x     x         |
  6350.      | fdsqrt   |         |                           x     x         |
  6351.      | ftan     |         |                           2     2     x   |
  6352.      | ftanh    |         |                           2     2     x   |
  6353.      | ftentox  |         |                           2     2     x   |
  6354.      | ftrap    |         |                           x     2     x   |
  6355.      | ftst     |         |                           x     x     x   |
  6356.      | ftwotox  |         |                           2     2     x   |
  6357.      | illegal  | unsized |   x     x     x     x     x     x         |
  6358.      | jmp      | unsized |   x     x     x     x     x     x         |
  6359.      | jsr      | unsized |   x     x     x     x     x     x         |
  6360.      | lea      | l       |   x     x     x     x     x     x         |
  6361.      | link     | w,l     |   x     x     x     x     x     x         |
  6362.      | lpstop   |         |                                 x         |
  6363.      | lsl      | b,w,l   |   x     x     x     x     x     x         |
  6364.      | lsr      | b,w,l   |   x     x     x     x     x     x         |
  6365.      | move     | b,w,l   |   x     x     x     x     x     x         |
  6366.      | movea    | w,l     |   x     x     x     x     x     x         |
  6367.      | moveq    | l       |   x     x     x     x     x     x         |
  6368.      | movec¹   | l       |         x     x     x     x     x         |
  6369.      | movem    | w,l     |   x     x     x     x     x     x         |
  6370.      | movep    | w,l     |   x     x     x     x     x               |
  6371.      | moves¹   | b,w,l   |         x     x     x     x     x         |
  6372.      | move16   |         |                           x     x         |
  6373.      | muls     | w,l     |   x     x     x     x     x     x         |
  6374.      | mulu     | w,l     |   x     x     x     x     x     x         |
  6375.      | nbcd     | b       |   x     x     x     x     x     x         |
  6376.      | neg      | b,w,l   |   x     x     x     x     x     x         |
  6377.      | negx     | b,w,l   |   x     x     x     x     x     x         |
  6378.      | nop      | unsized |   x     x     x     x     x     x         |
  6379.      | not      | b,w,l   |   x     x     x     x     x     x         |
  6380.      | or       | b,w,l   |   x     x     x     x     x     x         |
  6381.      | ori      | b,w,l   |   x     x     x     x     x     x         |
  6382.      | pack     | unsized |               x     x     x     x         |
  6383.      | pea      | l       |   x     x     x     x     x     x         |
  6384.      | pflush¹  | unsized |                     x     x     x         |
  6385.      | pflusha¹ | unsized |                     x                     |
  6386.      | plpa¹    | unsized |                                 x         |
  6387.      | pload¹   | unsized |                     x                     |
  6388.      | pmove¹   | w,l,q   |                     x                     |
  6389.      | ptest¹   | unsized |                     x     x               |
  6390.      | reset¹   | unsized |   x     x     x     x     x     x         |
  6391.      | rol      | b,w,l   |   x     x     x     x     x     x         |
  6392.      | ror      | b,w,l   |   x     x     x     x     x     x         |
  6393.      | roxl     | b,w,l   |   x     x     x     x     x     x         |
  6394.      | roxr     | b,w,l   |   x     x     x     x     x     x         |
  6395.      | rtd      | unsized |         x     x     x     x     x         |
  6396.      | rte¹     | unsized |   x     x     x     x     x     x         |
  6397.      | rtr      | unsized |   x     x     x     x     x     x         |
  6398.      | rts      | unsized |   x     x     x     x     x     x         |
  6399.      | rtm      | unsized |               x                           |
  6400.      | sbcd     | b       |   x     x     x     x     x     x         |
  6401.      | scc      | b       |   x     x     x     x     x     x         |
  6402.      | stop¹    | unsized |   x     x     x     x     x     x         |
  6403.      | sub      | b,w,l   |   x     x     x     x     x     x         |
  6404.      | subq     | b,w,l   |   x     x     x     x     x     x         |
  6405.      | suba     | w,l     |   x     x     x     x     x     x         |
  6406.      | subi     | b,w,l   |   x     x     x     x     x     x         |
  6407.      | subx     | b,w,l   |   x     x     x     x     x     x         |
  6408.      | swap     | w       |   x     x     x     x     x     x         |
  6409.      | tas      | b       |   x     x     x     x     x     x         |
  6410.      | trap     | unsized |   x     x     x     x     x     x         |
  6411.      | trapcc   | ? ,w,l  |               x     x     x     x         |
  6412.      | trapv    | unsized |   x     x     x     x     x     x         |
  6413.      | tst      | b,w,l   |   x     x     x     x     x     x         |
  6414.      | unlk     | unsized |   x     x     x     x     x     x         |
  6415.      | unpk     | unsized |               x     x     x     x         |
  6416.      +----------+---------+-------------------------------------------+
  6417.      
  6418.      ¹ Supervisor instruction
  6419.      2 These are software-supported instructions on the 68040 and 68060
  6420.  
  6421.