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