\input texinfo
@c -*-texinfo-*-
@setfilename Barfly.guide
@settitle Barfly 1.0 - Documentation
@setchapternewpage on
@set edition 1.0
@set update-date 24 June 1994
@set update-month June 1994
@ifinfo
This file documents Barfly, a development system for AmigaOS V2.04 or newer.
@end ifinfo
@titlepage
@title{Documentation for Barfly}
@subtitle{}
@author Ralph Schmidt
Kleiner Hellweg 4
D-33154 Salzkotten
Germany
Internet: laire@uni-paderborn.de
IRC: laire
@subtitle{}
@subtitle{Version 1.0}
@end titlepage
@finalout
@node Top, Top, Top
@top
@center Barfly 1.0
@center An Intuition controlled Debugger and Optimizing Assembler
@center Copyright (c) 1989-94 Ralph Schmidt
@center - Shareware -
@menu
Chapters for @samp{all} users@dots{}
* Copyright:BI_CRIGHT. Your rights.
* Registration:BI_REG. How to become a registered user.
Introduction@dots{}
* Purpose:IN_PURPOSE. What is Barfly made for?
* System requirements:IN_SYSR. Which computer can run Barfly?
* Installation:IN_INST. How to install Barfly.
Using BDebug@dots{}
* The Debugger:BDebugTop. Debugger Documentation
Using BAsm@dots{}
* The Assembler:BAsmTop. Assembler Documentation
Includes & Linker@dots{}
* Additional SW:ASoft. Where to get the include and Linker
Other topics@dots{}
* Updates:OT_UPD. How to get updates.
* Support:OT_SUP. How to reach the author.
* History:OT_HIST. History of Barfly.
* Future:OT_FUT. Future of Barfly.
* Acknowledgements:OT_ACK. The author wishes to thank@dots{}
@end menu
@node BI_CRIGHT, BI_REG, BI_REG, Top
@chapter Basic Informations
@section Copyright and other legal stuff
Copyright (c) 1989-94 Ralph Schmidt
Permission is granted to make and distribute verbatim copies of this manual
provided the copyright notice and this permission notice are preserved on all
copies.
No guarantee of any kind is given that the programs described in this document
are 100% reliable. You are using this material at your own risk. The author
@strong{can not} be made responsible for any damage which is caused by using
these programs.
Permission is granted to include this package in Public-Domain collections,
especially in Fred Fishs Amiga Disk Library (including CD-ROM versions of it).
The distribution file may be uploaded to Bulletin Board Systems or FTP
servers. If you want to distribute this program you @strong{must} use the
original distribution archive @samp{Barfly.lha}.
@strong{None} of the programs may be included or used in commercial programs
unless by written permission from the author.
@strong{None} of the programs may be modified in any way. This especially
includes changing the copyright notices or removing any of the Shareware
restrictions.
@strong{None} of the programs may be used on any machine which is used for the
research, development, construction, testing or production of weapons or other
military applications. This also includes any machine which is used for
training persons for @strong{any} of the above mentioned purposes.
@strong{None} of the programs may be used by more than the registrated
owner.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node BI_REG, BI_CRIGHT, BI_CRIGHT, Top
@section Registration
As you may have noticed in the copyright I'm working for five years at
Barfly. It has always consumed and will continue to consume a large amount
of my time.
I cannot afford just working for fun. Thus, I decided to release Barfly as
Shareware. I already tried to release Barfly as a commercial product but the
story behind it is more than sad. To sum it@dots{}german Amiga software
companys aren't worth any time...@samp{they suck}.
Some people may think the price is too high for a Shareware product but
i think that BAsm is as powerful as the 2 main available commercial
Assemblers@dots{}if not more powerful if you compare the speed and the
optimize functions;there's no commercial Debugger available that can
compete with BDebug.
I've used Barfly myself for commercial Amiga applications.
Z3-Fastlane device,CDRive,SCSIConfig,...
The unregistered version of Barfly pops up the About requester at the start
and has some functions disabled:
@example
Assembler:
o only 8192Bytes large code possible
o the Section commands aren't available
Debugger:
o Only 1 Window per Object
o Enforcer Catch not available
o Task Catch not available
o Crashed Task Catch not available
o Limited Step count(about 150-200 Steps)
@end example
Registered users will be shipped a disk with the newest public release of
Barfly, along with a personalized, so-called ``keyfile''. It enables all the
missing features and disables the Shareware reminders. This keyfile will
work with all future releases of Barfly, so you can simply download the
latest version from your local bulletin board without having to wait weeks
for your update passing through the slow mail channels. The keyfile
@samp{must not} be distributed in any way.
@noindent
The fee for a Barfly registration is
@example
70.- DM (D-Mark),
70.- SFr (Schweizer Franken),
230.- FF (French Francs),
50.- US$ (US Dollar)
@end example
The fastest, cheapest and easiest way to register is put the money together
with the filled registration form into a letter and send it to
Please allow 2-5 weeks delivery for the registrated version.
@example
Ralph Schmidt
Kleiner Hellweg 4
33154 Salzkotten
FR Germany
@end example
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node IN_PURPOSE, IN_SYSR, Top, Top
@chapter Introduction
@section Purpose
BDebug is an Intuition controlled multi-task system Debugger for
OS 2.04 and newer.
You can use BDebug to debugging your programs, catching tasks,
reseach enforcer hits, follow Source-Level Informations and other
advanced functions.
The Debugger supports assemblers,SAS C,Dice and GCC.
@noindent
Some of BDebug's features are:
@itemize
@item font-sensitive, resizable and Style Guide compliant GadTools GUI
@item Object-Oriented that results in a low learning curve
@item Supports 68000@dots{}68040 and the FPUs
@item Can debug multiple tasks at the same time
@item Not limited by the amount of window objects.
@item highly configurable
@item keyboard support
@end itemize
BAsm is a very fast optimizing Assembler for OS 2.04 and newer.
@noindent
Some of BDebug's features are:
@itemize
@item 68000-68060,6888x
@item Very Fast
@item Include and Incbin Cache
@item Strong Optimizer with Multi-Pass Optimizing
@item High Level Macros
@item ARexx
@item Supports OS 2.04 and OS 3.0 Hunks
@item SAS D1 Source Level Format
@end itemize
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node IN_SYSR, IN_INST, IN_PURPOSE, Top
@section System requirements
Barfly requires Amiga operating system version 2.04 or better.
Kickstart 1.3 is @emph{not} supported; this operating system is considered
obsolete.
Barfly requires at least one megabyte of RAM to run because.
A hardisk or a faster CPU is not required but increase performances
and comfort, of course.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node IN_INST, , IN_SYSR, Top
@section Installation
It is really easy to install Barfly:
1. Copy the the binary and the icon (called ``BDebug'' and ``BDebug.info'')
to any directory.
2. Copy the the binary and the icon (called ``BAsm'' and ``BAsm.info'')
to any directory.
Then copy the supplied configuration files from ``s/Barfly/#?'' to ``S:''
directory of your system partition or create env:Barflypath.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node OT_UPD, OT_SUP, OT_ACK, Top
@chapter Other topics
@section Updates
Whenever a new release of Barfly gets released, I will post some
information in the appropriate newsgroups of some electronic
networks. The new archive will soon be available on many
bulletin boards and on all @samp{AmiNet} FTP servers. Major
releases will also come with some PD disks, especially on
Fred Fish's collection.
As mentioned above, registered users will neither need a new keyfile nor
a special personalized program version. They can use all new features
immediately.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node OT_SUP, OT_HIST, OT_UPD, Top
@section Support
If you have some questions, comments, suggestions or even flames, please feel
free to contact me at one of the following addresses. If you send your letter
via e-mail, there's a good chance for getting a quick reply.
@example
Snailmail: Ralph Schmidt
Kleiner Hellweg 4
33154 Salzktten
FR Germany
Phone: +49-5258-5637
E-Mail: laire@@uni-paderborn.de
Irc: Laire on #amiga,#amigager
@end example
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node OT_HIST, OT_FUT, OT_SUP, Top
@section History
@itemize
@item 0.0 - 1.0 @*
not released
@end itemize
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node OT_FUT, OT_ACK, OT_HIST, Top
@section Future
@noindent
Here are some ideas for future versions of BDebug:
@itemize
@item Full Source Level support for GCC and perhaps SAS.
@item Better BDebug Arexx support...the current one is a bad excuse.
@item Mungwall Trace methods.
@item Automatic Refresh of some Windows(Task Window...)
@item Amigaguide file mode in the autodocs functions.
@item Highlight changed registers
@item Better documentation.
@item BAsmOption for the easy BAsm options configuration.
@item Other things i'm too lazy to mention now.
@end itemize
@noindent
Important:
@example
There is absolutely NO guarantee that these features will ever be
implemented. So don't be disappointed, if they aren't in the next
version.
@end example
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node OT_ACK, OT_UPD, OT_FUT, Top
@section Acknowledegments
@noindent
Thanks must go to:
@itemize @minus
@item Dirk Leschner, Frank Jakobs
for being my best friends
@item Matthias Scheler
for his manual design and Filer.
@item S.Schaem, Børge Nøst, Alexis Wilke, Michael B. Smith, Marc Heuler
for their superb betatesting efforts
@item Mike Schwartz
for a lot suggestions to improve basm. Sad he has left the Amiga
community 2 years ago.
@item Stefan Becker
for Toolmanager and being a nice guy.
@item Christoph Wolf
for DynamiCache and being a nice guy.
@item Brian Cerveny(Redwine)
for Grapevine and being a nice guy(Really ?).
@item All my IRC friends.
for many great hours. Thanks!
Andrew Denton(Guardian), Kenneth Dyke(Nyx), Bill Coldwell(Cryo), Brian
Cerveny(Redwine), Joseph Hillenburg(xterm), Scott Ellis(ScottE), Chris
Wichura(Caw), John Wiederhirn(John\_W), Mike Schwartz(mykes), Markus
Illenseer(ill), Petra Zeidler(stargazer), Michael van Elst(mlelstv),
Holger Lubitz(holgi), Ralph Babel(rbabel), Seth Harman(Budha) and a
lot guys i haven't mentioned here.
@item Chris Schneider and Urban D. Mueller
for some suggestions 2-3 years ago and installing Aminet.
@item Michael ``billy'' Böhnisch
for his cleanup on MakeBarflyFD 2-3 years ago.
@item Steve Wright
for designing the icons 2 years ago.
@end itemize
@noindent
And of course to all the other Beta testers and registered users.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node ASoft, BDebugTop, BAsmTop,top
The V40 Includes can be ftp'ed from the FTP-Server.
ftp.rz.uni-wuerzburg.de: pub/amiga/frozenfish/bbs/com
A superb Linker "lk" by Alex Wilke should be soon availble on Aminet.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node BDebugTop, BAsmTop, ASoft,top
@center BDebug 1.0
@center An Intuition controlled Debugger
@center Copyright (c) 1989-94 Ralph Schmidt
@center - Shareware -
@menu
Using BDebug@dots{}
* Command Window:UB_COMW. Debug Methods
* Register Window:UB_REGW. Register Window Object
* FPU Window:UB_FPUW. FPU Window Object
* Disassembler Window:UB_DISSW. Disassembler Window Object
* Memory Window:UB_MEMW. Memory Window Object
* Copper Window:UB_COPPW. Copper Window Object
* Struct Window:UB_STRUCTW. Struct Window Object
* Source Window:UB_SOURCEW. Source Window Object
* Snoop Window:UB_SNOOPW. Snoop Window Object
* Breakpoint Window:UB_BREAKW. Breakpoint Manager Window Object
* Watchpoint Window:UB_WATCHW. Watchpoint Manager Window Object
* Checksum Window:UB_CHECKW. Checksum Manager Window Object
* Arguments:UB_ARGUMENTS. Requester Arguments
* Technicals:UB_TECHINFOS. Technical Details
* Configurations:UB_CONFIG. Configuration Details
* Arexx:UB_AREXX. Arexx
* Problem Analysis:UB_HOWTOUSE. Problem Analysis
@end menu
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node UB_COMW, UB_REGW, , BDebugTop
@chapter Usage of BDebug
@section The Command Window
@section Debugger Philosophy
BDebug is a multitasking debugger that supports the Motorola
processors 68000@dots{}68040 and 68881@dots{}68882.
The debugger allows to debug unlimited tasks parallel.
Because of the debugger's complexity BDebug was
designed in an object-oriented way to allow an easy and
comfortable way to use it.
The register window @samp{REGWindow} is the Root class of
the task object that can be expanded by several subclass
windows.
Every subclass window has privat menus and inherits the
public menus of its father object.
@section Debug Methoden
The debugger offers a variety of different Debug methods that
can be activated by menu or gadget.
@subsubsection Debug Task
is used to select a task you wanna debug. If you doubleclick on
a task a @samp{REGWindow} and the configurated amount of other
information windows are opened.
After the task could be stopped the contents of the @samp{REGWindow}
and all other information windows gets refreshed.
If the task is in the @samp{Wait} state the task is stopped when
it gets a signal.
@center Task Listview Layout
@center
@center Taskaddress & Priority & Status & [!]Name
@center
@center A process is marked by @samp{!} at the beginning of the name.
You should know what task you can stop and what kind of task should
never be stopped. For example the Input.device should never be stopped.
@subsubsection Debug File
is used to load and stop a program.
This function is equal to the bdebug cli startup with the
exception that you can enter the parameter in a requester.
If no error occur all configurated windows are opened
and the PC stops at the defined programstart breakpoint
that normally points to the first command of the program.
@subsubsection Debug Next Task
is used to debug the next task that is opened.
The debugger waits until another task is created by AddTask and
then all configurated windows are opened.
After the new task was caught the pc points to the beginning of
the task and @samp{Catch Next Task} is disactivated.
To catch a program that is started from the WV you have to use
@samp{Debug Next Task} to catch the WB Startup Task @samp{WBL}
that starts the program.
Now you have to activate @samp{Debug Next Task} again and let
the current task run.
After a short time the task @samp{WBL} ends and the program's
task is caught.
@quotation
You should avoid to start a new task between the 2 @samp{Debug Next Task}
phases because it's easy to catch the wrong one.
@end quotation
@quotation
You should notice that @samp{AddTask} is patched and points to a new
routine. Thus you should be careful with programs that also patch
@samp{AddTask}. Furthermore it's useful know in what sequences these
patches have to be removed.
The Debugger can only be closed when all patched system function
that were installed after the Debugger was started are removed.
@end quotation
@quotation
If you start a program in the shell without @samp{c:Run} no new
task is created. Instead the program is run as a subroutine
in shell's task so you can't catch the task that easy.
@end quotation
@subsubsection Debug Crashed Task
is used to catch tasks that crash so you track down the bug location
a lot easier. If the system itself doesn't run anymore you shouldn't
expect that bdebug still runs because it depends on a working system.
If a task crashes and the option @samp{Debug Crashed Task} is activated
all configurated windows are opened instead of the usual
@samp{Task Held Requester}.
@subsubsection Catch Enforcer Hit
is used to tell the debugger to stop the task it controlls when
an enforcer hit happens.
Unfortunately the debugger can't stop the task at exactly the
same location where the hit happened.
Mostly the hit command is 1-2 instructions above the stopped
task's PC.
This function needs Enforcer V37.x by M. Sinz and it must be
installed before BDebug is started. Please read the documentation.
@section How to start ?
If you only want to debug a program you have to start bdebug
with the program's name and parameters or by using @samp{Debug Program}
in the command window.
Another method is to move a program's icon on the command window
or specify BDebug as in the icon as the @samp{DefaultTool}.
@samp{Name:}
@quotation
BDEBUG - The CLI Startup
@end quotation
@samp{Synopnis:}
@quotation
BDEBUG [?] [<Program> [Argument] ]
@end quotation
@samp{Function:}
@quotation
BDebug activates the debugger, loads and stops the optional
entered program. If it can find a local config file with
the suffix *.bdebug it loads it.
@end quotation
@samp{Inputs}
@quotation
@itemize
@item ? shows an information message
@item program name
@item argument line of the program. If there are spaces
in parameters you have to enclose the argument with
@samp{""}.
@end itemize
@end quotation
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node UB_REGW, UB_FPUW, UB_COMW, BDebugTop
@chapter Usage of BDebug
@section The Register Window
@menu
* The Register Window:REGW_Window. The Register Window
* Local Menus:REGW_LocalMenus. Local Menus
* Public Menus:REGW_PublicMenus. Public Menus
@end menu
@node REGW_Window, REGW_LocalMenus, , UB_REGW
@subsection Register Window
The register window is the most important control layer of the Debugger
and every debugged task has one.
You can link unlimited other information windows to the @samp{REGWindow}
or you can tell the debugger to give up controlling the task.
In the title line of the window you can see the ID number of the task,
so you can recognize what information window belongs to this task.
Furthermore the title line also contain the task address,the state,
@samp{RUN},@samp{WAIT} or @samp{STOP} and the name of the task.
The task is in the @samp{RUN} state if the task has the controll at the
moment instead of the traphandler; the task is in the @samp{STOP} state
when the task waits and the traphandler controlls what happens.
The task is the @samp{WAIT} state only when the debugger has to wait
to catch a task by a @samp{Debug Task}.
In the upper area of the window you see the normal data and address
registers where the address register also have additional information
fields.
To change a register or to watch memory where the register points to
you only need to doubleclick on the register or on the register's
memory contents.
Furthermore you may change other usermode registers by this method.
Supervisor register can't be changed because that makes not much
sense for a system debugger.
@center @samp{68000 Registers}
@center D0=xxxxxxxx yyyy A0=xxxxxxxx Arg1 Arg2 [!]
@center D1=xxxxxxxx yyyy A1=xxxxxxxx Arg1 Arg2 [!]
@center D2=xxxxxxxx yyyy A2=xxxxxxxx Arg1 Arg2 [!]
@center D3=xxxxxxxx yyyy A3=xxxxxxxx Arg1 Arg2 [!]
@center D4=xxxxxxxx yyyy A4=xxxxxxxx Arg1 Arg2 [!]
@center D5=xxxxxxxx yyyy A5=xxxxxxxx Arg1 Arg2 [!]
@center D6=xxxxxxxx yyyy A6=xxxxxxxx Arg1 Arg2 [!]
@center D7=xxxxxxxx yyyy A7=xxxxxxxx Arg1 Arg2 [!]
@center USP=xxxxxxxx SSP=xxxxxxxx PC=xxxxxxxx SR=xxxx
@itemize
@item [!] shows if the address register points on an odd address.
@item if the address register points on an illegal memory area
the char @samp{*} is shown in Arg1 and Arg2 to avoid
crashes by reading non readable io-addresses.
You can config the readable memory areas.
@item if the address register points on the following system
structures the name of the Node is shown in Arg1 and
the Name of the structure in Arg2.
@itemize
@item Library
@item Device
@item Port
@item Task
@item Resource
@item MemHead
@end itemize
@item if the address register points to the custom chip area
the name of the register is shown in Arg1 and the
ID-Word CUSTOM is shown in Arg2.
Custom register map is $dff000-$dff200.
@item if the address register points to a symbol the symbol
and the contents is shown.
@item Otherwise 8Bytes of the memory are shown where the
register points to.
The 8 Bytes are shown hexadecimal in Arg1 and ascii
in Arg2.
@end itemize
@center @samp{68010 Registers}
@center VBR=xxxxxxxx SFC=xxxxxxxx DFC=xxxxxxxx
@center @samp{68020 Registers}
@center VBR=xxxxxxxx SFC=xxxxxxxx DFC=xxxxxxxx
@center MSP=xxxxxxxx ISP=xxxxxxxx CACR=xxxxxxxx CAAR=xxxxxxxx
@center @samp{68030 Registers}
@center VBR=xxxxxxxx SFC=xxxxxxxx DFC=xxxxxxxx
@center MSP=xxxxxxxx ISP=xxxxxxxx CACR=xxxxxxxx CAAR=xxxxxxxx
@center CRP=xxxxxxxxxxxxxxxx SRP=xxxxxxxxxxxxxxxx
@center TT0=xxxxxxxx TT1=xxxxxxxx TC=xxxx PSR=xxxxxxxx
@center @samp{68040 Registers}
@center VBR=xxxxxxxx SFC=xxxxxxxx DFC=xxxxxxxx
@center MSP=xxxxxxxx ISP=xxxxxxxx CACR=xxxxxxxx
@center URP=xxxxxxxx SRP=xxxxxxxx TC=xxxx PSR=xxxxxxxx
@center ITT0=xxxxxxxx ITT1=xxxxxxxx DTT0=xxxxxxxx DTT1=xxxxxxxx
@center @samp{68060 Registers}
@center VBR=xxxxxxxx SFC=xxxxxxxx DFC=xxxxxxxx
@center CACR=xxxxxxxx PCR=xxxxxxxx BUSCR=xxxxxxxx
@center URP=xxxxxxxx SRP=xxxxxxxx TC=xxxx PSR=xxxxxxxx
@center ITT0=xxxxxxxx ITT1=xxxxxxxx DTT0=xxxxxxxx DTT1=xxxxxxxx
@center Type Information
@center xxxxxxxx [Symbol] Mnemonic operand1[,@dots{}]]
@center (EA): [Address1=Contents]@dots{}[Address2=Contents]
@quotation
In the @samp{(EA)} line you can see the addresses and
their contents the current command accesses.
The contents of illegal addresses aren't shown.
@end quotation
@node REGW_LocalMenus, REGW_PublicMenus, REGW_Window , UB_REGW
@subsection Local Menus
@itemize
@item Close Window
closes the @samp{REGWindow}, all connected windows and
disactivates the debugger for this task.
To disactivate the debugger you have to choose if the
task should keep running so it's the task's business
to stop.
Furthermore you can end the task by runing the cleanup
routine of the task or just removing the task from the
list but this can cause sideeffects you can't always
oversee.
If the task is a process then the Remove option is equal
to the Cleanup option.
If it's only a task the Cleanup option is equal to the
Cleanup option.
Beware that the Remove option doesn't free any resources
of the task.
@quotation
You should really know what you're doing if you for example
remove a task from the system.
@end quotation
@item ZOOM Windows
expands all windows of the task.
@item Log File
activates or disactivates the loging of the register and PC changes.
@item Big View
shrinks the @samp{REGWindow} to a 68000 register layout or
expands it back to the full layout.
@item Open DissWindow
opens a DissWindow with the configured dimensions.
@item Open MemWindow
opens a MemWindow with the configured dimensions.
@item Open FPUWindow
opens a FPUWindow with the configured dimensions.
The menu is only available if a FPU is installed.
@item Open BreakWindow
opens a BreakpointWindow with the configured dimensions.
@item Open CoppWindow
opens a CoppWindow with the configured dimensions.
@item Open StructWindow
opens a StructWindow with the configured dimensions.
@item Open SnoopWindow
opens a SnoopWindow with the configured dimensions.
@item Open WatchWindow
opens a WatchpointWindow with the configured dimensions.
@item Open ChecksumWindow
opens a ChecksumWindow with the configured dimensions.
@item Save Window Settings
saves the positions and count of all window the current task
controlls.
The saved file then contains the appropriate commands you
have to enter yourself into the configuration file.
Because of the debugger's window concept it makes no sense to save
a full configurations file.
@end itemize
@node REGW_PublicMenus, , REGW_LocalMenus , UB_REGW
@subsection Public Menus
@itemize
@item Step 1
runs the current command and stops the task afterwords.
@item Step X
runs X commands and stops the task afterwards.
@item Step Debug Line
runs commands until the PC meets another source line.
If the PC is outside the program or if no debug informations
are available a single step i used.
The command enters rubroutines.
@item Trace Debug Line
is simular to @samp{Step Debug Line} with the exception that
it runs subroutines.
@item Trace over Calls
runs the current command or subroutine and stops the task
afterwards.
Depending on the configuration and the memory area a breakpoint
or single steps are used.
If a crashes happen in certain program parts you should remove
the command @samp{Tracebreak} from the configuration.
@quotation
You should avoid to use @samp{Tracebreak} in Libraries and Devices
that are located in the ram.
If another task accesses the routine at the same time you can
expect an illegal exception.
@end quotation
@quotation
Some Amiga MMU Setups don't like that programs write to
the kickstart rom. For example breakpoints.
@end quotation
@item Trace X over Calls
runs X commands or subroutines and stops the task afterwards.
Depending on the configuration and the memory area a breakpoint
or single steps are used.
@item Trace Work
is simular to the command @samp{Trace over Calls} with the exception
that all commands are run.
This function is useful to trace loops.
@example
Example:
moveq #10,d0
0$:
dbra d0,0$
@end example
@quotation
If you use the function on the command @samp{dbra} the debugger sets
a breakpoint after the dbra and runs the task. It drops back to
single step when it hits a @samp{Jmp}, @samp{bra}, @samp{rts}@dots{}.
@end quotation
@item Trace over OS-Calls
runs the current command or the OS function and stops the task
afterwards.
@item Trace on Flow
stops the task when a PC direction occurs.
This means the PC is stopped when it hits a @samp{Jsr},
@samp{Jmp}, @samp{bcc}, @samp{rts}@dots{}.
@item Trace on Adress
runs the task until the PC is equal to the entered address.
This function is not very fast because the task is running
in single step mode and after each instruction the PC is compared
with the Adress.
@item Trace out of OS
runs the task until the PC is outside of the kickstart.
This functions is useful when you catch a task inside
the OS and you wanna get as fast as possible back to
the program's code.
It works simular as @samp{Trace on Adress}.
@quotation
You shouldn't use this command if your task only runs in the
kickstart.
@end quotation
@item (PC)++
jumps over the current command.
Useful to jump over @samp{Illegal} breakpoints that you
can use for debugging purposes in your program.
@item PC-2
subtract 2 Bytes from the PC.
@item Write Nop
overwrites the current command with a @samp{Nop}.
@item Write Illegal
overwrites the current command with an @samp{Illegal}.
@item Run Task
runs the task and only stops on exceptions.
@item Run Watched Task
runs the task in trace mode and stops when a WatchPoint
condition is true.
If there are no watchpoints the command behaves like
@samp{Run Task}.
@item Run History Task
runs the task in trace mode and saves the registers each step
into the history stack.
@item Stop Task
stops the task.
@item Send Signal
sends a signal to the task.
Default Signal is CTRL-C = 12
@item Undo Level
sets the undobuffer's depth.
@item Undo
undos the last changes in the registerframe.
@item View Refresh
activates and disactivates the copperlist refresh after each
trace operation. This function is helpful if you debug programs
that install own copperlists.
@item Show (EA)
activates and disactivates the output of the address and address
contents that are access by the current assembler command.
@item Symbol
activates and disactivates the use of symbols in the @samp{REGWindow}.
@item Delete Symbols
erases all symbols of the task.
@item Copy Symbols
can copy a symbol list of the task to a different task.
This function is helpful if you a task is started from
another task and you wanna keep the symbol list.
@item Load Symbols
loads the symbols of a program where you can select an alternative
process's segmentlist for calculating the symbol and debug informations.
Normally you choose the same process but sometimes it's helpful
to select a different process.
For example if the task you debug is created in a program you
have to choose the program's task to get the correct symbol
addresses.
@item Set Hunklist
sets a new segment list for the SourceWindow and some other
hunk related functions.
Because the position in the SourceWindow depends on the segments
it's sometimes helpful if you load new symbols and debug
informations for this task.
If you load an alternative Hunklist by selecting a custom task
when you use @samp{Load Symbols} this routine is called
automaticly.
@item Reset Hunklist
removes the alternative hunklist.
@item Show Value
shows the value of an argument.
@item Show Last Exception
shows the last exception.
@item Open Task Window
opens a window to show the task structure of the task.
@item Open System Window
opens a window to show the ExecBase structure.
@item Open Proces Window
opens a window to show the process structure of the process.
@item Open CLI Window
opens a window to show the cli structure of the process.
@item Open Hunk Window
opens a window to show the hunks of the process.
@item Open Symbol Window
opens a window to show the symbols of the process.
If you doubleclick on a symbol you get the hunk
where the symbol is located.
@item Open Library Window
opens a window to show the libraries.
If you doubleclick on a library entry it opens
a @samp{FD:} window that shows all functions of
the library when the library is defined in the
@samp{Barfly.FD} file.
Furthermore if you doublelick on a function you
have the choice to see the function in a
@samp{DissWindow} or the autodocs documentation.
@item Open Device Window
opens a window to show the devices.
@item Open Resource Window
opens a window to show the resources.
@item Open Port Window
opens a window to show the public ports.
@item Open Resident Window
opens a window to show the resident modules.
@item Open Interrupt Window
opens a window to show the interrupts.
@item Open AutoDocs Window
opens a filerequester to choose the needed autodocs
information of a library.
Now a window is opened that shows all function of
the chosen autodoc file.
If you now click on a function another window is
opened that shows the function documentation.
@item Open History Window
opens a HistoryWindow that shows the last saved registerframes
of the undobuffer. The undobuffer is organized as a stack that
the first entry is the last entry in the HistoryWindow.
The HistoryWindow isn't updated automatic.
@item Stack Check
controlls the stack check. If the register A7 points out
of the stack bounds or points on an odd address a warning
is shown.
The debugger only checks the task when the task give back
the control to the traproutine, so it's not possible to
notice every stack problem.
@quotation
You should be aware that this function doesn't work with a
WShell task because the @samp{WShell} doesn't set the correct
stack task values.
@end quotation
@item Find Task of Adress
trys to find the task that belongs to the entered address.
The command checks if the address is in the task,process,cli,
mementry structure and the hunks.
It's not safe to assume that the function can check all cases.
@item Load Binary
loads a file with an optional length into a memory area.
If the debugger should allocate the memory block automaticly
you have to close the memory requester.
@item Save Binary
saves a memory area into a file.
@item Freeze Task
freezes a selectable task.
When bdebug ends the frozen tasks are warmed up again.
@item Warm up Task
warms up a frozen task.
@item Kill Task
kills a selectable task.
@quotation
You should know what task you can kill.
@end quotation
@item Show Task
shows the task structure of a selectable task.
@item Show Prozess
shows the process structure of a selectable process.
@item Show CLI
shows the cli structure of a selectable process.
@item Show Hunk
shows the hunks of a selectable process.
@item Send Task Signal
sends a signal to a selectable task.
@item Set Task Priority
sets a priority of a selectable task.
@item Refresh Code Cache
refreshes the Code Cache.
@item Refresh Data Cache
refreshes the Data Cache
@end itemize
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node UB_FPUW, UB_DISSW, UB_REGW, BDebugTop
@chapter Usage of BDebug
@section The FPU Window
@menu
* The FPU Window:FPUW_Window. The FPU Window
* Local Menus:FPUW_LocalMenus. Local Menus
@end menu
@node FPUW_Window, FPUW_LocalMenus, , UB_FPUW
@subsection FPU Window
The FPU Window shows the FPU register FP0 to FP7
in the 96Bit Extended format and the registers
FPCR,FPSR and FPIAR in hexadecimal.
You can only open this window if a FPU is available.
@quotation
Register Window Layout
@end quotation
@center FP0=FloatingPoint
@center FP1=FloatingPoint
@center FP2=FloatingPoint
@center FP3=FloatingPoint
@center FP4=FloatingPoint
@center FP5=FloatingPoint
@center FP6=FloatingPoint
@center FP7=FloatingPoint
@center FPCR=xxxxxxxx FPSR=xxxxxxxx
@center FPIAR=xxxxxxxx
@node FPUW_LocalMenus, , FPUW_Window , UB_FPUW
@subsection Local Menus
@itemize
@item Close Window
closes the window.
@end itemize
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node UB_DISSW, UB_MEMW, UB_FPUW, BDebugTop
@chapter Usage of BDebug
@section The Disassembler Window
@menu
* The Disasembler Window:DISSW_Window. The Disassembler Window
* Local Menus:DISSW_LocalMenus. Local Menus
@end menu
@node DISSW_Window, DISSW_LocalMenus, , UB_DISSW
@subsection Disassembler window
The @samp{DissWindow} shows the memory contents in assembler
mnemonics. The address of the window's view can be absolut
or relative.
In the absolut mode the window is set to a fixed adress and
you can read in the title @samp{No Link}.
In the relative mode the window is connected with a register
so the window's view depends on the registers value.
You can see this mode by the title string @samp{Link to *}
where * represents the register name.
The PC is shown by the colour pen 2.
If the linked register value is outside of the window's view
area the whole contents of the window will be refreshed.
You can change size of the window and scroll through
the memory area by using the cursors.
In the title you see an ID-String with the format @samp{\#x.y} where
@samp{X} represents the @samp{REGWindow} number and @samp{y} the number
of the @samp{MemWindow}.
By a doubleclick in a line of the window you can sets or remove a
breakpoint. You can disable this function in the configuration.
@node DISSW_LocalMenus, , DISSW_Window, UB_DISSW
@subsection Local Menus
@itemize
@item Close Window
closes the window.
@item Shrink Window
shrinks the window.
@item Expand Window
expands the window to screen size.
@item Link to Register
links the window with a register.
If you enter the string @samp{NO} it switches
to the absolute mode.
@item Change Adress
changes the view address of the window.
@item Clear Adress
resets the view address of the window.
@item Refresh Window
refreshes the window.
@item .W Branches
activates and disactivates the output of the old branch width size.
@item Neg. Offsets
activates and disactivates the output of negative values in
the indirect address modes with offset.
@item Neg. Data
activates and disactivates the output of negative values in the
direkt address mode.
@item Opcode Data
activates and disactivates the additional output of the command
bytes.
@item Auto Refresh
activates and disactivates the global refresh of the window after
each step.
@item Symbols
activates and disactivates the symbol output in the window.
@item Show Lib Call
activates and disactivates the symbolic output of library functions so
all library functions that are defined in the configuration file
@samp{<BarflyPath>/Barfly/BARFLY.FD} are recognized.
@item Guess Lib Call
activates and disactivates the guessing of function call names.
It only works in connection with the option @samp{Show Lib Call}.
Fortunately you can't expect that the function names always fit
because the the library base register A6 can change until the
program counter meets the function.
@item Mark Block End
activates and disactivates marking after the instruction
@samp{JMP},@samp{BRA},@samp{RTS},@samp{RTE},@samp{RTD} and @samp{RTR}
to make program blocks more visible.
@item Set/Clear Breakpoint
sets/removes a breakpoint on the first entry in the window.
Breakpoints are shown by changing the pen from colour 1 to
colour 3 and the char @samp{>} at the beginning of a line.
@item Pick/Clear Breakpoint
sets/removes a breakpoint through a symbol list.
@item Disassemble to File
disassembles a memory area into a file.
@end itemize
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node UB_MEMW, UB_COPPW, UB_DISSW, BDebugTop
@chapter Usage of BDebug
@section The Memory Window
@menu
* The Memory Window:MEMW_Window. The Memory Window
* Local Menus:MEMW_LocalMenus. Local Menus
@end menu
@node MEMW_Window, MEMW_LocalMenus, , UB_MEMW
@subsection Memory window
The @samp{MemWindow} shows the memory contents hexadecimal and
in ascii.You can change size of the window and scroll through
the memory area by using the cursors.
In the title you see an ID-String with the format @samp{\#x.y} where
@samp{X} represents the @samp{REGWindow} number and @samp{y} the number
of the @samp{MemWindow}.
@node MEMW_LocalMenus, , MEMW_Window, UB_MEMW
@subsection Local Menus
@itemize
@item Close Window
closes the window.
@item Shrink Window
shrinks the window.
@item Expand Window
expands the window to screen size.
@item Link to Register
links the window with a register.
If you enter the string @samp{NO} it switches
to the absolute mode.
@item Change Adress
changes the view address of the window.
@item Clear Adress
resets the view address of the window.
@item Refresh Window
refreshes the window.
@item Memory Offset Step
defines the data format in the window.
The following options can be selected:
@samp{None}, @samp{Byte}, @samp{Word} and @samp{Long}.
@item Edit
activates the edit mode of the @samp{MemWindow}.
In the edit mode you can switch between hex and ascii
input by the key @samp{RETURN}. With @samp{ESC} you can
leave the edit mode. Only the cursor right and left
are changed to the normal.
With these both keys you can access each Byte.
In the edit mode you can't change the size of the window.
@item Copy
copies a memory area into another memory area.
The function uses @samp{CopyMem} so it doesn't
handle memory areas that overlap.
@item Fill
fills a memory area with a value of a certain data-width.
@item Compare
compares a memory area with another memory area.
@item Search
searches a value of a certain data-width in a memory area.
If the value is found the address and
the value are shown and you can goon with @samp{Search Next}
to find the next address.
@item Search Next
Searches the next value. Look at @samp{Search}
@item Pred
sets the address of the window on the preceding entry of the list.
If the node points on an odd, illegal or address NULL the command
has no effect.
The next node is equal to @samp{LN_PRED}, the second longword
of the memory view.
@item Succ
sets the address of the window on the next entry of the list.
If the node points on an odd, illegal or address NULL
the command has no effect.
The next node is equal to @samp{LN_SUCC}, the first longword
of the memory view.
@end itemize
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node UB_COPPW, UB_STRUCTW, UB_MEMW, BDebugTop
@chapter Usage of BDebug
@section The Copper Window
@menu
* The Copper Window:COPPW_Window. The Copper Window
* Local Menus:COPPW_LocalMenus. Local Menus
@end menu
@node COPPW_Window, COPPW_LocalMenus, , UB_COPPW
@subsection CopperWindow
The @samp{CopperWindow} shows the memory contents as copper commands.
You can change size of the window and scroll through the memory area
by using the cursors.
In the title you see an ID-String with the format @samp{\#x.y} where
@samp{X} represents the @samp{REGWindow} number and @samp{y} the number
of the @samp{CoppWindow}.
@node COPPW_LocalMenus, , COPPW_Window , UB_COPPW
@subsection Local Menus
@itemize
@item Close Window
closes the window.
@item Shrink Window
shrinks the window.
@item Expand Window
expands the window to screen size.
@item Link to Register
links the window with a register.
If you enter the string @samp{NO} it switches
to the absolute mode.
@item Change Adress
changes the view address of the window.
@item Clear Adress
resets the view address of the window.
@item Refresh Window
refreshes the window.
@item Goto Into List
sets the window list on the standard copperlist
@samp{GfxBase->gb_copinit}.
@end itemize
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node UB_STRUCTW, UB_SOURCEW, UB_COPPW, BDebugTop
@chapter Usage of BDebug
@section The Structure Window
@menu
* The Structure Window:STRUCTW_Window. The Structure Window
* The Structure Format:STRUCTW_Format. The Structure Format
* Local Menus:STRUCTW_LocalMenus. Local Menus
@end menu
@node STRUCTW_Window, STRUCTW_Format, , UB_STRUCTW
@subsection StructWindow
opens window that can be connected with a structure.
You can use new structure entries by expanding the
the @samp{<BarflyPath>/Barfly/Barfly.Include} file
or loading a new custom file.
By a doubleclick on a structure window entry you can
cause several actions depending on the datatype.
Every datatype is connected with an action that is
normally started automaticly.
With the configuration command @samp{NoAutoStructAction}
you can change this behaviour so that an action type
requester is opened.
The following datatypes are available.
@itemize
@item APTR opens a MemWindow.
@item CSTR shows a string.
@item BPTR opens a MemWindow at the address BPTR*4.
@item BSTR shows a string at the address (BPTR*4)+1
@item CPTR opens a DissWindow.
@item FPTR opens a DissWindow.
@item BYTE doesn't cause an action.
@item WORD doesn't cause an action.
@item LONG doesn't cause an action.
@item FLOAT doesn't cause an action.
@item DOUBLE doesn't cause an action.
@item EXTENDED doesn't cause an action.
@item RPTR doesn't cause an action.
@end itemize
The following action types are available.
@itemize
@item MemWindow opens a MemWindow.
@item DissWindow opens a DissWindow.
@item CoppWindow opens a CoppWindow.
@item StructWindow opens a StructWindow.
@item NewStruct sets a new structure.
@end itemize
@node STRUCTW_Format, STRUCTW_LocalMenus, STRUCTW_Window, UB_STRUCTW
@subsection Structure Macro Fileformat
In the beginning you define the root directory entries with the
Macro @samp{Menudir}.
The first parameter is the name of the entry,then the address of
the parent directory and then the address of the subdirectory.
In the root directory the parent address is fortunately NULL.
The last entry of the directory is defined by the Macro
@samp{MENUDIREND}.
@example
@samp{Label ListViewMacro Link}
RootDir:
.
.
MENUDIR exec,0,Exec_Dir
.
.
MYCUSTOMENTRY:
MENUDIREND CUSTOM,0,0
@end example
The design of a subdirectory only differs from the
root directory entries by a parent directory address.
@example
@samp{Label ListViewMacro Link}
Exec_Dir:
.
.
MENUDIR nodes.i,RootDir,Nodes_Dir
.
.
MENUDIREND tasks.i,RootDir,Tasks_Dir
@end example
to define the structure directory entries you have to use
@samp{MENUITEM} and @samp{MENUITEMEND}.
The first parameter in the Item Macros is the name of the entry
and also the name of the structure.
The second parameter defines the address of the parent
directory.
@example
@samp{Label ListViewMacro Link}
.
.
Nodes_Dir:
MENUITEM LN,Exec_Dir
.
.
MENUITEMEND
@end example
To define a structure you can use the normal assembler
syntax that you probably have to adjust to your custom
needs. For example you can tell BDebug more informations
about the datatype an entry represents.
By redefining @samp{APTR} to a @samp{CSTR} you can tell
debugger that the entry is a stringpointer.
Or you can tell that @samp{APTR} points to a structure
by @samp{APTR LN_SUCC,Node}.
@example
@samp{Label IncludeTypeMacro Name,Link}
LN_Struct:
STRUCTUREB LN,0
APTR LN_SUCC,LN
APTR LN_PRED,LN
UBYTE LN_TYPE
BYTE LN_PRI
CCSTR LN_NAME
LABEL LN_SIZE
@end example
@node STRUCTW_LocalMenus, , STRUCTW_Format, UB_STRUCTW
@subsection Local Menus
@itemize
@item Close Window
closes the window.
@item Shrink Window
shrinks the window.
@item Expand Window
expands the window to screen size.
@item Link to Register
links the window with a register.
If you enter the string @samp{NO} it switches
to the absolute mode.
@item Change Adress
changes the view address of the window.
@item Clear Adress
resets the view address of the window.
@item Refresh Window
refreshes the window.
@item Load Custom Struct
loads additional structure files. The new structure entries
are place in the @samp{CUSTOM} directory.
The format of custom structure files is equal to the file
@samp{BARFLY.INCLUDE}.
@item Select Structure
opens the structure include directory requester where you
can select the needed structure.
The parent gadget is placed in the upper border.
@item Goto Sysbase@dots{}
sets the window adress on the ExecBase.
@item Goto Gfxbase@dots{}
sets the window address on the GFXBase.
@item Save Window@dots{}.
saves the contents of the window in a file.
@item Full Address
this switch decides if the @samp{StructWindow} also
shows the address of the entries.
@item Offset Address
this switch decides if the @samp{StructWindow} also
shows the offset of the entries.
@item Pred
sets the address of the window on the preceding entry of the list.
If the node points on an odd, illegal or address NULL the command
has no effect.
The next node is equal to @samp{LN_PRED}, the second longword
of the memory view.
@item Succ
sets the address of the window on the next entry of the list.
If the node points on an odd, illegal or address NULL
the command has no effect.
The next node is equal to @samp{LN_SUCC}, the first longword
of the memory view.
@end itemize
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node UB_SOURCEW, UB_SNOOPW, UB_STRUCTW, BDebugTop
@chapter Usage of BDebug
@section The Structure Window
@menu
* The Source Window:SOURCEW_Window. The Source Window
* Local Menus:SOURCEW_LocalMenus. Local Menus
@end menu
@node SOURCEW_Window, SOURCEW_LocalMenus, , UB_SOURCEW
@subsection Source window
The @samp{SourceWindow} shows the source line that belongs
to the window address. If the program file doesn't have
the needed debug informations the @samp{Source window}
can't be opened. If the address points to an area with
no relevant debug information, for example the Kickstart or
beyond the program hunks, you only see a small message.
@node SOURCEW_LocalMenus, , SOURCEW_Window , UB_SOURCEW
@subsection Local Menus
@itemize
@item Close Window
closes the window.
@item Shrink Window
shrinks the window.
@item Expand Window
expands the window to screen size.
@item Link to Register
links the window with a register.
If you enter the string @samp{NO} it switches
to the absolute mode.
@item Change Adress
changes the view address of the window.
@item Clear Adress
resets the view address of the window.
@item Refresh Window
refreshes the window.
@item Set Breakpoint
sets a breakpoint on the active line.
@item Show HunkInfo
shows the hunk of the current source line.
@end itemize
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node UB_SNOOPW, UB_BREAKW, UB_SOURCEW, BDebugTop
@chapter Usage of BDebug
@section The Snoop Window
@menu
* The Snoop Window:SNOOPW_Window. The Snoop Window
* Local Menus:SNOOPW_LocalMenus. Local Menus
@end menu
@node SNOOPW_Window, SNOOPW_LocalMenus, , UB_SNOOPW
@subsection Snoop Window
The @samp{SnoopWindow} snoops the task's allocations.
@node SNOOPW_LocalMenus, , SNOOPW_Window , UB_SNOOPW
@subsection Local Menus
@itemize
@item Close Window
closes the window.
@item Shrink Window
shrinks the window.
@item Expand Window
expands the window to screen size.
@item Refresh Window
refreshes the window.
@item Auto Refresh
activates/disactivates display refresh
by an allocation.
@item Snoop Memory
activates/disactivates snooping.
@item Snoop Mask
sets the allocation filter mask.
Is the Mask 20 only allocations with the size
20 are recorded. Default -1.
@item Snoop Max Entries
sets the maximal recorded snoop entries.
@end itemize
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node UB_BREAKW, UB_WATCHW, UB_SNOOPW, BDebugTop
@chapter Usage of BDebug
@section The Breakpoint Window
@menu
* The Breakpoint Window:BREAKW_Window. The Breakpoint Window
* Local Menus:BREAKW_LocalMenus. Local Menus
@end menu
@node BREAKW_Window, BREAKW_LocalMenus, , UB_BREAKW
@subsection Breakpoint window
The @samp{BreakWindow} handles all breakpoints and contains
the functions that are needed with breakpoints.
In general breakpoints are addresses in the program where the task
should be stopped.
The breakpoints are handled global so they aren't deleted when
close the window.
@node BREAKW_LocalMenus, ,BREAKW_Window, UB_BREAKW
@subsection Local Menus
@itemize
@item Toggle
activates and disactivates all breakpoints.
@item All
selects all breakpoints.
@item Clear
unselects all breakpoints.
@item On
activates all selected breakpoints.
@item Off
disactivates all selected breakpoints.
@item Hit
sets the amount of hits for a breakpoint until
it should stop the program. Default is 1.
@item ?
shows the hunk where the breakpoint is located and if
the breakpoint is equal to a symbol.
@item Input
this breakpoint sets and removes a breakpoint.
@item Pick
this breakpoint sets and removes a breakpoint using the symbol list.
@item Delete
removes every selected breakpoint.
@item Goto
opens a DissWindow for every selected breakpoint.
@item Run
runs the program until the PC hits a selected breakpoint.
@end itemize
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node UB_WATCHW, UB_CHECKW, UB_BREAKW, BDebugTop
@chapter Usage of BDebug
@section The Watchpoint Window
@menu
* The Watchpoint Window:WATCHW_Window. The Watchpoint Window
* Local Menus:WATCHW_LocalMenus. Local Menus
@end menu
@node WATCHW_Window, WATCHW_LocalMenus, , UB_WATCHW
@subsection Watchpoint window
The @samp{Watchwindow} allows to set breakpoints that aren't dependend
on a certain PC address but from other conditions.
Every watchpoint has a condition,data width and state if it's
activated or not.
There are 3 types of different watchpoints available now.
The @samp{Memory} watchpoint compares the saved contents of the address
with the current contents and dependent on the condition the
program is stopped or not.
The @samp{Register} watchpoint compares the saved contents of a register
with the current contents and dependent on the condition the
program is stopped or not.
The @samp{Argument} watchpoint compares the saved value of an argument
with the current contents and dependent on the condition the
program is stopped or not.
The last watchpoint type is the most powerful because it can simulate
the first two types with the cost of a slowdown.
The use of watchpoints is very time consuming because the whole
program is run in single stepping
To use watchpoints you have to run the task with @samp{Run Watched Task}.
@quotation
If an error happens during a dynamic argument in the exception
handler the screen is blinked.
@end quotation
@node WATCHW_LocalMenus, , WATCHW_Window , UB_WATCHW
@subsection Local Menus
@itemize
@item Toggle
activates and disactivates all watchpoints.
@item All
selects all watchpoints.
@item Clear
unselects all watchpoints.
@item On
activates all selected watchpoints.
@item Off
disactivates all selected watchpoints.
@item Add
opens a requester where the parameter for a watchpoint have to be adjusted
and adds the new watchpoint to the list.
If you doubeclick on a watchpoint you can change the parameter.
@item Refresh
refreshes the watchpoint arguments.
@item Check
checks all selected watchpoints.
@item Delete
removes all selected watchpoints.
@end itemize
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node UB_CHECKW, UB_ARGUMENTS , UB_WATCHW, BDebugTop
@chapter Usage of BDebug
@section The Checksum Window
@menu
* The Checksum Window:CHECKW_Window. The Checksum Window
* Local Menus:CHECKW_LocalMenus. Local Menus
@end menu
@node CHECKW_Window, CHECKW_LocalMenus, , UB_CHECKW
@subsection Checksum Window
The @samp{ChecksumWindow} controlls all checksum areas that are
been checked each time the task stops.
Helpful to find illegal random writes bugs.
The checkpoints are controlled global so they aren't deleted
when you close the window.
@node CHECKW_LocalMenus, , CHECKW_Window , UB_CHECKW
@subsection Local Menus
@itemize
@item Toggle
activates or disactivates all checksum areas.
@item All
selects all checksum areas.
@item Clear
unselects all checksum areas.
@item On
activates all selected checksum areas.
@item Off
disactivates all selected checksum areas.
@item Address
adds a checksum area into the list.
@item Hunk
adds a hunk of the current process into the checksum
area list.
@item Task
adds a hunk of selectable process into the checksum
area list.
@item Refresh
calculate a new checksum for all selected areas.
@item Delete
removes all selected checksum areas.
@item Check
checks all areas for checksum errors.
@end itemize
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node UB_ARGUMENTS, UB_TECHINFOS, UB_CHECKW, BDebugTop
@chapter Usage of BDebug
@section Requester Arguments
@subsection Argument Structur
An argument can use absolut values,symbols and registers as
operands and the operators +,-,*,/,|,!,&,<<,>>,~.
Additionally to the normal symbols there are some special
symbols available.
@itemize
@item By @{Argument@}.[b,w,l] you can read from a memory address, that
is defined by the argument. If you specify an illegal
address that isn't defined in the legal memory space an
error is shown.
@item \#d? represents the address of the @samp{Disswindows} with the ID ?
@item \#m? represents the address of the @samp{Memwindows} with the ID ?
@item \#c? represents the address of the @samp{Coppwindows} with the ID ?
@item \#h? represents the address of the hunk ?.
Helpful for enforcer Hunk:Offset output
@item \#ea? represents the address of the EA with the number ?.
Check Register Window.
@item \#em? represents the contents where the address EA number ?
points to.
Check Register Window. If the address EA is illegal
an error is shown.
@item \#ls represents the start address of a loaded binary file.
@item \#le represents the end address of a loaded binary file.
@item \#ll represents the length address of a loaded binary file.
@item \#p represents the start address of the programs.
Only true for a loaded program.
@end itemize
If you have the following Enforcer Hit output @samp{Hunk 0:$11c} you
can calculate the adress by entering the argument #h0+$11c.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node UB_TECHINFOS, UB_CONFIG, UB_ARGUMENTS, BDebugTop
@chapter Usage of BDebug
@section Technical Informations
@subsection Exceptions
The debugger can catch all exceptions if the system is still
working.
If an exception is caused the traphandler catches the exception
and tells the debugger what went on so it can react on the
exception.
If the exception wasn't caused by the debugger the type and
the possible reason for the exception is shown.
The @samp{Return-Adress} of the debugged task points on an
internal @samp{ILLEGAL}. If the PC points on this @samp{ILLEGAL}
the task is closed and all windows are removed.
You should step over this @samp{ILLEGAL} because it increases
possibility of a system crash.
If a task is caught by @samp{Debug Next Task} and notices a
@samp{finalPC} pointer the @samp{Return-Adress} isn't set on
an internal @samp{ILLEGAL} because the @samp{finalPC} pointer
is sometimes used for parsing an argument.
In this case the debugger notices that the task ends by
the RemTask() function.
@quotation
If the task changes the @samp{Return-Adress} the debugger tries
to determine the taskend by @samp{RemTask}.
@end quotation
@subsection Exception Handler
Every task contains in the task structure a pointer to its
exception handler that is named @samp{TC_TRAPCODE}
When an exception happens in this task the exception checks
if the debugger knows this task.
If this is not the case something seriously is broken and
the Deadend Alert 35000000 will be poped up.
If all goes well the registers are saved, the debugger
task gets a message and the exception handler waits for
a msg by the debugger to go on.
When the debugger gets the message it causes the appropriate
function. For example refreshing the windows.
If the debugger gets a step command it sends the exception
handler the appropriate message and the handler does a step.
@subsection Debug Informations
Currently the following formats are supported.
@itemize
@item BASM Specialformat
This format allows the debugger to decide if the code is
in the Mainpart,Includes or in a Macro.
@item SAS D1
This format only allows a Source-Code connection.
It doesn't support local variables,Structures and Macros.
@item GCC STABS
This format is very powerful and offers all a source-level
debugger needs.
Unfortunately the debugger only supports a simple
Source-Code connection at the moment.
It's planned to support more in the future.
@end itemize
@subsection GCC Compiler and BDebug
Unfortunately you can't debug programs that are using the current
@samp{ixemul.library} because in Openlibrary() initroutine
the Task field TC_TRAPCODE is changed.
Hopefully there'll be soon an @samp{ixemul.library} available
that doesn't change the traphandler.
If you're using GCC with the link lib @samp{gerlib} that is
available on Aminet FTP Servers you shouldn't experience any
problems with BDebug.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node UB_CONFIG, UB_AREXX, UB_TECHINFOS, BDebugTop
@chapter Usage of BDebug
@section Configuration
The default configuration file is named @samp{BDEBUG.Config} and
is located in the directory @samp{<BarflyPath>/} or @samp{s:Barfly/}.
Obviously it's not optimal to be forced to use the same config file
for different programs. Therefore you can also specify a local
config file with program name and the suffix @samp{.BDebug}.
@menu
* Tooltypes:CO_TOOLTYPES. Available Tooltypes
* Barfly.FD:CO_BARFLYFD. The Barfly.FD format
* Commands:CO_CONFIGCMDS. Configuration Commands
@end menu
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node CO_TOOLTYPES, CO_BARFLYFD, ,UB_CONFIG
@subsection ToolTypes
The following tooltypes are supported to activate the know functions of the commandwindow.
@itemize
@item CatchNextTask
@item CatchCrashedTask
@item CatchEnforcerHit
@end itemize
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node CO_BARFLYFD, CO_CONFIGCMDS, CO_TOOLTYPES ,UB_CONFIG
@subsection Barfly.FD
If you want to create a new @samp{Barfly.FD} file that contains
the library function name you have to follow the following
the instructions.
First the assign @samp{FD:} has to point to the directory
that contains the FD files that should be contained in
the new @samp{Barfly.FD}.
Afterwards you should check every FD file if the Library,
Resource, Device name exist in the first line in the
following style: @samp{* "foobar.libary"}.
If this is not the case you have to add the name yourself
so that a correct FD database can be build up.
If you're more experienced with FD files you can yourself
add new entries to the @samp{Barfly.FD} file because the
layout is pretty obvious.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node CO_CONFIGCMDS, , CO_BARFLYFD , UB_CONFIG
@subsection Configuration Commands
@menu
Window Config Commands@dots{}
* Register Window:CC_REGW. Register Window Object
* FPU Window:CC_FPUW. FPU Window Object
* Disassembler Window:CC_DISSW. Disassembler Window Object
* Memory Window:CC_MEMW. Memory Window Object
* Copper Window:CC_COPPW. Copper Window Object
* Struct Window:CC_STRUCTW. Struct Window Object
* Source Window:CC_SOURCEW. Source Window Object
* Breakpoint Window:CC_BREAKW. Breakpoint Manager Window Object
* Watchpoint Window:CC_WATCHW. Watchpoint Manager Window Object
* Checksum Window:CC_CHECKW. Checksum Manager Window Object
* Snoop Window:CC_SNOOPW. Snoop Memory Window Object
* Info Window:CC_INFOW. Information Windows
* Other Windows:CC_OTHERW. Other Windows
Misc Commands@dots{}
* Misc Commands:CM_MISC. Miscellaneous Commands
@end menu
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node CC_REGW, CC_FPUW, , CO_CONFIGCMDS
@subsection Register window
@subsubsection RegWindow=x/y/width/height/register
This command defines the position of a @samp{REGWindow}.
@subsubsection RegFlags=flag[|flags@dots{}]
This command defines certain flags in the @samp{REGWindows}.
@itemize
@item AUTOVIEWREFRESH
@item SYMBOLS
@item STACKCHECK
@item NOBIGVIEW
@end itemize
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node CC_FPUW, CC_DISSW, CC_REGW, CO_CONFIGCMDS
@subsection FPU Window
@subsubsection FpuWindow=x/y/width/height/register
This command defines the position of a @samp{FPUWindow}.
@subsubsection OpenFPUWindows=Count
This command tells the debugger to open a @samp{FPUWindow}.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node CC_DISSW, CC_MEMW, CC_FPUW, CO_CONFIGCMDS
@subsection Disassembler window
@subsubsection DissWindow=x/y/width/height/register
This command defines the position,the dimension and linked
register of the @samp{DissWindow}.
Beispiel: DISSWINDOW=0/0/300/100/PC
@subsubsection DissFlags=flag[|flags@dots{}]
This command defines certain flags in the @samp{DISSWindow}.
@itemize
@item AUTOREFRESH
@item SHOWLIB
@item GUESSLIB
@item SHOWEA
@item WORDBRANCHES
@item NEGOFFSETS
@item NEGDI
@item OPCODEDATA
@item BLANKAFTERJMPBRA
@end itemize
@subsubsection OpenDissWindows=Count
This command tells the debugger to open a number of @samp{DissWindows}.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node CC_MEMW, CC_COPPW, CC_DISSW, CO_CONFIGCMDS
@subsection Memory window
@subsubsection MemWindow=x/y/width/height/register
This command defines the position,the dimension and linked
register of the @samp{MemWindow}.
Example: MEMWINDOW=0/0/300/100/A0
@subsubsection OpenMemWindows=Count
This command tells the debugger to open a number of @samp{MemWindows}.
@subsubsection MemoryOffsetStep=Count
This command defines the Offset-Step of the @samp{MemWindows}.
@itemize
@item 0 no Space
@item 1 Space after each Byte.
@item 2 Space after each Word.
@item 4 Space after each Longword.
@end itemize
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node CC_COPPW, CC_STRUCTW, CC_MEMW, CO_CONFIGCMDS
@subsection Copper window
@subsubsection CoppWindow=x/y/width/height/register
This command defines the position,the dimension and linked
register of the @samp{CoppWindow}.
Example: COPPWINDOW=0/0/300/100/A0
@subsubsection OpenCoppWindows=Count
This command tells the debugger to open a number of @samp{CoppWindows}.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node CC_STRUCTW, CC_SOURCEW, CC_COPPW, CO_CONFIGCMDS
@subsection StructWindow
@subsubsection StructWindow=x/y/width/height/register
This command defines the position,the dimension and linked
register of the @samp{StructWindow}.
Example: StructWINDOW=0/0/300/100/A0
@subsubsection StructFlags=flag[|flags@dots{}]
This command defines certain flags for the @samp{StructWindow}
@itemize
@item AUTOREFRESH
@item ADDRESSFORMAT
@item OFFSETFORMAT
@end itemize
@subsubsection OpenStructWindows=Count
This command tells the debugger to open a number of @samp{StructWindows}.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node CC_SOURCEW, CC_BREAKW, CC_STRUCTW, CO_CONFIGCMDS
@subsection Source window
@subsubsection SourceWindow=x/y/width/height/register
This command defines the position,the dimension and linked
register of the @samp{SourceWindow}.
Example: SOURCEWINDOW=0/0/300/100/A0
@subsubsection OpenSourceWindows=Count
This command tells the debugger to open a number of @samp{SourceWindows}.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node CC_BREAKW, CC_WATCHW, CC_SOURCEW, CO_CONFIGCMDS
@subsection Breakpoint window
@subsubsection BreakWindow=x/y/width/height
This command defines the position of a @samp{BreakPointWindow}.
@subsubsection OpenBreakWindows=Count
This command tells the debugger to open a @samp{BreakPointWindow}.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node CC_WATCHW, CC_CHECKW, CC_BREAKW, CO_CONFIGCMDS
@subsection Watchpoint window
@subsubsection WatchWindow=x/y/width/height
This command defines the position of a @samp{WatchpoinzWindow}.
@subsubsection OpenWatchWindows=Count
This command tells the debugger to open a @samp{WatchPointWindow}.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node CC_CHECKW, CC_SNOOPW, CC_WATCHW, CO_CONFIGCMDS
@subsection Checksum window
@subsubsection ChecksumWindow=x/y/width/height
This command defines the position of a @samp{ChecksumWindow}.
@subsubsection ChecksumWindows=Count
This command tells the debugger to open a @samp{ChecksumWindow}.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node CC_SNOOPW, CC_INFOW, CC_CHECKW, CO_CONFIGCMDS
@subsection SnoopMemory window
@subsubsection SnoopMemWindow=x/y/width/height/register
This command defines the position of a @samp{SnoopMemWindow}.
@subsubsection OpenSnoopMemWindow=Count
This command tells the debugger to open a @samp{SnoopMemWindow}.
@subsubsection SnoopMask=Mask
This command defines the snoop mask. The mask defines the
length of memory blocks that should be recorded.
Default is -1 so everything is recorded.
@subsubsection SnoopMax=Count
This command defines the count of snoop entries.
Default is 100.
@subsubsection HistoryEntrys=Count
This command defines the count of history entries.
Default is 5.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node CC_INFOW, CC_OTHERW , CC_SNOOPW, CO_CONFIGCMDS
@subsection Information Windows
@subsubsection GlobalViewWindow=x/y/width/height
This command defines the position and dimensions of a standard
information window. For example the Library Window belongs to
this group.
Example: GLOBALVIEWWINDOW=0/0/300/100
GLOBALVIEWWINDOW=0/200/300/100
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node CC_OTHERW, , CC_INFOW, CO_CONFIGCMDS
@subsection Other Windows
@subsubsection CommandWindow=x/y/width/height
This command defines the position of the small @samp{CommandWindow}.
This command has no function in local configuration files.
@subsubsection FileShell=<Window Specifikation>
This command defines the shell that is opened with the loaded
program. You should always open the shell on the debugger's
Public Screen. The shell parameters are the same you know
from the CLI.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node CM_MISC, , , CO_CONFIGCMDS
@subsection Misc
@menu
* Task Stack:CM_TASKSTACK. Define program's stacksize
* Task Priority:CM_TASKPRI. Sets the Debugger Priority
* SetBreak:CM_SETBREAK. Set a breakpoint
* ClickBreak:CM_CLICKBREAK. Define DissWindow Action on a Click
* Showmem:CM_SHOWMEM. Define readable Memory areas
* DefCommand:CM_DEFCOMMAND. Define custom commands
* AutoDocDir:CM_AUTODOCDIR. Set the autodocdir
* AutoDocAlias:CM_AUTODOCALIAS. Define the library/autodoc alias
* Arexxpath:CM_AREXXPATH. Define the arexxpath
* Arexxinput:CM_AREXXINPUT. Define the arexx input handle
* Arexxoutput:CM_AREXXOUTPUT. Define the arexx output handle
* Arexxcommand:CM_AREXXCMD. Define an arexxcommand
* Execute Cmd:CM_EXECMD. Define the programs that should be started
* LoadInclude:CM_LOADINCLUDE. Load struct database file
* ClicktoFront:CM_CLICK2FRONT. Activate click to front
* CenterWindow:CM_CENTERW. Center requester windows ?
* Screeninfront:CM_SCREENFRONT. Screen to front ?
* OpenScreen:CM_OPENSCREEN. Define an own screen
* ScreenFont:CM_SCREENFONT. Define an own screenfont
* QuietException:CM_QUIETEX. Set certain exceptions quiet
* DisableXWindow:CM_DISXP. Disable Waitpointer
* TraceBreak:CM_TRACEBREAK. Define the trace method
* CrashedTask:CM_CRASHEDTASK. Activate catching crashed tasks
* Catch Hit:CM_CATCHHIT. Activate catching Enforcer hits
* Cache File:CM_CACHEFILE. Activate file caching
* Pop Path Request:CM_POPPATH. Disable path requester
* Auto Action:CM_AUTOACT. Activates the StructWindow action requester
* NoBreakErr:CM_NOBREAKTERRORS. Ignores SetBreak config errors
@end menu
@node CM_TASKSTACK, CM_TASKPRI, , CM_MISC
@subsubsection TaskStack=Count
This command defines the stack of the loaded program.
Defaullt are 4096 Bytes.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node CM_TASKPRI, CM_SETBREAK, CM_TASKSTACK , CM_MISC
@subsubsection Priority=Count
This command defines the debugger's priority.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node CM_SETBREAK, CM_CLICKBREAK, CM_TASKPRI , CM_MISC
@subsubsection SetBreak=Argument
This command can be used to define a list of breakpoints that
are set before the program is started.
This is useful to pass the module @samp{Main.c} for example.
If no breakpoints are defined or if a parsing problem occurs
the standard breakpoint,first program instruction, is set.
@itemize
@item SETBREAK=_main ; SAS C Main Program Start
@item SETBREAK=_main ; GCC C Main Program Start
@item SETBREAK=@@main ; DICE C Main Program Start
@item SETBREAK=! ; Programstart(Default)
@end itemize
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node CM_CLICKBREAK, CM_SHOWMEM, CM_SETBREAK , CM_MISC
@subsubsection ClickBreak=State
This command can be used to define the action of the
DissWindow on a doubleclick.
@table @samp
@item State=0
No Action(Default).
@item State=1
Set/Clear Breakpoint and pop up a Requester for a Set.
@item State=2
Set/Clear Breakpoint.
@end table
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node CM_SHOWMEM, CM_DEFCOMMAND, CM_CLICKBREAK , CM_MISC
@subsubsection ShowMem=Start:End
defines the adress areas that are legal to the debugger
so you can look at adress areas that are not in the
memorylist or in the rom.
Illegal adress areas are shown with @samp{*} in the windows.
You should @samp{never} define the custom chip areas as legal
because a read access on a writeonly register can cause a
deadly crash.
Example: SHOWMEM=$e80000:$f00000
defines the Zorro 2 area as free.
@quotation
By this command you can overrule the internal enforcer legal
memory areas so you should beware of hits.
@end quotation
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node CM_DEFCOMMAND, CM_AUTODOCDIR, CM_SHOWMEM , CM_MISC
@subsubsection DefCommand=Key,Qualifier[|Qualifier@dots{}],Function
This commands allows to connect menu functions with key sequences.
Because of the object-oriented concept of the debugger that allowes
multiple instances of objects it's not easy to decide what object
is meant.
Therefore if the object is active it's used and if no object of
this type is active the first entry the object-type list is used.
As the key parameter every Rawkey can be used with the exception
of @samp{TAB} and the functionkeys that are used internal.
The key is searched first in the local and then in the global
configuration.
As qualifiers you can use the following keys.
@itemize
@item LSHIFT
@item RSHIFT
@item CAPSLOCK
@item CTRL
@item LALT
@item RALT
@item LCOMMAND
@item RCOMMAND
@end itemize
@quotation
Bespiel:
DEFCOMMAND=$15,CTRL,"Step 1 Position"
Defines CTRL-Z as Step 1 Position
@end quotation
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node CM_AUTODOCDIR, CM_AUTODOCALIAS, CM_DEFCOMMAND , CM_MISC
@subsubsection AutoDocDir=<Path>
This command sets the path for the autodocs
directory.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node CM_AUTODOCALIAS, CM_AREXXPATH, CM_AUTODOCDIR , CM_MISC
@subsubsection AutoDocAlias=Library,File
This command sets an alias for Libraries,Devices or Resources
to define the connected Autodocs file.
There's no other way because it's not possible to build
the autodocs file by knowing the library name.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node CM_AREXXPATH, CM_AREXXINPUT, CM_AUTODOCALIAS , CM_MISC
@subsubsection ArexxPath=<rx-path>
This command sets the Arexx-Script Start-Command.
In a normal system the path should be <sys:Rexxc/rx>.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node CM_AREXXINPUT, CM_AREXXOUTPUT, CM_AREXXPATH , CM_MISC
@subsubsection ArexxInput=<File>
This command sets the Arexx-Command Input-File.
If you don't specify the file, NIL: is used.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node CM_AREXXOUTPUT, CM_AREXXCMD, CM_AREXXINPUT , CM_MISC
@subsubsection ArexxOutput=<File>
This command sets the Arexx-Command Output-File.
If you don't specify the file, NIL: is used.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node CM_AREXXCMD, CM_EXECMD, CM_AREXXOUTPUT , CM_MISC
@subsubsection ArexxCommand=[1@dots{}10],<Pfad>
This command sets the 10 entries in the Arexx-Menu.
You specify the number and the path of the Arexx-Script.
ArexxCommand=1,"Rexx:Example.rexx"
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node CM_EXECMD, CM_LOADINCLUDE, CM_AREXXCMD , CM_MISC
@subsubsection ExecuteCommand=<File>
this command can set up a list of programs that should be
run before the debugged program's task is started.
This parameter only works with programs that are loaded by
the debugger. Furthermore you have to make sure that the
loaded programs have to @samp{end} otherwise the task
can't be started.
For example you could use these command to set breakpoints
with Arexx-Scripts.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node CM_LOADINCLUDE, CM_CLICK2FRONT, CM_EXECMD , CM_MISC
@subsubsection LoadInclude
tells the Debugger to load the structur information file
@samp{Barfly.Include}.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node CM_CLICK2FRONT, CM_CENTERW,CM_LOADINCLUDE, CM_MISC
@subsubsection ClicktoFront
activates the debugger's own @samp{ClicktoFront} handler.
This function should only be used if you don't use an
own @samp{Commodity} for this task.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node CM_CENTERW, CM_SCREENFRONT, CM_CLICK2FRONT , CM_MISC
@subsubsection CenterWindow
activates the centering mode for every stringrequester
windows.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node CM_SCREENFRONT, CM_OPENSCREEN, CM_CENTERW , CM_MISC
@subsubsection ScreenInFront
activates the @samp{ScreenToFront} mode that pops the screen
to front after every trace operation.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node CM_OPENSCREEN, CM_SCREENFONT, CM_SCREENFRONT , CM_MISC
@subsubsection OpenScreen[=width,height,depth,mode]
tells the debugger to open an own screen.
If you don't enter dimension parameters the wb screen
is cloned. You can use every screenmodes in the mode
string that you can see in the @samp{Prefs/ScreenMode}
requester.
This command has no function in local configuration files.
OPENSCREEN=1448,560,2,PAL:HighRes Interlace
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node CM_SCREENFONT, CM_QUIETEX, CM_OPENSCREEN , CM_MISC
@subsubsection ScreenFont=fontname/Height
defines a font for a debugger screen.
This command has no function in local configuration files.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node CM_QUIETEX, CM_DISXP, CM_SCREENFONT , CM_MISC
@subsubsection QuietException=Exception Nummer
masks off certain exceptions for the exception requester so
that only a @samp{DisplayBeep} is caused instead of a
textrequest.
With the value -1 you can mask off every exception and for
example with the value 4 you mask off the @samp{Illegal}
exception.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node CM_DISXP, CM_TRACEBREAK, CM_QUIETEX , CM_MISC
@subsubsection DisableXPointer
disactivate the Wait-Pointer.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node CM_TRACEBREAK, CM_CRASHEDTASK , CM_DISXP , CM_MISC
@subsubsection TraceBreak
tells the Debugger to use breakpoints in the @samp{Subroutine}
Traces instead of single steps.
The advantage is a speed up and the disadvantage is that
you can cause crashes while you step through resident/reentry
code.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node CM_CRASHEDTASK, CM_CATCHHIT, CM_TRACEBREAK , CM_MISC
@subsubsection CrashedTask
activates the @samp{CatchCrashedTask} mode.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node CM_CATCHHIT, CM_CACHEFILE, CM_CRASHEDTASK , CM_MISC
@subsubsection CatchEnforcerHit
activates the @samp{CatchEnforcerHit} mode.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node CM_CACHEFILE, CM_POPPATH, CM_CATCHHIT , CM_MISC
@subsubsection DoNotCacheFullFile
tells the Debugger not to cache program files while
reading the Symbol/Debug informationen to save memory.
Obviously the parsing speed will decrease.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node CM_POPPATH, CM_AUTOACT, CM_CACHEFILE , CM_MISC
@subsubsection DoNotPopPathRequest
tells the Debugger to ignore errors from opening source files
and not to open a path requester.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node CM_AUTOACT,CM_NOBREAKTERRORS , CM_POPPATH , CM_MISC
@subsubsection NoAutoStructAction
tells the debugger to open a type-requester by an
action in the StructurWindow.
@node CM_NOBREAKTERRORS, , CM_AUTOACT , CM_MISC
@subsubsection NoBreakpointErrors
tells the debugger to ignore SETBREAK= errors that
cause the debugger to always set an error on the
program start.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node UB_AREXX, UB_HOWTOUSE, UB_CONFIG , BDebugTop
@chapter Usage of BDebug
@section Arexx
@subsection Commands
@subsubsection SIMPLEREQUEST ''
@itemize
@item RC: -
@item result: 'OK'
@end itemize
@subsubsection TWOGADREQUEST ''
@itemize
@item RC: -
@item result: 'OK','FALSE'
@end itemize
@subsubsection TRIGADREQUEST ''
@itemize
@item RC: -
@item result: 'OK','FALSE','RESUME'
@end itemize
@subsubsection NEXT_ROOTWINDOW
@itemize
@item RC: -
@item result: 'OK','FALSE'
@end itemize
@subsubsection NEXT_SUBWINDOW
@itemize
@item RC: -
@item result: 'OK','FALSE'
@end itemize
@subsubsection FIRST_DISSWINDOW
@itemize
@item RC: -
@item result: 'OK','FALSE'
@end itemize
@subsubsection FIRST_MEMWINDOW
@itemize
@item RC: -
@item result: 'OK','FALSE'
@end itemize
@subsubsection FIRST_COPPWINDOW
@itemize
@item RC: -
@item result: 'OK','FALSE'
@end itemize
@subsubsection FIRST_FPUWINDOW
@itemize
@item RC: -
@item result: 'OK','FALSE'
@end itemize
@subsubsection FIRST_BREAKPOINTWINDOW
@itemize
@item RC: -
@item result: 'OK','FALSE'
@end itemize
@subsubsection FIRST_STRUCTWINDOW
@itemize
@item RC: -
@item result: 'OK','FALSE'
@end itemize
@subsubsection FIRST_SOURCEWINDOW
@itemize
@item RC: -
@item result: 'OK','FALSE'
@end itemize
@subsubsection FIRST_SNOOPWINDOW
@itemize
@item RC: -
@item result: 'OK','FALSE'
@end itemize
@subsubsection FIRST_WATCHWINDOW
@itemize
@item RC: -
@item result: 'OK','FALSE'
@end itemize
@subsubsection ACTIVATE_ROOTWINDOW
@itemize
@item RC: -
@item result: 'OK','FALSE'
@end itemize
@subsubsection ACTIVATE_SUBWINDOW
@itemize
@item RC: -
@item result: 'OK','FALSE'
@end itemize
@subsubsection OPEN_DISSWINDOW '@@REG' | 'Argument'
@itemize
@item RC: -
@item result: -
@end itemize
@subsubsection OPEN_MEMWINDOW '@@REG' | 'Argument'
@itemize
@item RC: -
@item result: -
@end itemize
@subsubsection OPEN_COPPWINDOW '@@REG' | 'Argument'
@itemize
@item RC: -
@item result: -
@end itemize
@subsubsection OPEN_SOURCEWINDOW '@@REG' | 'Argument'
@itemize
@item RC: -
@item result: -
@end itemize
@subsubsection OPEN_STRUCTWINDOW '@@REG' | 'Argument'
@itemize
@item RC: -
@item result: -
@end itemize
@subsubsection OPEN_BREAKPOINTWINDOW
@itemize
@item RC: -
@item result: -
@end itemize
@subsubsection OPEN_FPUWINDOW
@itemize
@item RC: -
@item result: -
@end itemize
@subsubsection OPEN_SNOOPMEMORYWINDOW
@itemize
@item RC: -
@item result: -
@end itemize
@subsubsection DOMENU 'Menu-String'
@itemize
@item RC: -
@item result: -
@end itemize
@subsubsection SET_BREAKPOINT 'Argument'
@itemize
@item RC: -
@item result: 'OK','FALSE'
@end itemize
@subsubsection CLEAR_ICACHE 'Address,Length'
@itemize
@item RC: -
@item result: 'OK'
@end itemize
@subsubsection CLEAR_ICACHE 'Address,Length'
@itemize
@item RC: -
@item result: 'OK'
@end itemize
@subsubsection GOTO_ADDRESS 'Address'
@itemize
@item RC: -
@item result: 'OK','FALSE'
@end itemize
@subsubsection CLEAR_ADDRESS
@itemize
@item RC: -
@item result: 'OK','FALSE'
@end itemize
@subsubsection LINK_REGISTER 'Register'
@itemize
@item RC: -
@item result: 'OK','FALSE'
@end itemize
@subsubsection SET_REGISTER 'Register,Value'
@itemize
@item RC: -
@item result: 'OK','FALSE'
@end itemize
@subsubsection Read_Byte 'Address'
RC : 0=Ok
Result: Result-String
@subsubsection Read_Word 'Address'
RC : 0=Ok
Result: Result-String
@subsubsection Read_Long 'Address'
RC : 0=Ok
Result: Result-String
@subsubsection Write_Byte 'Address,Value'
RC : 0=Ok
@subsubsection Write_Word 'Address,Value'
RC : 0=Ok
@subsubsection Write_Long 'Address,Value'
RC : 0=Ok
@subsubsection ASL_FileRequester_Save
RC : 0=Ok
Result: Filepath-String
@subsubsection ASL_FileRequester_Load
RC : 0=Ok
Result: Filepath-String
@subsubsection IS_ADDRESS_LEGAL 'Address'
@itemize
@item RC: -
@item result: 'OK','FALSE'
@end itemize
@subsubsection LOAD_BINARY 'Name,Destination,Length'
@subsubsection SAVE_BINARY 'Name,Source,Length'
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node UB_HOWTOUSE, , UB_AREXX, BDebugTop
@chapter Usage of BDebug
@section How to use BDebug ?
@subsection Problemanalysis
First you should be sure that all necessary configurations file
have been installed because without @samp{Barfly.FD} file you
don't see any function names in the disassembler window;
and without @samp{Barfly.Include} the @samp{StructWindow} is unusable.
Are these preconditions fullfilled you should analyse the problem
and anticipate how the Debugger can be used.
Because the debugging of programs depends heavily on the situation
i can only list some general points.
The reality probably looks different@dots{} as always:-)
Point of departure:
@itemize
@item Program from the CLI
@itemize
@item 1 Task
The program can be started by @samp{bdebug Program [Argument]} or
can be loaded the command window @samp{Debug File}.
By this method all symbol and debug files are loaded.
If the debugger can't find one source file you can
add additional paths if you haven't disabled this
function.
The standard breakpoint is the first command in the program.
Sometimes this uncomfortable and so you can set a different
start breakpoint for example to jump over the CStartup code
or to set it on an important program position.
@item Creates further Tasks
In this case you should be sure how you wanna catch the next
Task. You could catch the Task by @samp{Next Task} or compile
the program with an @samp{illegal} in the task and catch it
with @samp{Crashed Task}.
After you caught the task you probably would like to use
see symbole and debug source.
These Informationen can be loaded afterwards by using
@samp{Load Symbols}.
@end itemize
@item Program from the WB
In this case you should use @samp{Next Task} and then catch the
task @samp{WBL}. Afterwards you have to activate @samp{Next Task}
again and run @samp{WBL}. You could also use the @samp{illegal}
strategic.
After the right task was caught you can load the symbols
again.
@item Is it a Handler, Filesystem or something simular.
In this case you should use the @samp{illegal} strategic and
catch the task by @samp{Crashed Task}.
An alternative method would be to catch the waiting task
with @samp{Debug Task} and wait as long as the task gets
woken up by a signal.
@end itemize
After you've solved the first stage how you can controll the problem
task you should think about how the problem looks like and where
it could be located.
Problem Type:
@itemize
@item Enforcer
If an Enforcer Hit is caused Enforcer outputs the hit's program
address and mostly also the hunk offset.
You can now directly jump to the address by entering the address
in the DissWindow by @samp{Change Address} or you open a
HunkWindow, doubleclick on the hunk where the hit is located
and then enter the offset Enforcer showed.
The Debugger itself can also automaticly stop a debugged program
if a hit happens.
@item Mungwall
These hits aren't that easy to find as Enforcer hits because
Mungwall hits aren't showed when the problem happened but
only after a @samp{FreeMem}.
In this case you should remember the memoryblock where it happened
and determine where the responsible AllocMem is located in the
program, so you get an overview between what area the problem
is caused.
Now you should open a MemWindow that points to this certain
memory area and step through the program and look if
something changes the mungwall borders in the MemWindow.
Mungwall borders are before and after the allocated memory area.
If you're more experienced you could also use the WatchpointWindow
and set a watchpoint on the certain memory block.
@item Crash
If it's just an ordinary crash the error should be pretty
easy to find single stepping through the responsible code
area.
If it's a random crash you should be using @samp{Crashed Task}
and hope that the task can be caught.
After the task got caught you should check the instructions
that cause the crash. If the PC points to data fields that
don't look like real code the PC is probably set wrong by
a stack cleanup error.
In this case you should check the nexts addresses on the stack
if these point to legal program code.
@item Sideeffects and mysterious
These bugs are the worst to find and there's no general
strategic how to find them. In these cases only intuition
and patience can help.
@end itemize
@subsection Problems that can happen
@itemize
@item Why does the Debugger react so slow on keyboard commands that controll the tracing ?
This happens if you debug a task with a higher priority
as the debugger's priority.
For example. DOS-Handler.
Workaround is to higher the priority of the debugger.
@item Why does the Debugger blockate by opening the filerequester.
This happens when you debug a handler, because the filerequester
normally tests every handler with a IsFilesystem(). When
you debug a handler it can't reply the IsFilesystem packet
and therefore the filerequester is busy.
@item If you debug the following program on a 68040 with 68040.library
the instruction @samp{rts} is run if you cause a Single-Step
on the instruction @samp{fetox}.
Because this command isn't implemented in the 68040 the 68040.library
has to emulate it. It seems to forget the tracebit.
@example
mc68040
fmove.x #1.3,fp0
fmove.x #255,fp1
fetox.x fp0,fp1
rts
@end example
@item If a program doesn't return from a DOS funktion you could accidently entered a char in shell window.
@end itemize
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node BAsmTop, ASoft, BDebugTop,top
@center BAsm 1.0
@center A cli/arexx controlled Assembler
@center Copyright (c) 1989-94 Ralph Schmidt
@center - Shareware -
@menu
Using BAsm@dots{}
* The Assembler:UA_ASSEMBLER. Some comments about the Assembler
* Syntax:UA_SYNTAX. Syntax Description
* Datatypes:UA_DATATYPES. Datatype formats
* Operations:UA_OPERATIONS. Datatype Operations
* Instructions:UA_INST. Assembler Instructions
* Macros:UA_MACROS. Assembler Basic Macros
* Highlevel Macros:UA_HMACROS. Assembler Highlevel Macros
* Defined Symbols:UA_SYMBOLS. Predefined Symbols
* Optimizing:UA_OPTIMIZING. Optimize Methods
* Includes:UA_PRE. Precompiled Includes and database
* CLI:UA_CLI. Assembler CLI Convention
* ARexx:UA_AREXX. ARexx Interface
* Compatibility:UA_COMP. Compatibility to other Assemblers
Addendum@dots{}
* Literature:UA_LITERATURE. Amiga Literature
* Software:UA_SOFTWARE. Amiga Software
* Addressmodes:UA_EA. Address Modes
* Opcodes:UA_OPCODES. 68xxx Opcodes
@end menu
@node UA_ASSEMBLER, UA_SYNTAX, , BAsmTop
@chapter The Assembler
The assembler understands the commands and addressmodes from the 68000
through the 68060 and both the Floating-Point Units, 68881 and
68882.
It supports only the 68851 MMU commands, which are also supported by
the 68030.
The assembler achieves it's speed by translating the source in a single
pass, followed by a backpatch phase which corrects all unresolved
references.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node UA_SYNTAX, UA_DATATYPES, UA_ASSEMBLER , BAsmTop
@section Syntax
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@subsection Comments
A comment can start in several different ways.
In a pure comment it starts either with a @key{;} or @key{*}.
A comment can only be started after an assembler command or symbol with
a @key{;} if an assembler command or symbol exists within that line.
@example
;A comment
*A comment
move.l a0,a0 ;A comment
@end example
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@subsection Opcode/Instructions arrangement
@samp{[label[:]] [opcode] [operand[, operand[, operand@dots{}]]]]]}
@itemize
@item Opcodes
An Opcode can be a Motorola Mnemonic, an assembler command, or
a Macro call.
@item Operations
In a Motorola mnemonic operands are based on legal addressmoes;
in assembler privat instructions the parameters depend on the
instruction.
@end itemize
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@subsection Symbol structure
A symbol can represent the following types:
@itemize
@item Value
@item Program Counter
@item Register
@item Register List
@item Macro
@end itemize
Symbols can only be defined once. The exceptions are
local labels and symbols defined by @key{Set}.
@center Structure rules for Symbols.
@itemize
@item The first letter of a symbol can be one of the following:
@key{a}@dots{}@key{z}, @key{A}@dots{}@key{Z}, @key{_},
@key{@@} , @key{.} und @key{\}.
@item From the second letter on, the symbol can contain the following
letters: @key{a}@dots{}@key{z},@key{A}@dots{}@key{Z},@key{0}@dots{}@key{9},
@key{_},@key{@@} und @key{.}.
@item If a symbol consists of only numbers and ends with @key{$}, then it
is a numerical local label.
@item A symbol is ended by an illegal letter.
@item If a symbol begins with a @key{.} or @key{\\}, then it is a local label.
@item A macro symbol should not contain a @key{.}.
@item To avoid a conflict, a symbol should not end with @key{.b},@key{.w}
or @key{.l}.
@end itemize
@example
ThisIsALabel ;That is a normal label
ThisIsALabel1.loop: ;That is a normal label
This@@_Is_@@A_@@Label
1$: ;That is a numerical local label
.ThisIsALabel ;That is a local label
.ThisIsALael1: ;That is a local label
\\ThisIsALabel.loop: ;That is a local label
ThisIsASymbol=10
ThisIsASymbol = 10
ThisIsASymbol equ 10
@end example
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@subsection The relative label
This symbol represents an offset to the start of a program.
@example
label
label:
label nop
label: nop
@end example
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@subsection The local Label
A local label is only valid between two normal relative labels, thus you
cannot reference local labels outside of that scope.
Otherwise it works simular as a normal label.
There are 2 different prefixes that introduce a local label:
@key{.} and @key{\\} that define 2 different local labels.
A special case is the Backward Reference Label that is introduced
with @key{..}. It doesn't depend on a certain define area between
normal labels thus you can only access the symbol if it were defined
earlier.
@example
..:
label_0:
.local:
bra.s .local
label_1:
.local:
bra.s \local
\local:
nop
label_end:
..:
dbra d0,..
..:
dbra d1,..
..Hello:
dbra d1,..Hello
@end example
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@subsection The local numerical label
Addionally to the non-numerical local label there are also
the numerical labels which are based of 4 digits with the
postfix @key{$}.
@key{BASM} handles the number as a hash key with the consequence
that there's no difference between @key{001$} and @key{1$}.
@example
label_0:
123$: nop
label_1:
123$: nop
@end example
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@subsection The absolute Symbol
The absolute symbol is defined by a direct value initializing that
is initiated by @key{=}, @key{equ} or @key{set}.
If you define a symbol by @key{set} you can change it as often as
needed.
@example
value1=2
value2 equ value1*2
value3 set value2
@end example
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@subsection The Register Symbol
The register symbol is defined by @samp{equr} or @samp{fequr} that
is used for FPU registers.
@example
Ptr equr a1
PI fequr fp2
move.l (Ptr),d0 ;move.l (a1),d0
fmove.x PI,fp0 ;fmove.x fp2,fp0
@end example
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@subsection The Register List Symbol
The register list symbol is defined by @samp{reg} and represents the
register mask for @samp{Movem} and @samp{fmovem}.
You must not mix FPU and Integer registers with each other
in a register list.
@example
mask reg d0/d2/d4-d7/a0-a4/a6-a7
mask1 reg d0-a6
fmask reg fp0-fp2/fp4-fp5
@end example
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@subsection The Macro Symbol
By using the command @samp{macro} or @samp{cmacro} after the symbol, the
symbol is defined as a macro.
The macro block is terminated by the command @key{endm}.
The Macro @key{cmacro} is case-insensitive and therefore
useful to emulate commands that are missing from the core.
@example
Symbol[:] macro
.
.
Symbol[:] endm
@end example
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node UA_DATATYPES, UA_OPERATIONS, UA_SYNTAX, BAsmTop
@subsection Datatypes
The assembler understands 3 distinct datatypes.
@itemize
@item 32Bit Integer
@item 96Bit Extended Floating Point
@item 96Bit Packed Binary Floating Point
@end itemize
At the moment only integer datatypes are supported in arithmetic arguments
so you can only use the FPU datatypes as constants.
@example
+-------------+--------------------+
| Format | Representation |
+-------------+--------------------+
+-------------+--------------------+
| Decimal | 1024 |
+-------------+--------------------+
| Hexadecimal | $400 |
+-------------+--------------------+
| Binary | %10000000000 |
+-------------+--------------------+
| Ascii | "OK", 'OK' or `OK` |
+-------------+--------------------+
@end example
Furthermore you can use symbols or the character `*' that represents
the program counter in arguments.
There are limitation in the use of symbols in arguments.
For example you can only add or subtract constants from an external label,
Floatingpoint Values can only be used as simple constants,@dots{}
By the postfix `k' after decimal value the value is multply by $1000.
@center @samp{Floating Point Format}
@example
+-------------+-------------------------------------+
| Format | Representation |
+-------------+-------------------------------------+
+-------------+-------------------------------------+
| Extended | '[+,-]3. 145637848298628[e[+,-]123] |
+-------------+-------------------------------------+
| Packed | ''[+,-]3. 145637848298628[e[+,-]123]|
+-------------+-------------------------------------+
@end example
@subsection Datatype Conversion
All commands are performed with these 3 datatypes and then converted into
the required datatype.
For example a 32Bit integer can be converted into 16Bit and 8 Bit;
an extended floating point into a double or single floating point.
Floating point datatypes are rounded by a convertation.
If a rouding error occurs the parser returns with an error.
@subsection Datatype Format
@center Internal Datatype Structure
@itemize
@item Integer
@end itemize
@example
+--------+---------+
| Bit 31 | 30..0 |
+--------+---------+
+--------+---------+
| S | Integer |
+--------+---------+
@end example
@itemize
@item Single Floating Point
@end itemize
@example
+--------+-----------------+------------+
| Bit 31 | Bits 30..23 | Bits 22..0 |
+--------+-----------------+------------+
+--------+-----------------+------------+
| Sign | Biased Exponent | Fraction |
+--------+-----------------+------------+
@end example
@itemize
@item Double Floating Point
@end itemize
@example
+--------+-----------------+------------+
| Bit 63 | Bits 62..52 | Bits 51..0 |
+--------+-----------------+------------+
+--------+-----------------+------------+
| Sign | Biased Exponent | Fraction |
+--------+-----------------+------------+
@end example
@itemize
@item Extended Floating Point
@end itemize
@example
+--------+-----------------+------------+
| Bit 95 | Bits 94..80 | Bits 62..0 |
+--------+-----------------+------------+
+--------+-----------------+------------+
| Sign | Biased Exponent | Mantisse |
+--------+-----------------+------------+
@end example
@itemize
@item Packed Binary Floating Point
@end itemize
@example
+------+------+------+------+------+------+------+------+
| MEYY | EXP2 | EXP1 | EXP0 | EXP3 | 0000 | 0000 | M016 |
+------+------+------+------+------+------+------+------+
| M015 | M014 | M013 | M012 | M011 | M010 | M009 | M008 |
+------+------+------+------+------+------+------+------+
| M007 | M006 | M005 | M004 | M003 | M002 | M001 | M000 |
+------+------+------+------+------+------+------+------+
@end example
@itemize
@item M is the sign (+ or -) of the fraction
@item E is the sign (+ or -) of the exponent
@item Y are the internal flags for infinity and NAN
@item E002-000 are the numbers of the exponent from 2 to 0, EXP3 is
used internally.
@item M016-000 are the numbers of the fraction from 16 to 0. Each
number lies in the range from 0 to 9..
@end itemize
@node UA_OPERATIONS, UA_INST, UA_DATATYPES, BAsmTop
@subsection Operations
@subsection Operators
@example
+----------+-------------------------------+
| Operator | Function |
+----------+-------------------------------+
+----------+-------------------------------+
| `+' | 32Bit signed Addition |
+----------+-------------------------------+
| `-' | 32Bit signed Subtraction |
+----------+-------------------------------+
| `*' | 32Bit signed Multiplication |
+----------+-------------------------------+
| `/' | 32Bit signed Division |
+----------+-------------------------------+
| '|' | 32Bit Or |
+----------+-------------------------------+
| `!' | 32Bit Or |
+----------+-------------------------------+
| `&' | 32Bit And |
+----------+-------------------------------+
| `^' | 32Bit Eor |
+----------+-------------------------------+
| `<<' | logic 32Bit Shift to the left |
+----------+-------------------------------+
| `>>' | logic 32Bit Shift to the right|
+----------+-------------------------------+
| `~' | 32Bit Not |
+----------+-------------------------------+
@end example
@quotation
Basm cares for the operator priorities but be careful
while porting Seka Sources because Seka doesn't care
for the priorities.
@end quotation
@subsection Functions
The following functions are supported.
@itemize
@item _bitnum(Argument) calculates the bit number of the argument. If this is impossible an error occurs.
@item _bitfield(Argument) calculates the bit mask of the argument. If this is impossible an error occurs.
@item _extb(Argument) equal to the 680xx command @key{extb}
@item _extw(Argument) equal to the 680xx command @key{extw}
@item _min(Argument[,Argument,@dots{}]) calculate the minimum of the argument.
@item _max(Argument[,Argument,@dots{}]) calculate the maximum of the argument.
@end itemize
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node UA_INST, UA_MACROS, UA_OPERATIONS, BAsmTop
@section Assembler Commands
@menu
Instruction Groups@dots{}
* Hunk/Link Instructions:AI_HUNK.
* Symbol Instructions:AI_SYMBOL.
* Data Instructions:AI_DATA.
* Listing Instructions:AI_LISTING.
* Structure Instructions:AI_STRUCTURE.
* File I/O Instructions:AI_FILE.
* Misc Instructions:AI_MISC.
* 68xxx Meta Instructions:AI_META.
@end menu
@node AI_HUNK, AI_SYMBOL, , UA_INST
@subsection Hunk/Link Commands
@menu
* Section:HU_SECTION.
* Code:HU_CODE.
* Data:HU_DATA.
* BSS:HU_BSS.
* CSEG:HU_CSEG.
* DSEG:HU_DSEG.
* IDNT:HU_IDNT.
* Identify:HU_IDENTIFY.
* Smalldata:HU_SMALLDATA.
* XRef:HU_XREF.
* XDef:HU_XDEF.
* Global:HU_GLOBAL.
* Public:HU_PUBLIC.
* Output:HU_OUTPUT.
* Objfile:HU_OBJFILE.
* Exeobj:HU_EXEOBJ.
* Linkobj:HU_LINKOBJ.
* Org:HU_ORG.
* Addsym:HU_ADDSYM.
* Debug:HU_DEBUG.
@end menu
@node HU_SECTION, HU_CODE, , AI_HUNK
@subsubsection [Label] section Name[,Typ[,[RelocModus,Memtyp]
defines a new logical unit so that the DOS-Loader has
the opportuntity to place smaller hunks into free memory
blocks.
Another use for this command is to set different memory
types for the hunk to load gfx data into the chipmem.
If you don't specify the section type it assumes
@key{"",Code,Public}.
@itemize
@item Name = Hunkname
@item Hunk type
@table @samp
@item CODE
starts a code segment.
@item DATA
starts a data segment.
@item BSS
starts an undefined data segment.
@item DEBUG
starts a custom debug segment.
@item CUSTOM
starts a Custom-Hunk area.
@end table
@item Reloc-Mode defines the width of the hunk relocation. Default 32Bit
@table @samp
@item RELOC16
sets the reloc width to 16bit.(V37)
@item RELOC32
sets the reloc width to 32bit.(Default)
@end table
@item Memtype defines the memory attributes of the hunk.
If you add a @samp{_p}, @samp{_c}, or @samp{_f} upon the type parameter,
you cannot use more memtypes.The memtype @samp{DEBUG} does not allow memory attribute suffixes.
@table @samp
@item PUBLIC
loads the hunk into the memory with the highest priority. Code Suffix @key{_p}.
@item CHIP
loads the hunk into chip memory. Code Suffix @key{_c}.
@item FAST
loads the hunk into fast memory. Code Suffix @key{_f}.
@item ADVISORY
ignores the hunk if the OS doesn't understand the type. A kind of Debug-Hunk that can be used by the OS.(V39)
@item ATTR=?
loads the hunk into the memory with specified memory attributs. (V37)
@end table
@end itemize
@node HU_CODE, HU_DATA, HU_SECTION, AI_HUNK
@subsubsection [Label] code [Name[, Memtyp]]
defines a new code hunk and is equivalent to the command @samp{section ?,code,?}.
@itemize
@item Name = Hunkname
@item Memtype defines the memory attributes for the hunk.
@table @samp
@item PUBLIC
loads the hunk into the memory with the highest priority. Code Suffix @key{_p}.
@item CHIP
loads the hunk into chip memory. Code Suffix @key{_c}.
@item FAST
loads the hunk into fast memory. Code Suffix @key{_f}.
@item ADVISORY
ignores the hunk if the OS doesn't understand the type. A kind of Debug-Hunk that can be used by the OS.(V39)
@item ATTR=?
loads the hunk into the memory with specified memory attributs. (V37)
@end table
@end itemize
@node HU_DATA, HU_BSS, HU_CODE, AI_HUNK
@subsubsection [Label] data [Name[, Memtyp]]
defines a new data hunk and is equivalent to the command @samp{section ?,data,?}.
@itemize
@item Name = Hunkname
@item Memtype defines the memory attributes for the hunk.
@table @samp
@item PUBLIC
loads the hunk into the memory with the highest priority. Code Suffix @key{_p}.
@item CHIP
loads the hunk into chip memory. Code Suffix @key{_c}.
@item FAST
loads the hunk into fast memory. Code Suffix @key{_f}.
@item ADVISORY
ignores the hunk if the OS doesn't understand the type. A kind of Debug-Hunk that can be used by the OS.(V39)
@item ATTR=?
loads the hunk into the memory with specified memory attributs. (V37)
@end table
@end itemize
@node HU_BSS, HU_CSEG, HU_DATA, AI_HUNK
@subsubsection [Label] bss [Name[, Memtyp]]
defines a new BSS hunk and is equivalent to the command @samp{section ?,bss,?}.
@itemize
@item Name = Hunkname
@item Memtype defines the memory attributes for the hunk.
@table @samp
@item PUBLIC
loads the hunk into the memory with the highest priority. Code Suffix @key{_p}.
@item CHIP
loads the hunk into chip memory. Code Suffix @key{_c}.
@item FAST
loads the hunk into fast memory. Code Suffix @key{_f}.
@item ADVISORY
ignores the hunk if the OS doesn't understand the type. A kind of Debug-Hunk that can be used by the OS.(V39)
@item ATTR=?
loads the hunk into the memory with specified memory attributs. (V37)
@end table
@end itemize
@node HU_CSEG, HU_DSEG, HU_BSS, AI_HUNK
@subsubsection [Label] cseg [Name[, Memtyp]]
has the same function as the command @samp{code}.
@node HU_DSEG, HU_IDNT, HU_CSEG, AI_HUNK
@subsubsection [Label] dseg [Name[, Memtyp]]
has the same function as the command @samp{data}.
@node HU_IDNT, HU_IDENTIFY, HU_DSEG, AI_HUNK
@subsubsection idnt Name
defines the name of the @samp{HUNK_UNIT} hunk in the object file.
@itemize
@item Name = Hunkname
@end itemize
@node HU_IDENTIFY, HU_SMALLDATA, HU_IDNT, AI_HUNK
@subsubsection identify Name
defines the name of the actual hunk.
@itemize
@item Name = Hunkname
@end itemize
@node HU_SMALLDATA, HU_XREF, HU_IDENTIFY, AI_HUNK
@subsubsection smalldata [Register]
activates the smalldata mode for the hunk.
Optionally, you can also define the smalldata register.
Default register is @samp{A4}.
The program itself must initialize the smalldata register
with the address of the smalldata data hunk.
@example
bopt w2- ;68020 Addressmode warnings off
mc68020 ;68020 mode activated
smalldata a3 ;Default is A4!!!
xref _LinkerDB ;Special linker symbol
lea.l _LinkerDB,a3 ;Address of the smalldata data segments
move.l #0,(d_test.l,a3)
move.l #"TEST",d_test(a3)
moveq #0,d0
tst.b array(a3,d0.w)
rts
section "__MERGED",BSS ;The smalldata data segments are defined
;the following way
d_test:
ds.l 1
array:
ds.b 20
@end example
@node HU_XREF, HU_XDEF, HU_SMALLDATA, AI_HUNK
@subsubsection xref Symbol[, Symbol@dots{}]
imports a symbol so that you can access symbols that
were exported by @key{XDef}.
The linker resolves these reference during the link
process and creates a program file.
If the assembler finds a @key{XRef} in the source
it creates an object file. This decision can be overruled.
@itemize
@item Symbol = Name of the importet symbol.
@end itemize
@node HU_XDEF, HU_GLOBAL, HU_XREF, AI_HUNK
@subsubsection xdef Symbol[, Symbol@dots{}]
exports a symbol as global so that other object files can
import the symbol by @key{XRef}.
There's no need to define a symbol before you mark them
with @key{XDef}. If the assembler finds a @key{XRef} in the
source it creates an object file. This decision can be overruled.
@itemize
@item Symbol = Name of the global symbol
@end itemize
@node HU_GLOBAL, HU_PUBLIC, HU_XDEF, AI_HUNK
@subsubsection global Symbol[, Symbol@dots{}]
has the same function like @key{XDef}.
@node HU_PUBLIC, HU_OUTPUT, HU_GLOBAL, AI_HUNK
@subsubsection public Symbol[, Symbol@dots{}]
has the same function like @key{XDef}.
@node HU_OUTPUT, HU_OBJFILE, HU_PUBLIC, AI_HUNK
@subsubsection output Name
sets an output filename.
If you don't specify a filename the assembler uses the source
filename and adds the appropriate filetype suffix.
@itemize
@item Name = Filename
@end itemize
@node HU_OBJFILE, HU_EXEOBJ, HU_OUTPUT, AI_HUNK
@subsubsection objfile
has the same function like @key{Output}.
@node HU_EXEOBJ, HU_LINKOBJ, HU_OBJFILE, AI_HUNK
@subsubsection exeobj
writes a program file if you wanna overrule the assembler.
@node HU_LINKOBJ, HU_ORG, HU_EXEOBJ, AI_HUNK
@subsubsection linkobj
writes an object file if you wanna overrule the assembler.
@node HU_ORG, HU_ADDSYM, HU_LINKOBJ, AI_HUNK
@subsubsection org Address
activates the absolute mode.
All command that refer to hunk related functions aren't allowed.
For example:. @key{section}, @key{xdef}, @key{xref}.
The parameter address sets the base address of the created code.
@itemize
@item Address = Absolute Address
@end itemize
@node HU_ADDSYM, HU_DEBUG, HU_ORG, AI_HUNK
@subsubsection addsym
writes a symbol hunk.
@node HU_DEBUG, , HU_ADDSYM, AI_HUNK
@subsubsection debug
writes a SAS D1 debug hunk to see source level
informations while debugging the program through bdebug.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node AI_SYMBOL, AI_DATA, AI_HUNK, UA_INST
@subsection Symbol Commands
@menu
* RS:SY_RS.
* SO:SY_SO.
* FO:SY_FO.
* RSReset:SY_RSRESET.
* RSSet:SY_RSSET.
* Clrso:SY_CLRSO.
* Clrfo:SY_CLRFO.
* Setso:SY_SETSO.
* Setrs:SY_SETRS.
* Setfo:SY_SETFO.
* RSVal:SY_RSVAL.
* SOVal:SY_SOVAL.
* FOVal:SY_FOVAL.
@end menu
@node SY_RS, SY_SO, , AI_SYMBOL
@subsubsection Symbol rs.[width] Count
initializes the Symbol with the value of the counter __RS
and increases the __RS counter afterwards by Count*Width.
You can use this command as a replacement for the include
@key{exec/types.i} macros to increase the parsing speed.
@itemize
@item Width
@table @samp
@item B
1 Byte Valuearea: -$80 <= x < $100
@item W
2 Bytes Valuearea: -$8000 <= x < $10000
@item L
4 Bytes Valuearea: -$80000000 <= x < $10000000
@item S
4 Bytes (Single IEEE-Float)
@item D
8 Bytes (Double IEEE-Float)
@item X
12 Bytes (Extended IEEE-Float)
@item P
12 Bytes (Packed BCD-Float)
@item P
16 Bytes (Quadword)
@end table
@end itemize
@node SY_SO, SY_FO, SY_RS, AI_SYMBOL
@subsubsection Symbol so.[width] Count
This command has the same function like @key{rs} with the
exception that the Symbol __SO is used instead of the
__RS symbol.
Internally both symbols are handled equal.
Devpac has introduced the symbol __RS and Macro68k
knows the functionality by the name __SO.
@node SY_FO, SY_RSRESET, SY_SO, AI_SYMBOL
@subsubsection Symbol fo.[width] Count
decreases the counter __FO by Count*Width and initializes
the Symbol with the new value.
Useful to create the negative local stackframe symbols
needed by @key{link}.
@itemize
@item Width
@table @samp
@item B
1 Byte Valuearea: -$80 <= x < $100
@item W
2 Bytes Valuearea: -$8000 <= x < $10000
@item L
4 Bytes Valuearea: -$80000000 <= x < $10000000
@item S
4 Bytes (Single IEEE-Float)
@item D
8 Bytes (Double IEEE-Float)
@item X
12 Bytes (Extended IEEE-Float)
@item P
12 Bytes (Packed BCD-Float)
@item P
16 Bytes (Quadword)
@end table
@end itemize
@node SY_RSRESET, SY_RSSET, SY_FO, AI_SYMBOL
@subsubsection rsreset
initializes the counter __RS to 0.
@node SY_RSSET, SY_CLRSO, SY_RSRESET, AI_SYMBOL
@subsubsection rsset Value
initializes the counter __RS with the Value
@itemize
@item Value = New Index
@end itemize
@node SY_CLRSO, SY_CLRFO, SY_RSSET, AI_SYMBOL
@subsubsection clrso
has the same function like @key{rsreset}
@node SY_CLRFO, SY_SETSO, SY_CLRSO, AI_SYMBOL
@subsubsection clrfo
has the same function like @key{foreset}.
@node SY_SETSO, SY_SETRS, SY_CLRFO, AI_SYMBOL
@subsubsection setso Value
has the same function like @key{rsset}
@node SY_SETRS, SY_SETFO, SY_SETSO, AI_SYMBOL
@subsubsection setrs Value
has the same function like @key{rsset}
@node SY_SETFO, SY_RSVAL, SY_SETRS, AI_SYMBOL
@subsubsection setfo Value
initializes the counter __FO with the Value
@itemize
@item Value = New Index
@end itemize
@node SY_RSVAL,SY_SOVAL, SY_SETFO, AI_SYMBOL
@subsubsection Symbol rsval
initializes the Symbol with the value of the __RS counter.
@node SY_SOVAL,SY_FOVAL, SY_RSVAL, AI_SYMBOL
@subsubsection Symbol soval
has the same function like @key{rsval}.
@node SY_FOVAL,, SY_SOVAL, AI_SYMBOL
@subsubsection Symbol foval
initializes the Symbol with the value of the __FO counter.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node AI_DATA, AI_LISTING, AI_SYMBOL, UA_INST
@subsection Data Commands
@menu
* Align:DA_ALIGN.
* CNop:DA_CNOP.
* Pad:DA_PAD.
* Quad:DA_QUAD.
* Even:DA_EVEN.
* Odd:DA_ODD.
* DC:DA_DC.
* DB:DA_DB.
* DW:DA_DW.
* DL:DA_DL.
* UB:DA_UB.
* UW:DA_UW.
* UL:DA_UL.
* SB:DA_SB.
* SW:DA_SW.
* SL:DA_SL.
* PB:DA_PB.
* PW:DA_PW.
* PL:DA_PL.
* NB:DA_NB.
* NW:DA_NW.
* NL:DA_NL.
* DS:DA_DS.
* DSB:DA_DSB.
* Blk:DA_BLK.
* Ascii:DA_ASCII.
* CString:DA_CSTRING.
* DString:DA_DSTRING.
* PString:DA_PSTRING.
* IString:DA_ISTRING.
* Bitstream:DA_BITSTREAM.
* SPrintx:DA_SPRINTX.
@end menu
@node DA_ALIGN, DA_CNOP, , AI_DATA
@subsubsection align Value
aligns the program counter to an address that can be devided by
the value.
Useful because certain DOS structures have to be aligned on
4 Byte boundaries. For example @key{FileInfoBlock}.
Furthermore it's also useful to align subroutines on longword
boundaries that they fit better into the cache structure.
@itemize
@item Value = Align Mask
@end itemize
@node DA_CNOP, DA_PAD, DA_ALIGN, AI_DATA
@subsubsection cnop Offset,Align
aligns the program counter to an address that can be devided by
the Align value and adds the value onto the address.
Internally only Align values < 16 are supported.
@node DA_PAD, DA_QUAD, DA_CNOP, AI_DATA
@subsubsection pad.Width Align[,Value]
aligns the program counter to an address that can be devided by
the Align*Width and fills the aligned area by the optional mask
value.
@node DA_QUAD, DA_EVEN, DA_PAD, AI_DATA
@subsubsection quad
aligns the program counter to a 16 Byte address.
@node DA_EVEN, DA_ODD, DA_QUAD, AI_DATA
@subsubsection even
aligns the program counter to an even address.
This function is useful if you define an odd sized
data area and you need a word aligned for OS
data structures or assembler instructions.
@node DA_ODD, DA_DC, DA_EVEN, AI_DATA
@subsubsection odd
aligns the program counter to an odd address.
@node DA_DC, DA_DB, DA_ODD, AI_DATA
@subsubsection dc.[width] Value[,Value@dots{}]
inserts data of the Width into the code.
@itemize
@item Width
@table @samp
@item B
1 Byte Valuearea: -$80 <= x < $100
@item W
2 Bytes Valuearea: -$8000 <= x < $10000
@item L
4 Bytes Valuearea: -$80000000 <= x < $10000000
@item S
4 Bytes (Single IEEE-Float)
@item D
8 Bytes (Double IEEE-Float)
@item X
12 Bytes (Extended IEEE-Float)
@item P
12 Bytes (Packed BCD-Float)
@end table
@end itemize
@node DA_DB, DA_DW, DA_DC, AI_DATA
@subsubsection db Value[,Value,@dots{}]
inserts a byte with a value in the valuearea
-$80 <= x < $100.
@node DA_DW, DA_DL, DA_DB, AI_DATA
@subsubsection dw Value[,Value,@dots{}]
inserts a word with a value in the valuearea
-$8000 <= x < $10000.
@node DA_DL, DA_UB, DA_DW, AI_DATA
@subsubsection dl Value[,Value,@dots{}]
inserts a longword with a value in the valuearea
-$80000000 <= x < $100000000.
@node DA_UB, DA_UW, DA_DL, AI_DATA
@subsubsection ub Value[,Value,@dots{}]
inserts a byte with a value in the valuearea
-$80 <= x < $80.
@node DA_UW, DA_UL, DA_UB, AI_DATA
@subsubsection uw Value[,Value,@dots{}]
inserts a word with a value in the valuearea
-$8000 <= x < $8000.
@node DA_UL, DA_SB, DA_UW, AI_DATA
@subsubsection ul Value[,Value,@dots{}]
inserts a longword with a value in the valuearea
-$80000000 <= x < $80000000.
@node DA_SB, DA_SW, DA_UL, AI_DATA
@subsubsection sb Value[,Value,@dots{}]
inserts a byte with a value in the valuearea
-$80 <= x < $100.
@node DA_SW, DA_SL, DA_SB, AI_DATA
@subsubsection sw Value[,Value,@dots{}]
inserts a word with a value in the valuearea
-$8000 <= x < $10000.
@node DA_SL, DA_PB, DA_SW, AI_DATA
@subsubsection sl Value[,Value,@dots{}]
inserts a longword with a value in the valuearea
-$80000000 <= x < $100000000.
@node DA_PB, DA_PW, DA_SL, AI_DATA
@subsubsection pb Value[,Value,@dots{}]
inserts a byte with a value in the valuearea
0 <= x < $80.
@node DA_PW, DA_PL, DA_PB, AI_DATA
@subsubsection pw Value[,Value,@dots{}]
inserts a word with a value in the valuearea
0 <= x < $8000.
@node DA_PL, DA_NB, DA_PW, AI_DATA
@subsubsection pl Value[,Value,@dots{}]
inserts a longword with a value in the valuearea
0 <= x < $80000000.
@node DA_NB, DA_NW, DA_PL, AI_DATA
@subsubsection nb Value[,Value,@dots{}]
inserts a byte with a value in the valuearea
-$80 <= x < 0.
@node DA_NW, DA_NL, DA_NB, AI_DATA
@subsubsection nw Value[,Value,@dots{}]
inserts a word with a value in the valuearea
-$8000 <= x < 0.
@node DA_NL, DA_DS, DA_NW, AI_DATA
@subsubsection nl Value[,Value,@dots{}]
inserts a longword with a value in the valuearea
-$80000000 <= x < 0.
@node DA_DS, DA_DSB, DA_NL, AI_DATA
@subsubsection ds.[width] Count[,Value]
defines a memory area with the length Count *
Width and fills the area with an optional Value.
Default fill value is 0.
Is the Count 0 a @key{cnop 0,Width} is run.
@itemize
@item Width
@table @samp
@item B
1 Byte Valuearea: -$80 <= x < $100
@item W
2 Bytes Valuearea: -$8000 <= x < $10000
@item L
4 Bytes Valuearea: -$80000000 <= x < $10000000
@item S
4 Bytes (Single IEEE-Float)
@item D
8 Bytes (Double IEEE-Float)
@item X
12 Bytes (Extended IEEE-Float)
@item P
12 Bytes (Packed BCD-Float)
@end table
@item Count = Length of the memory area.
@item Value = optional Fill Value.
@end itemize
@node DA_DSB, DA_BLK, DA_DS, AI_DATA
@subsubsection dsb.[width] Count[,Value]
has the same function like @key{ds}
@node DA_BLK, DA_ASCII, DA_DSB, AI_DATA
@subsubsection blk.[width] Count[,Value@dots{}]
has the same function like @key{ds}
@node DA_ASCII, DA_CSTRING, DA_BLK, AI_DATA
@subsubsection ascii String1[,String2,@dots{}]
inserts Strings.
@node DA_CSTRING, DA_DSTRING, DA_ASCII, AI_DATA
@subsubsection cstring String1[,String2,@dots{}]
inserts C-Strings.
@node DA_DSTRING, DA_PSTRING, DA_CSTRING, AI_DATA
@subsubsection dstring dtype1,dtype2,dtype3
inserts the current date string.
@center Datentypen
@itemize
@item "w" WeekDay
@item "d" Date
@item "t" Time
@end itemize
@example
dc.b " ("
dstring w,d,t
dc.b ")"
dc.b $a,$d,0
;=> (Thursday 14-Okt-93 15:32:06)
@end example
@node DA_PSTRING, DA_ISTRING, DA_DSTRING, AI_DATA
@subsubsection pstring String[,String,@dots{}]
inserts a BCPL string.
@node DA_ISTRING, DA_BITSTREAM, DA_PSTRING, AI_DATA
@subsubsection istring String[,String,@dots{}]
inserts strings that terminate with a char that has Bit 7 set.
@node DA_BITSTREAM, DA_SPRINTX, DA_ISTRING, AI_DATA
@subsubsection bitstream Mask
inserts a bitmask for an image object for example.
The bits are aligned to bytes.
@itemize
@item Mask = Mask is a string that is based only of @key{0} and @key{1}.
@end itemize
@example
bitstream "01001000001"
@end example
@node DA_SPRINTX, , DA_BITSTREAM, AI_DATA
@subsubsection sprintx "Formatstring"[,Value[,...]]
inserts the resulting string into the code.
The string isn't terminated by a 0 so that you can add
other strings rather easy.
@itemize
@item FormatString - is a string in C-Notation so you can
use the known C char types n,t,@dots{}
The following options are allowed.
@item FormatSyntax - %[flags][width][.limit][length]type
@itemize
@item @key{flags} - '-' disactivates left side layout.
@item @key{width} - Field Length. If the first char is '0' the field
is filled by '0' on the left side.
@item @key{limit} - defines the maximal count of char that can be inserted
from a string. Only legal for %s and %b.
@item @key{length} - The size of the datatype. Default is 16-bit for the
typs %d,%u and %x. %l is long (32Bit).
@item @key{type} - The following types are supported.
b - BSTR, a 32-bit BPTR Pointer on a bytelength
string.
A NULL BPTR is handled like an empty string.
d - signed decimal
u - unsigned decimal
x - hexadezimal in lower case.
X - hexadecimal in upper case.
s - String, a 32-bit Pointer on a
NULL-terminated Byte-String.
A NULL BPTR is handled like an empty string.
c - Char
@end itemize
@item Value - is an argument that has to be resolvable.
@end itemize
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node AI_LISTING, AI_STRUCTURE, AI_DATA, UA_INST
@subsection Listing I/O Commands
@menu
* List:LI_LIST.
* Nolist:LI_NOLIST.
* Printx:LI_PRINTX.
* Lisfile:LI_LISFILE.
@end menu
@node LI_LIST, LI_NOLIST, , AI_LISTING
@subsubsection list
activates the listing output. Has no function if the global
listing output wasn't activated.
@center Listing Format:
@center LINE ADDRESS[Flag1] COMMAND-BYTES[Flag2] SOURCE
@itemize
@item Flag1
@itemize
@item @key{+} shows that the line was created by a macro.
@item @key{>} shows that the Assembler searches the closing @key{ENDC}.
@item @key{<} shows that the Assembler searches the closing @key{ENDM}.
@end itemize
@item Flag2
@itemize
@item @key{+} shows a line overflow and that Bytes are ignored.
Can often happen during data definitions.
@end itemize
@end itemize
@node LI_NOLIST, LI_PRINTX, LI_LIST, AI_LISTING
@subsubsection nolist
disactivates the listing output. Has no function if the global
listing output wasn't activated.
@node LI_PRINTX, LI_LISFILE, LI_NOLIST, AI_LISTING
@subsubsection printx "Formatstring"[,Value[,...]]
outputs the string to the current Stdout and works simular
as the known C-Printf function.
@subsubsection errfile Name
defines the filename for the error output.
@itemize
@item Name = Filename
@end itemize
@node LI_LISFILE, , LI_PRINTX, AI_LISTING
@subsubsection lisfile Name
defines the filename for the listing output.
If no error file was defined the error output
is also written into the listing file.
@itemize
@item Name = Filename
@end itemize
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node AI_STRUCTURE, AI_FILE, AI_LISTING, UA_INST
@subsection Structuring
@menu
* Macro:ST_MACRO.
* Endm:ST_ENDM.
* MExit:ST_MEXIT.
* Fail:ST_FAIL.
* End:ST_END.
* If:ST_IF.
* Ifd:ST_IFD.
* Ifnd:ST_IFND.
* Ifv:ST_IFV.
* Ifnv:ST_IFNV.
* Ifmacrod:ST_IFMACROD.
* Ifmacrond:ST_IFMACROND.
* Ifcmacrod:ST_IFCMACROD.
* Ifcmacrond:ST_IFCMACROND.
* Ifc:ST_IFC.
* Ifnc:ST_IFNC.
* If[cc]:ST_IFCC.
* Else:ST_ELSE.
* Elseif:ST_ELSEIF.
* Endc:ST_ENDC.
* Endif:ST_ENDIF.
* Repeat:ST_REPEAT.
* Rept:ST_REPT.
* Procstart:ST_PROCSTART.
* Procend:ST_PROCEND.
@end menu
@node ST_MACRO, ST_ENDM, , AI_STRUCTURE
@subsubsection symbol[:] macro
starts a Macro block.
@node ST_ENDM, ST_MEXIT, ST_MACRO, AI_STRUCTURE
@subsubsection endm
ends a macroblock.
@node ST_MEXIT, ST_FAIL, ST_ENDM, AI_STRUCTURE
@subsubsection mexit
ends a macro call.
@node ST_FAIL, ST_END, ST_MEXIT, AI_STRUCTURE
@subsubsection fail
creates an error.
@node ST_END, ST_IF, ST_FAIL, AI_STRUCTURE
@subsubsection end
ends the assembling.
@node ST_IF, ST_IFD, ST_END, AI_STRUCTURE
@subsubsection if Symbol
checks if the symbol value is not NULL and assembles
the block depending on the success.
@node ST_IFD, ST_IFND, ST_IF, AI_STRUCTURE
@subsubsection ifd Symbol
checks if the Symbol exists and assembles
the block depending on the success.
@node ST_IFND, ST_IFV, ST_IFD, AI_STRUCTURE
@subsubsection ifnd Symbol
checks if the Symbol doesn't exist and assembles
the block depending on the success.
@node ST_IFV, ST_IFNV, ST_IFND, AI_STRUCTURE
@subsubsection ifv String
This is a privat command and doesn't belong to the standard.
@node ST_IFNV, ST_IFMACROD, ST_IFV, AI_STRUCTURE
@subsubsection ifnv String
This is a privat command and doesn't belong to the standard.
@node ST_IFMACROD, ST_IFMACROND, ST_IFNV, AI_STRUCTURE
@subsubsection ifmacrod Macro
checks if the Macro exists and assembles
the block depending on the success.
@node ST_IFMACROND, ST_IFCMACROD, ST_IFMACROD, AI_STRUCTURE
@subsubsection ifmacrond Macro
checks if the Macro doesn't exist and assembles
the block depending on the success.
@node ST_IFCMACROD, ST_IFCMACROND, ST_IFMACROND, AI_STRUCTURE
@subsubsection ifcmacrod CMacro
checks if the CMacro exists and assembles
the block depending on the success.
@node ST_IFCMACROND, ST_IFC, ST_IFCMACROD, AI_STRUCTURE
@subsubsection ifcmacrond CMacro
checks if the CMacro doesn't exist and assembles
the block depending on the success.
@node ST_IFC, ST_IFNC, ST_IFCMACROND, AI_STRUCTURE
@subsubsection ifc Symbol,Symbol
compares the first string with the second string and if
they are equal the block is assembled.
@node ST_IFNC, ST_IFCC, ST_IFC, AI_STRUCTURE
@subsubsection ifnc 'String','String'
compares the first string with the second string and if
they differ the block is assembled.
@node ST_IFCC, ST_ELSE, ST_IFNC, AI_STRUCTURE
@subsubsection if[condition] Symbol=Symbol
compares the first symbol with the second symbol and decides
according to the condition if the block is assembled.
@itemize
@item Condition = Normal Bcc-Condition Syntax
@item Symbol = Normal Symbol
@end itemize
@node ST_ELSE, ST_ELSEIF, ST_IFCC, AI_STRUCTURE
@subsubsection else
activates the condition block if the block above wasn't
assembled.
@node ST_ELSEIF, ST_ENDC, ST_ELSE, AI_STRUCTURE
@subsubsection elseif
activates the condition block if the block above wasn't
assembled.
@node ST_ENDC, ST_ENDIF, ST_ELSEIF, AI_STRUCTURE
@subsubsection endc
defines the end of a condition block.
@node ST_ENDIF, ST_REPEAT, ST_ENDC, AI_STRUCTURE
@subsubsection endif
defines the end of a condition block.
@node ST_REPEAT, ST_REPT, ST_ENDIF, AI_STRUCTURE
@subsubsection repeat Count
repeats the blocks that is located between @key{repeat} and @key{endr} by the number Count.
@node ST_REPT, ST_PROCSTART, ST_REPEAT, AI_STRUCTURE
@subsubsection rept Count
has the same function like @key{Repeat}
@node ST_PROCSTART, ST_PROCEND, ST_REPT, AI_STRUCTURE
@subsubsection procstart
starts a Dice-C function.
Is used to optimize @key{Link} and @key{Unlk}.
@node ST_PROCEND, , ST_PROCSTART, AI_STRUCTURE
@subsubsection procend
ends a Dice-C function.
Is used to optimize @key{Link} and @key{Unlk}.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node AI_FILE, AI_MISC, AI_STRUCTURE, UA_INST
@subsection File I/O Befehle
@menu
* Incdir:FI_INCDIR.
* Incpath:FI_INCPATH.
* Include:FI_INCLUDE.
* Include2:FI_INCLUDE2.
* Incbin:FI_INCBIN.
* Incbin2:FI_INCBIN2.
* IBytes:FI_IBYTES.
* DSBin:FI_DSBIN.
* Doscmd:FI_DOSCMD.
* Pure:FI_PURE.
@end menu
@node FI_INCDIR, FI_INCPATH, , AI_FILE
@subsubsection incdir Dir[,Dir[,@dots{}]]
adds directories to the include path list.
@key{BASM} uses 2 internal path lists and the current directory
to find the include and incbin files.
First @key{BASM} checks for a @key{:} character in the filename
and if it finds a volume the file is loaded direct instead of
searching it through the pathlists.
The first path list contains the paths that were defined in the
commandline or @key{bopt} by the option @key{-i} or through
@key{incdir}.
The second path list contains the paths that were defined in
global configuration file @key{ENV:BASMOption}.
The entries of the second list will be removed when the assembler
is closed so that the paths are still correct in the ARexx-Mode.
The first list is removed every pass.
@itemize
@item Dir = Name of the Include-Path.
@end itemize
@node FI_INCPATH, FI_INCLUDE, FI_INCDIR, AI_FILE
@subsubsection Incpath
has the same function like @key{incdir}.
@node FI_INCLUDE, FI_INCLUDE2, FI_INCPATH, AI_FILE
@subsubsection include Name
loads the external include file, for example the OS-Includes.
If the file is a precompiled include file it's detected automaticly.
Includes are loaded from the editor or @key{cachefile.library}.
@itemize
@item Name = Filename
@end itemize
@node FI_INCLUDE2, FI_INCBIN, FI_INCLUDE, AI_FILE
@subsubsection include2 Name
has the same function like @key{include} with the exception
that the @key{cachefile.library} isn't ignored.
@itemize
@item Name = Filename
@end itemize
@node FI_INCBIN, FI_INCBIN2, FI_INCLUDE2, AI_FILE
@subsubsection incbin Name[,size]
inserts the file with the optional length at the current
address into the code. Normally used for sounds and graphics.
@node FI_INCBIN2, FI_IBYTES, FI_INCBIN, AI_FILE
@subsubsection incbin2 Name[,size]
has the same function like @key{incbin} with the exception
that the @key{cachefile.library} isn't used.
@itemize
@item Name = Name of the data file.
@end itemize
@node FI_IBYTES, FI_DSBIN, FI_INCBIN2, AI_FILE
@subsubsection ibytes Name[,Length]
has the same function like @key{incbin}
@node FI_DSBIN, FI_DOSCMD, FI_IBYTES, AI_FILE
@subsubsection dsbin Name[,Length]
defines a memory area with the length of the file specified
by the file. Optinally you can defined the maximal file
length.
@itemize
@item Name = Filename
@item Length = maximal file length
@end itemize
@node FI_DOSCMD, FI_PURE, FI_DSBIN, AI_FILE
@subsubsection doscmd Name
runs the program Name.
@example
dc.b 0,"$VER: Fubar 1.0 by Joe User"
doscmd "c:date >ram:Temp"
incbin ram:Temp
doscmd "c:delete ram:Temp"
@end example
@node FI_PURE, , FI_DOSCMD, AI_FILE
@subsubsection pure
sets the Pure Bit while writing a program file.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node AI_MISC, AI_META, AI_FILE, UA_INST
@subsection Miscellaneous
@menu
* Trashreg:MI_TRASHREG.
* Super:MI_SUPER.
* MC[Type]:MI_MCXXX.
* Bopt:MI_BOPT.
@end menu
@node MI_TRASHREG, MI_SUPER, , AI_MISC
@subsubsection trashreg Reglist
defines the registers that are available to the optimizer.
@itemize
@item RegList = A normal Registerlist known by @key{Movem}.
@end itemize
@node MI_SUPER, MI_MCXXX, MI_TRASHREG, AI_MISC
@subsubsection super
disactivates Supervisor warnings.
@node MI_MCXXX, MI_BOPT, MI_SUPER, AI_MISC
@subsubsection mc[Type]
defines the processor type to allow certain commands
and addressmodes.
@center Prozessortyp
@itemize
@item 68000 Default Mode
@item 68010
@item 68020
@item 68030
@item 68040
@item 68060
@item 68881
@item 68882
@end itemize
@node MI_BOPT, , MI_MCXXX, AI_MISC
@subsubsection bopt [opt[,@dots{}],@dots{}]
sets the assembler options.
@center Options
@table @samp
@item m1[+,-]
activates/disactivates the 68010 mode.
@item m2[+,-]
activates/disactivates the 68020 mode.
@item m3[+,-]
activates/disactivates the 68030 mode.
@item m4[+,-]
activates/disactivates the 68040 mode.
@item m6[+,-]
activates/disactivates the 68060 mode.
@item mf[+,-]
activates/disactivates the 68881/2 mode.
@item ue[+,-]
activates/disactivates writing an executable file.
@item uo[+,-]
activates/disactivates writing an object file.
@item ua[+,-]
activates/disactivates writing an absolut file.
@item un[+,-]
activates/disactivates writing no file.
@item p[+,-]
activates/disactivates writing a preassembled Include file.
@item g[+,-]
activates/disactivates adding the prefix
@key{_} to each exported symbol.
@item sx[+,-]
activates/disactivates writing all XRef/XDef symbols to a symbol hunk.
@item sl[+,-]
activates/disactivates writing all normal symbols to a symbol hunk.
@item sa[+,-]
activates/disactivates writing all symbols to a symbol hunk.
@item sd[+,-]
activates/disactivates writing Debug Informations for Source Level Debugging.
@item s1[+,-]
activates/disactivates writing a SAS D1 compatible Debug Hunk.
@item sf[+,-]
activates/disactivates writing the full sourcefile path into the debug hunk.
You should only use this for your own development system because other users
may have different HD layouts.
@item j[+,-]
activates/disactivates setting the PURE Bit for a program file.
The PURE Bit tells the Shell that this program can be loaded resident.
@item a[+,-]
activates/disactivates creating of an .info file for each program.
Useful if you use the assembler through the WB.
@item A[+,-]
activates/disactivates the ARexxmode Option.
Only allowed in the commandline.
@item i<DirName>
defines the include path.
@item o<FileName>
defines the object filename
@item P<Priority>
sets the task priority.
@item c[+,-]
activates/disactivates that the assembler
interpretes Upper and Lower case as 2 different chars.
@item f[+,-]
activates/disactivates a faster mode that
resolves all references in the 2nd pass.
Fortunately this mode needs more memory and
has some disadvantages like uncorrect values
during the listing.
This option has no effect during optimizing.
@item M<Bytes>
defines the maximale macro expansion size.
If you get a macromemerror you should increase
the size. Default 1000 Bytes.
@item Z<Address>
tells the assembler that the source
is starts in the memory at the defined address.
Useful for ARexx scripts.
Option is only available in the commandline.
@item x[+,-]
uses the @file{cachefile.library} to load
resident Includes/Incbins or add unknown files
to the @key{cachefile.library} database.
@item X[+,-]
erases all files that are controlled by the @key{cachefile.library}.
@item y[+,-]
shows all files that are controlled by the @key{cachefile.library}.
@item l[+,-]
activates/disactivates the listing output.
@item l0[+,-]
activates/disactivates the listing macro expansion.
@item L<Listingfile>
defines the Listing filename.
@item h[+,-]
activates/disactivates the symbol listing output.
@item H[+,-]
activates/disactivates the unused symbol output.
@item v[+,-]
outputs a statistic after assembling.
@item V[+,-]
as less status output as possible
@item e[+,-]
creates an error list.
@item es[+,-]
outputs the error list in the Barfly shell.
This option has no meaning in BASM.
@item wo[+,-]
activates/disactivates Optimizing warnings.
@item ws[+,-]
activates/disactivates Supervisor warnings.
@item wm[+,-]
activates/disactivates Move16 warnings because the use of
the move16 command is dangerous if you don't know the problems.
@item w2[+,-]
activates/disactivates 68020 Addressmode warnings.
@item w4[+,-]
activates/disactivates 64k-Access warnings.
It's useful if you accidently avoid to forget the address register.
Example: move.l 8,d0 instead of move.l 8(an),d0
@item b0
sets the Default Branch Length to 8-Bit. @key{.b}
@item b1
sets the Default Branch Length to 16-Bit. @key{.w}
@item b2
sets the Default Branch Length to 32-Bit. @key{.l}
@item B0
sets the Default BaseDisplacement-Width to 8 Bit. @key{.b}
@item B1
sets the Default BaseDisplacement-Width to 16 Bit. @key{.w}
@item B2
sets the Default BaseDisplacement-Width to 32 Bit. @key{.l}
@item n0
sets the Default OuterDisplacement-Width to 16 Bit. @key{.w}
@item n1
sets the Default OuterDisplacement-Width to 32 Bit. @key{.l}
@item q[+,-]
activates/disactivates align long after each rts, bra or jmp to align
blocks to the cache structure.
@item O[+,-]
activates/disactivates the Optimizer.
Without this option no optimizing will happen besides the addressmode converting.
@item OG[+,-]
activates/disactivates Forward Reference Optimizing
to use every possibility. In this mode the source is assembled until no
further optimizing method is found.
First the source is assembled normally.
This is shown by the Output @key{Pass 1}.
Afterwards the optimize passes are started
and continued until no further symbol changes and
length errors occur.
This can take a while and depends on the source
size.
@item OT[+,-]
activates/disactivates Time Optimizing.
Addressmode Converting
@item OC0[+,-]
bdwan
@item OC1[+,-]
bdwpc
@item OC2[+,-]
anxn
@item OC3[+,-]
pcxn
@item OC4[+,-]
bdw
@item OC5[+,-]
bdl
@item OC6[+,-]
an
@item OC7[+,-]
pc
@item ODD[+,-]
activates Direct Addressmode Optimizing
Direct Optimizing
@item OD0[+,-]
move
@item OD1[+,-]
clr
@item OD2[+,-]
add
@item OD3[+,-]
sub
@item OD4[+,-]
lea
@item OD5[+,-]
cmp
@item OD6[+,-]
bcc
@item OD7[+,-]
jsr
@item OD8[+,-]
jmp
@item OD9[+,-]
asl
@item ODa[+,-]
or ( This Optimizing is disactivated internal )
@item ODb[+,-]
eor ( This Optimizing is disactivated internal )
@item ODc[+,-]
and
@item ODd[+,-]
mulu
@item ODe[+,-]
muls
@item ODf[+,-]
jsr+rts
@item ODg[+,-]
jmp+rts
@item ODh[+,-]
MovemNoRegister
@item ODi[+,-]
MovemOneRegister
@item ODj[+,-]
Link
@item OAP[+,-]
activates PC-Relativ Optimizing
@item OAS[+,-]
activates Smalldata Optimizing
@item OAL[+,-]
activates @key{long} nach @key{word} Optimizing
@item OAX[+,-]
activates @key{x(An)} to @key{(An)} Optimizing
@item OAY[+,-]
activates @key{68020++ An-EA} Optimizing
@item OAZ[+,-]
activates @key{68020++ PC-EA} Optimizing
@item OAR[+,-]
activates Register Optimizing
@end table
You should be careful with the command @key{Bopt} when you activate
Global-Optimize.
In every parse the default config is set and therefore you should
define all global options in the commandline or in the configuration
file.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node AI_META, ,AI_MISC, UA_INST
@subsection 680xx Meta Commands
@menu
* mb:ME_MB.
* mw:ME_MW.
* ml:ME_ML.
* mq:ME_MQ.
* xor:ME_XOR.
* xori:ME_XORI.
* bhs:ME_BHS.
* blo:ME_BLO.
@end menu
@node ME_MB, ME_MW, , AI_META
@subsubsection mb Operand1,Operand2
has the same function as @key{move.b}.
@node ME_MW, ME_ML, ME_MB, AI_META
@subsubsection mw Operand1,Operand2
has the same function as @key{move.w}.
@node ME_ML, ME_MQ, ME_MW, AI_META
@subsubsection ml Operand1,Operand2
has the same function as @key{move.l}.
@node ME_MQ, ME_XOR, ME_ML, AI_META
@subsubsection mq Operand1,Operand2
has the same function as @key{moveq}.
@node ME_XOR, ME_XORI, ME_MQ, AI_META
@subsubsection xor.? Operand1,Operand2
has the same function as @key{eor.?}.
@node ME_XORI, ME_BHS, ME_XOR, AI_META
@subsubsection xori.? Operand1,Operand2
has the same function as @key{eori.?}.
@node ME_BHS, ME_BLO, ME_XORI, AI_META
@subsubsection bhs.? Label
has the same function as @key{bcc.?}.
@node ME_BLO, , ME_BHS, AI_META
@subsubsection blo.? Label
has the same function as @key{bcs.?}.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node UA_MACROS, UA_HMACROS, UA_INST, BAsmTop
@section Assembler Macros
Macros are meta commands that can be based of many assembler instructions
to achieve an abstracter source layout.
In a macro you can use several different pattern that are replaced
by appropriate parameters when the macro is called.
The parameter that are passed during a macro call are represented by
the following patterns:
@key{\\0},@dots{},@key{\\9},
@key{\\a},@dots{},@key{\\z},
@key{\\A},@dots{},@key{\\Z}.
The pattern ids are using the hexadecimal format.
If a pattern is used with no related parameter an empty string is inserted.
Furthermore if a parameter contains tabulators or spaces it has to be
placed between @key{<@dots{}>}.
When a macro needs relative labels and is should be called more than
one time you should use the special pattern @key{@@}.
This pattern is replaced by a number that is based of 4 digits and that
is increased after each call.
The pattern @key{\#} is replaced by the value of the symbol @key{narg}
that represents the count of macro parameters.
Besides the standard patterns there are some more advanced pattern
functions supported that look like @key{\\*Function-Name}.
These functions don't belong to the motorola standard thus they aren't
supported by every assembler.
Another important point is that you can also call macros from
from macros but you can't define macros in macros.
The standard macro pattern
Label & [. string] & [, string] & [, string] & [,@dots{}]
& [\\0] & [\\1|] & [\\2|] & [\\3|]@dots{}[\\n|]
The advanced macro pattern functions
@itemize
@item @samp{ \(Argument)}
inserts the string of the macroparameter with the number
the argument defines.
@example
\(1) = \1
\(1+3+4) = \8
@end example
@item @samp{\*upper(String)}
inserts the string in upper case.
@item @samp{\*lower(String)}
inserts the string in lower case.
@item @samp{\*valof(Argument)}
inserts the decimal value of the argument as a string.
@item @samp{\*strlen(Symbol)}
inserts the length of a symbol as a string.
@item @samp{\*right(String,n)}
inserts n chars of the right side of the string.
If the string contains less than n chars the whole
string is inserted.
@item @samp{\*left(String,n)}
inserts n chars of the left side of the string.
If the string contains less than n chars the whole
string is inserted.
@item @samp{\*mid(String,n,m)}
inserts chars from position n to m from the string.
If the position is outside of the string length the
chars till the end of the string is inserted.
@end itemize
@example
openwind MACRO
move.l intbase,a6
lea.l \1,a0
jsr OpenWindow(a6)
ENDM
start:
openwind newwindow
@end example
@example
movewind MACRO
move.l intbase,a6
move.l \1,a0
moveq #0,d0
move.\0 \2,d1
IFC `\0',`b'
ext.w d1
ENDC
jsr MoveWindow(a6)
ENDM
start:
move.b #10,d2
1$:
movewind.b newwindow,d2
addq.b #1,d2
cmp.b #100,d2
bne.s 1$
@end example
@example
wait MACRO
moveq #-1,d0
wait\@:
dbra d0,wait\@
ENDM
start:
wait
wait
wait
@end example
@example
test MACRO
move.l #\*upper(Hello),d0
move.l #\*lower(Hello),d0
move.l #\*strlen(1234567890123456),d0
move.l #\*valof(value),d0
rts
cstring "\*left(abcdefgh,4)"
even
cstring "\*left(abcdefgh,10)"
even
cstring "\*right(abcdefgh,4)"
even
cstring "\*right(abcdefgh,10)"
even
cstring "\*mid(abcdefgh,2,4)"
even
cstring "\*mid(abcdefgh,2,8)"
even
ENDM
value = 123456789
hello:
test
@end example
@example
value = 123456789
hello:
move.l #HELLO,d0
move.l #hello,d0
move.l #16,d0
move.l #123456789,d0
rts
cstring "abcd"
even
cstring "abcdefgh"
even
cstring "efgh"
even
cstring "abcdefgh"
even
cstring "cdef"
even
cstring "cdefgh"
even
@end example
@example
PUTTAG MACRO
IFC "\2",""
PUTTAG_COUNT set 0
ENDC
IFNC "\2",""
move.l \2,-(a7)
PUTTAG_COUNT SET PUTTAG_COUNT+4
ENDC
move.l \1,-(a7)
PUTTAG_COUNT SET PUTTAG_COUNT+4
IFC "\1","#TAG_END"
PUTTAG_COUNT SET 4
ENDC
ENDM
CLEARTAG MACRO
lea.l PUTTAG_COUNT(a7),a7
ENDM
PUTTAG #TAG_END
PUTTAG #WA_Width,#100
PUTTAG #WA_ScreenTitle,#Title
.
.
move.l a7,a1
sub.l a0,a0
jsr OpenWindowTagList(a6)
CLEARTAG
@end example
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node UA_HMACROS, UA_SYMBOLS, UA_MACROS, BAsmTop
@section Highlevel Macros
In highlevel macros the operands are based of legal addressmodes.
Arguments are based of operands and the operators
@key{+,-,<<,>>}. Conditions are based of !,=,
<,>,<=,>=,<>.
By using highlevel macros you can make the programming of non
critical source areas easier and more abstract.
Blame Mike Schwartz for this idea...he forced me to do it:-B
@menu
* .Reg:HM_REG.
* .Branch:HM_BRANCH.
* .For:HM_FOR.
* .Next:HM_NEXT.
* .If:HM_IF.
* .Else:HM_ELSE.
* .Endif:HM_ENDIF.
* .While:HM_WHILE.
* .Endwhile:HM_ENDWHILE.
* .Call:HM_CALL.
* .Return:HM_RETURN.
* .Def:HM_DEF.
* .Endef:HM_ENDDEF.
* .Let:HM_LET.
@end menu
@node HM_REG, HM_BRANCH, , UA_HMACROS
@subsubsection .REG
sets the accumulator register that is used to calculate arguments.
Default register is @key{D0}.
@node HM_BRANCH, HM_FOR, HM_REG, UA_HMACROS
@subsubsection .BRANCH b|w|l
sets the length of branch commands that are used in the highlevel macros.
Standard length is @key{.b}.
@node HM_FOR, HM_NEXT, HM_BRANCH, UA_HMACROS
@subsubsection .FOR Operand[.b|w|l] = Operand TO Operand STEP Operand
creates code for a for loop.
The optional width you define after the first operand sets
the width for all operations in the for loop.
@example
.FOR d0.w = #1 to STEP #2
addq.w #1,d1
.NEXT
;Compiled Code
move.w #1,d0
__for1:
addq.w #1,d1
add.w #2,d0
cmp.w ,d0
blt.b __for1
@end example
@node HM_NEXT, HM_IF, HM_FOR, UA_HMACROS
@subsubsection .NEXT
closes the outer .FOR loop.
@node HM_IF, HM_ELSE, HM_NEXT, UA_HMACROS
@subsubsection .IF [Argument] =,!, < , > , <> Operand
creates code for an IF-Operation.
You can remove the first argument if you wanna test the operand.
For example @key{.IF <>}
@example
.IF (a0) + #0 <> d1
moveq #0,d0
.ELSE
moveq #1,d0
.ENDIF
;Compiled Code
move.l (a0),d7
add.l #0,d7
cmp.l d1,d7
beq.b __else1
moveq #0,d0
bra.b __endif1
__else1:
moveq #1,d0
__endif1:
@end example
@node HM_ELSE, HM_ENDIF, HM_IF, UA_HMACROS
@subsubsection .ELSE
starts an alternative IF-Block.
@node HM_ENDIF, HM_WHILE, HM_ELSE, UA_HMACROS
@subsubsection .ENDIF
closes the outer .IF block.
@node HM_WHILE, HM_ENDWHILE, HM_ENDIF, UA_HMACROS
@subsubsection .WHILE [Argument] =,!, < , > , <> Operand
creates code for a while loop
The optional width you define after the first operand sets
the width for all operations in the while loop.
@example
.WHILE d0 <> #0
addq.w #1,d1
.ENDWHILE
;Compiled Code
__while1:
cmp.l #0,d0
beq.s __endwhile1
addq.w #1,d1
bra.s __while1
__endwhile1:
@end example
@node HM_ENDWHILE, HM_CALL, HM_WHILE, UA_HMACROS
@subsubsection .ENDWHILE
closes the outer while loop.
@node HM_CALL, HM_RETURN, HM_ENDWHILE, UA_HMACROS
@subsubsection .CALL Function [, Argument [, Argument [,@dots{}]]]
calls a C-Funktion by parsing the arguments through the stack.
Arguments are calculated in the accumulator register.
@example
.CALL func , test + 0 - #20 , #test
;Compiled Code
move.l test,d7
add.l 0,d7
sub.l #20,d7
move.l d7,-(a7)
move.l #test,-(a7)
jsr func
ifnc "8","0" ;Were there any parameters ?
lea.l __CALLSize(a7),a7
endc
@end example
@node HM_RETURN, HM_DEF, HM_CALL, UA_HMACROS
@subsubsection .RETURN Argument
returns a result value in the accumulator register.
@example
.return d1 + d2 + #$100
;Compiled Code
move.l d1,d7
add.l d2,d7
add.l #$100,d7
@end example
@node HM_DEF, HM_ENDDEF, HM_RETURN, UA_HMACROS
@subsubsection .DEF func [, Operand [, Operand [,@dots{}]]]
defines a C-Stack function and loads the defined parameters into the operands.
@example
.DEF func , d0.w , d1 , (a0)
.ENDDEF
;Compiled Code
XDEF func
link a5,#0
move.w $0a(a5),d0
move.l $0c(a5),d1
move.l $10(a5),(a0)
unlk a5 ;.ENDDEF
rts
@end example
@node HM_ENDDEF, HM_LET, HM_DEF, UA_HMACROS
@subsubsection .ENDDEF
closes a function that was started by @key{.DEF}
@node HM_LET, , HM_ENDDEF, UA_HMACROS
@subsubsection .LET [ Operand =] Argument
calculates an argument in an accumulator or moves the value to a defined operand.
@example
.LET + 4 - #LN_SIZE << #7
.LET d1 = (a1) - (a0)
;Compiled Code
add.l 4,d7
sub.l #LN_SIZE,d7
lsl.l #7,d7
move.l (a1),d7
sub.l (a0),d7
move.l d7,d1
@end example
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node UA_SYMBOLS, UA_OPTIMIZING, UA_HMACROS, BAsmTop
@section Predefined Symbols
@subsubsection NARG
represents the macro parameter count in a macro.
@subsubsection BARFLY
represents the assembler version.
@subsubsection 680xx
represents the CPU processor type.
@subsubsection 6888x
represents the FPU processor type.
@subsubsection _MOVEMBYTES
represents the byte count the last movem transfer used.
@example
lea _MOVEMBYTES(a7),a7 ;frees the stack
@end example
@subsubsection _MOVEMREGS
represents the last movem register mask.
@example
movem (a7)+,_MOVEMREGS
@end example
@subsubsection __RS
represents the RS-Counter.
@subsubsection __SO
represents the RS-Counter.
@subsubsection __FO
represents the FO-Counter.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node UA_OPTIMIZING, UA_PRE, UA_SYMBOLS, BAsmTop
@section Optimizing
You should always be careful with optimizing because it can
cause bugs in certain source areas.
Branch optimizing for example has to be switched off if you
use JMP-Towers.
@example
lsl.w #1,d0
jmp Tower(pc,d0.w)
Tower:
bra.w func1
bra.w func2
bra.w func3
could be be optimized to
Tower:
bra.w func1
bra.s func2
bra.s func3
that leads to program bugs.
Solution:
bopt OD6-
Tower:
bra.w func1
bra.w func2
bra.w func3
bopt OD6+
@end example
Optimize Methods@dots{}
@menu
* Direct Address Optimizing:OP_DIRECT.
* Address Optimizing:OP_ADDRESS.
* #x Optimizing:OP_OPTIMIZE.
* Register Optimizing:OP_REGISTER.
@end menu
@node OP_DIRECT , OP_ADDRESS, , UA_OPTIMIZING
@subsection Direct Addressmode Optimizing
The assembler can direct optimize certain @key{68020@dots{}60} Addressmodes
if a faster 68000 addressmode exists.
This optimizing method should always be activated because of compatibility
reasons.
@itemize
@item @samp{(bd.w,an)}
can be optimized to @samp{x(an)} that removes 1 word and some cycles.
@end itemize
@example
+------------------------+--------------------+
| Addressmode | Optimizing |
+------------------------+--------------------+
+------------------------+--------------------+
| move. l (1000.w,an),dn | move.l 1000(an),dn |
+------------------------+--------------------+
@end example
@itemize
@item @samp{(bd.w,pc)}
can be optimized to @samp{x(pc)} that removes 1 word and some cycles.
@end itemize
@example
+------------------------+--------------------+
| Addressmode | Optimizing |
+------------------------+--------------------+
+------------------------+--------------------+
| move. l (1000.w,pc),dn | move.l 1000(pc),dn |
+------------------------+--------------------+
@end example
@itemize
@item @samp{(bd.w)}
can be optimized to @samp{bd.w} that removes 1 word and some cycles.
@end itemize
@example
+------------------------+--------------------+
| Addressmode | Optimizing |
+------------------------+--------------------+
+------------------------+--------------------+
| move. l (bd.w,an),dn | move.l bd.w,dn |
+------------------------+--------------------+
@end example
@itemize
@item @samp{(bd.l)}
can be optimized to @samp{bd.l} that removes 1 word and some cycles.
@end itemize
@example
+------------------------+--------------------+
| Addressmode | Optimizing |
+------------------------+--------------------+
+------------------------+--------------------+
| move. l (bd.l,an),dn | move.l bd.l,dn |
+------------------------+--------------------+
@end example
@itemize
@item @samp{(an)}
can be optimized to @samp{(an)} that removes 1 word and some cycles.
The addressmode @samp{(an)} can be interpreted as a subgroup
of @samp{(bd,an,xn)}. Because @samp{(an)} is a normal
68000 addressmode you should never switch off this optimizing
method.
@end itemize
@example
+------------------------+--------------------+
| Addressmode | Optimizing |
+------------------------+--------------------+
+------------------------+--------------------+
| move. l (an),dn | move.l (an),dn |
+------------------------+--------------------+
@end example
@itemize
@item @samp{(pc)}
can be optimized to @samp{(pc)} that removes 1 word and some cycles.
The addressmode @samp{(pc)} can be interpreted as a subgroup
of @samp{(bd,pc,xn)}. Because @samp{(pc)} is a normal
68000 addressmode you should never switch off this optimizing
method.
@end itemize
@example
+------------------------+--------------------+
| Addressmode | Optimizing |
+------------------------+--------------------+
+------------------------+--------------------+
| move. l (pc),dn | move.l (pc),dn |
+------------------------+--------------------+
@end example
@node OP_ADDRESS , OP_OPTIMIZE, OP_DIRECT, UA_OPTIMIZING
@subsection Address Optimizing
@itemize
@item @samp{Long}
@end itemize
@example
+---------------+----------------+---------------------+
| Addressmode | Optimizing | Note |
+---------------+----------------+---------------------+
+---------------+----------------+---------------------+
| x.l,EA | x.w,EA | $ffff8000<=x<=$7fff |
+---------------+----------------+---------------------+
| EA,x.l | EA,x.l | $ffff8000<=x<=$7fff |
+---------------+----------------+---------------------+
@end example
@itemize
@item @samp{x(an)}
@end itemize
@example
+---------------+----------------+---------------------+
| Addressmode | Optimizing | Note |
+---------------+----------------+---------------------+
+---------------+----------------+---------------------+
| x(an),EA | (an),EA | x=0 |
+---------------+----------------+---------------------+
| EA,x(an) | EA,(an) | x=0 |
+---------------+----------------+---------------------+
@end example
@itemize
@item @samp{PC-Relative}
@end itemize
@example
+---------------+----------------+---------------------+
| Addressmode | Optimizing | Note |
+---------------+----------------+---------------------+
+---------------+----------------+---------------------+
| label,EA | label(pc),EA | $ffff8000<=x<=$7fff |
+---------------+----------------+---------------------+
@end example
@itemize
@item @samp{A4-Smalldata}
@end itemize
@example
+---------------+----------------+---------------------+
| Addressmode | Optimizing | Note |
+---------------+----------------+---------------------+
+---------------+----------------+---------------------+
| x.l,EA | x(a4),EA | $ffff8000<=x<=$7fff |
+---------------+----------------+---------------------+
| EA,x.l | EA,x(a4) | $ffff8000<=x<=$7fff |
+---------------+----------------+---------------------+
@end example
@node OP_OPTIMIZE, OP_REGISTER, OP_ADDRESS, UA_OPTIMIZING
@subsection #x Optimizing
@itemize
@item @samp{Move}
@end itemize
@example
+---------------+----------------+-------------------------+
| Addressmode | Optimizing | Note |
+---------------+----------------+-------------------------+
+---------------+----------------+-------------------------+
| move.l #x,dn | moveq #x,dn | $ffffff80<=$7f |
+---------------+----------------+-------------------------+
| move.? #0,an | suba.l an,an | ? = w or l |
+---------------+----------------+-------------------------+
| move.l #x,dn | moveq #y,dn | $10000<=x<=$7f0000 |
| | swap dn | |
+---------------+----------------+-------------------------+
| move.l #x,dn | moveq #y,dn | $ff80ffff<=x<=$fffEffff |
| | swap dn | |
+---------------+----------------+-------------------------+
| move.l #x,dn | moveq #y,dn | $80<=x<=$ff |
| | neg.b dn | |
+---------------+----------------+-------------------------+
| move.l #x,dn | moveq #y,dn | $ffff<=x<=$ff81 |
| | neg.w dn | |
+---------------+----------------+-------------------------+
| move.l #x,dn | moveq #y,dn | $ffff0080<=x<=$ffff0001 |
| | neg.w dn | |
+---------------+----------------+-------------------------+
| move.? #0,EA | clr.? EA | ? = w or l.See Trashreg |
| | | optimizing. I also check|
| | | if it accesses the HW |
+---------------+----------------+-------------------------+
| move.b #$ff,EA| st EA | |
+---------------+----------------+-------------------------+
@end example
@itemize
@item @samp{Clr}
@end itemize
@example
+---------------+----------------+-------------------------+
| Addressmode | Optimizing | Note |
+---------------+----------------+-------------------------+
+---------------+----------------+-------------------------+
| clr.l dn | moveq #0,dn | |
+---------------+----------------+-------------------------+
@end example
@itemize
@item @samp{Add}
@end itemize
@example
+---------------+----------------+-------------------------+
| Addressmode | Optimizing | Note |
+---------------+----------------+-------------------------+
+---------------+----------------+-------------------------+
| add.? #x,EA | addq.? #x,EA | 1<=x<=8 |
+---------------+----------------+-------------------------+
| add.? #x,EA | subq.? #x,EA | -8<=x<=-1 |
+---------------+----------------+-------------------------+
| add.? #x,an | lea.l x(an),an | $ffff8000<=x<=$7fff |
+---------------+----------------+-------------------------+
| add.? #0,EA | tst.? EA | legal EA |
+---------------+----------------+-------------------------+
| add.? #0,an | removed | |
+---------------+----------------+-------------------------+
@end example
@itemize
@item @samp{Sub}
@end itemize
@example
+---------------+----------------+-------------------------+
| Addressmode | Optimizing | Note |
+---------------+----------------+-------------------------+
+---------------+----------------+-------------------------+
| sub.? #x,EA | subq.? #x,EA | 1<=x<=8 |
+---------------+----------------+-------------------------+
| sub.? #x,EA | addq.? #x,EA | -8<=x<=-1 |
+---------------+----------------+-------------------------+
| sub.? #x,an |lea.l -x(an),an | $ffff8000<=x<=$7fff |
+---------------+----------------+-------------------------+
| sub.? #0,EA | tst.? EA | legal EA |
+---------------+----------------+-------------------------+
| sub.? #0,an | removed | |
+---------------+----------------+-------------------------+
@end example
@itemize
@item @samp{Lea}
@end itemize
@example
+---------------+----------------+-------------------------+
| Addressmode | Optimizing | Note |
+---------------+----------------+-------------------------+
+---------------+----------------+-------------------------+
| lea x(an),an | addq.w #x,an | 1<=x<=8 |
+---------------+----------------+-------------------------+
| lea x(an),an | subq.w #x,an | -8<=x<=-1 |
+---------------+----------------+-------------------------+
@end example
@itemize
@item @samp{Cmp}
@end itemize
@example
+---------------+----------------+-------------------------+
| Addressmode | Optimizing | Note |
+---------------+----------------+-------------------------+
+---------------+----------------+-------------------------+
| cmp.? #0,EA | tst.? EA | |
+---------------+----------------+-------------------------+
@end example
@itemize
@item @samp{Bcc}
The assembler tries to optimize the branch on the smallest
possible length so that can win max 2 words and some cycles.
@end itemize
@example
+---------------+----------------+-------------------------+
| Addressmode | Optimizing | Note |
+---------------+----------------+-------------------------+
+---------------+----------------+-------------------------+
| Bcc.l label | Bcc.w label | $8000<=label<=$7fff |
+---------------+----------------+-------------------------+
| Bcc.l label | Bcc.s label | $80<=label<=$7f |
+---------------+----------------+-------------------------+
| Bcc.w label | Bcc.s label | $80<=label<=$7f |
+---------------+----------------+-------------------------+
@end example
@quotation
Attention! This optimizing methid is unsafe when you use BRANCH-Tables.
You should switch off the optimize method over this area.
@end quotation
@itemize
@item @samp{Jsr}
@end itemize
@example
+---------------+----------------+-------------------------+
| Addressmode | Optimizing | Note |
+---------------+----------------+-------------------------+
+---------------+----------------+-------------------------+
| jsr label | bsr.w label | $8000<=Offset<=$7fff |
+---------------+----------------+-------------------------+
| jsr label | bsr.s label | $80<=Offset<=$7f |
+---------------+----------------+-------------------------+
@end example
@quotation
Attention! This optimizing methid is unsafe when you use JSR-Tables.
You should switch off the optimize method over this area.
@end quotation
@itemize
@item @samp{Jmp}
@end itemize
@example
+---------------+----------------+-------------------------+
| Addressmode | Optimizing | Note |
+---------------+----------------+-------------------------+
+---------------+----------------+-------------------------+
| jmp label | bra.w label |$ffff8000<=Offset<=$7fff |
+---------------+----------------+-------------------------+
| jmp label | bra.s label |$ffffff80<=Offset<=$7f |
+---------------+----------------+-------------------------+
@end example
@itemize
@item @samp{Asl}
@end itemize
@example
+---------------+----------------+-------------------------+
| Addressmode | Optimizing | Note |
+---------------+----------------+-------------------------+
+---------------+----------------+-------------------------+
| asl.? #1,dn | add.? dn,dn | |
+---------------+----------------+-------------------------+
@end example
@itemize
@item @samp{Or}
This optimizing method isn't safe because of the changed
condition flags.
@end itemize
@example
+---------------+----------------+-------------------------+
| Addressmode | Optimizing | Note |
+---------------+----------------+-------------------------+
+---------------+----------------+-------------------------+
| or.? #x,dn | bset #y,dn | x=y^2 |
+---------------+----------------+-------------------------+
@end example
@itemize
@item @samp{Eor}
This optimizing method isn't safe because of the changed condition flags.
@end itemize
@example
+---------------+----------------+-------------------------+
| Addressmode | Optimizing | Note |
+---------------+----------------+-------------------------+
+---------------+----------------+-------------------------+
| eor.? #x,dn | bchg #y,dn | x=y^2 |
+---------------+----------------+-------------------------+
@end example
@itemize
@item @samp{Mulu}
Be very careful with this optimizing.
@end itemize
@example
+---------------+----------------+-------------------------+
| Addressmode | Optimizing | Note |
+---------------+----------------+-------------------------+
+---------------+----------------+-------------------------+
| mulu.w #x,dn | swap dn | x=2^y |
| | clr.w dn | y=y1+y2 |
| | swap dn | y=1,add.l dn,dn |
| | lsl.l #y1,dn | |
| | lsl.l #y2,dn | |
+---------------+----------------+-------------------------+
| mulu.l #x,dn | lsl.l #y1,dn | x=2^y |
| | lsl.l #y2,dn | y=y1+y2 |
| | | y >= 16 |
| | | swap dn , y-16 |
+---------------+----------------+-------------------------+
@end example
@itemize
@item @samp{Muls}
Be very careful with this optimizing.
@end itemize
@example
+---------------+----------------+-------------------------+
| Addressmode | Optimizing | Note |
+---------------+----------------+-------------------------+
+---------------+----------------+-------------------------+
| muls.w #x,dn | ext.l dn | x=2^y |
| | asl.l #y1,dn | y=y1+y2 |
| | asl.l #y2,dn | y=1 , add.l dn,dn |
+---------------+----------------+-------------------------+
| muls.l #x,dn | asl.l #y1,dn | x=2^y |
| | asl.l #y2,dn | y=y1+y2 |
| | | y >= 16 |
| | | swap dn ,y-16 |
+---------------+----------------+-------------------------+
@end example
@itemize
@item @samp{Jsr+Rts}
This optimizing method removes the RTS and changes
the JSR into a BRA. If there's a label between JSR
and RTS the RTS isn't removed.
@end itemize
@itemize
@item @samp{Bsr+Rts}
This optimizing method removes the RTS and changes
the BSR into a BRA. If there's a label between BSR
and RTS the RTS isn't removed.
@end itemize
@itemize
@item @samp{MovemNoRegister}
@end itemize
@example
+---------------+----------------+-------------------------+
| Addressmode | Optimizing | Note |
+---------------+----------------+-------------------------+
+---------------+----------------+-------------------------+
| movem.l ,EA | Removed | |
+---------------+----------------+-------------------------+
| movem.l EA, | Removed | |
+---------------+----------------+-------------------------+
@end example
@itemize
@item @samp{MovemOneRegister}
@end itemize
@example
+---------------+----------------+-------------------------+
| Addressmode | Optimizing | Note |
+---------------+----------------+-------------------------+
+---------------+----------------+-------------------------+
| movem.l Xn,EA | Move.l Xn,EA | Alter the status flags! |
+---------------+----------------+-------------------------+
| movem.l EA,Xn | Move.l EA,Xn | Alter the status flags! |
+---------------+----------------+-------------------------+
@end example
@node OP_REGISTER , , OP_OPTIMIZE, UA_OPTIMIZING
@subsection Register Optimizing
@itemize
@item @samp{#xxx} is switched off.
@itemize
@item An address register is set free by @samp{trashreg}.
@end itemize
@example
+---------------+--------------------+-------------------------+
| Addressmode | Optimizing | Note |
+---------------+--------------------+-------------------------+
+---------------+--------------------+-------------------------+
|move.? EA,label| lea.l label(pc),an | $ffff8000<=label<=$7fff |
| | move.? EA,(an) | |
+---------------+--------------------+-------------------------+
| tst.? label | lea.l label(pc),an | $ffff8000<=label<=$7fff |
| | tst.? (an) | |
+---------------+--------------------+-------------------------+
| not.? label | lea.l label(pc),an | $ffff8000<=label<=$7fff |
| | not.? (an) | |
+---------------+--------------------+-------------------------+
| neg.? label | lea.l label(pc),an | $ffff8000<=label<=$7fff |
| | neg.? (an) | |
+---------------+--------------------+-------------------------+
| negx.? label | lea.l label(pc),an | $ffff8000<=label<=$7fff |
| | negx.? (an) | |
+---------------+--------------------+-------------------------+
| nbcd label | lea.l label(pc),an | $ffff8000<=label<=$7fff |
| | nbcd (an) | |
+---------------+--------------------+-------------------------+
| scc label | lea.l label(pc),an | $ffff8000<=label<=$7fff |
| | scc (an) | |
+---------------+--------------------+-------------------------+
@end example
@item @samp{#x} Optimizing on.
@itemize
@item An address register is set free by @samp{trashreg}.
@end itemize
@example
+---------------+--------------------+-------------------------+
| Addressmode | Optimizing | Note |
+---------------+--------------------+-------------------------+
+---------------+--------------------+-------------------------+
| move.l #x,EA | moveq #x,dn | $ffffff80<=x<=$7f |
| | move.l dn,EA | |
+---------------+--------------------+-------------------------+
| ori.l #x,EA | moveq #x,dn | $ffffff80<=x<=$7f |
| | or.l dn,EA | |
+---------------+--------------------+-------------------------+
| eori.l #x,EA | moveq #x,dn | $ffffff80<=x<=$7f |
| | eor.l dn,EA | |
+---------------+--------------------+-------------------------+
| andi.l #x,EA | moveq #x,dn | $ffffff80<=x<=$7f |
| | and.l dn,EA | |
+---------------+--------------------+-------------------------+
| addi.l #x,EA | moveq #x,dn | $ffffff80<=x<=$7f |
| | add.l dn,EA | |
+---------------+--------------------+-------------------------+
| subi.l #x,EA | moveq #x,dn | $ffffff80<=x<=$7f |
| | sub.l dn,EA | |
+---------------+--------------------+-------------------------+
| cmpi.l #x,EA | moveq #x,dn | $ffffff80<=x<=$7f |
| | cmp.l EA,dn | |
+---------------+--------------------+-------------------------+
| move.? #0,EA | moveq #0,dn | Time optimizing |
| | move.l dn,EA | must be on |
+---------------+--------------------+-------------------------+
@end example
@end itemize
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node UA_PRE, UA_CLI, UA_OPTIMIZING, BAsmTop
@section Preassembled Includes
If you wanna assemble a program that needs to load a lot includes
it's useful to preassemble the includes and load one file because
the real slowdown factor is the need loading time.
You can only use absolut symbols and macros in a preassembled file.
All relative and symbols defined by @samp{set} aren't written into
a preassembled file.
The created file isn't compress to avoid any slowdown but if
the file size is critical you can compress the file by xpk and
load it through the xfh filesystem.
@quotation
basm -p Source.S creates the preassembled file Source.p
@end quotation
@quotation
An error location could be absolut symbols that are calculated
by relative symbols. You should avoid these symbols.
Symbol=Label1-Label2
@end quotation
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@section Resident includes
@samp{BASM} can control an Include and Incbin database by the library
@file{cachefile.library} to get rid of the loading delays.
The files in the database can be shown and deleted.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node UA_CLI,UA_AREXX,UA_PRE, BAsmTop
@section Basm Assembler System
@subsection Cli Calling Convention
@samp{Format:}
@quotation
BASM [-Option] Name
@end quotation
This is the commandline version of the assembler and can be easy
integrated in own development system, for example @samp{Make} and
@samp{CED}.
An assembler error is indicated by the result 20 and the result 10
is used if no source file were specified.
@itemize
@item @samp{Option}
The same options are accepted that are described
in the assembler command @samp{bopt}.
The following options are accepted additionally.
@itemize
@item A[+,-] Turns ARexx mode on/off
@item C <Configuration> loads a configuration file
@item d <Symbol=Value> defines a symbol
@end itemize
@item @samp{Standard-Optionen}
@example
;All other options are disactivated.
c+,e+,m1000,wo+,ws+,wm+,w2+,w4+
b1+,B0+,n1+
OC0+,OC1+,OC2+,OC3+,OC4+,OC5+,OC6+,OC7+,
ODD+,OD0+,OD1+,OD2+,OD3+,OD4+,OD5+,OD6+,OD7+,OD8+,
OD9+,ODc+,ODe+,ODf+,ODg+
OAP+,OAL+,OAX+,OAY+,OAZ+,OAR+
@end example
@end itemize
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@subsection Configuration
@subsubsection Global
You can define the global configuration through the file
@samp{ENV:BASMOption}. The internal standard configuration
is not replaced but can only be changed.
File @file{ENV:BASMOption}
@example
-v
-f
-c-
-iASM:
@end example
@quotation
If a line starts with @key{-} it's ignored.
@end quotation
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@subsubsection WB Tooltypes
Additionally you can also define the above described configuration
options in the tooltypes of the source file icon.
Furthermore @samp{BASM} allows a special tooltype to define
an output window.
o Window= <Window Defintion>
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node UA_AREXX, UA_COMP, UA_CLI, BAsmTop
@section ARexx
The @samp{BASM} ARexx Port Name is @samp{BASM_rexx} and the
ARexx Script suffix @file{.basm}.
To activate the @samp{BASM} ARexx mode you have to start
@samp{BASM} with the option -A.
@subsubsection BASM
@samp{BASM [-Option] Name}
This ARexx command starts the assembler and coincides with the
CLI-syntax structure.
@subsubsection BEND
@samp{BEND}
This ARexx command closes the ARexx port and shuts down the assembler.
@subsubsection BGETERROR
@samp{BGETERROR}
With this ARexx command you will receive an explanation of the actual
errors. If no errors exist it will return a status code 20.
Error Format String
OFFSET:FILE:<Error Description>
@subsubsection BNEXTERROR
@samp{BNEXTERROR}
This ARexx command will cause a jump to the next error in the list.
If there are no further errors in the list it will return a status
code 20.
@subsubsection BINITERROR
@samp{BINITERROR}
This ARexx command will cause a jump to the first entry in the error
list. If no error exists it will return a status code 20.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node UA_COMP,UA_LITERATURE, UA_AREXX, BAsmTop
@section Compatibility
@subsection to other assemblers@dots{}
Fortunately @samp{BASM} can't be 100% compatible to every
assembler on the amiga market.
Thus you can expect problems with different sources.
In general you can expect problems with commands that don't
belong to a standard like option commands.
Furthermore you should also be careful with sources that
directly depend on the assembler implementation.
Because @samp{BASM} is a 1-Pass Assembler in the normal
mode with an additional backpatch phase you shouldn't
define symbols that can't be resolved at once.
An ideal example for this practice is the @samp{Xoper2.2}
Source that was developed with the PD Assembler A68k.
While assembling with @samp{BASM} the assembler detects
that a not defined symbols is accessed through the @samp{SET}
command.
Generally this should cause an error at once but unfortunately
@samp{A68k} doesn't show anything and uses the last value of
@samp{cmdnum}.
@example
ADDCMD MACRO
cmdnum set cmdnum+1
dc.b \1,0
ENDM
.
.
.
;Here it's using `cmdnum' although
;the symbol wasn't defined yet
addq #1,d2
cmp.w #cmdnum,d2
bne.s 1$
.
.
.
;Here the cmdnum is first defined
cmdnum set 0
commds ADDCMD 'time'
ADDCMD 'taskpri'
ADDCMD 'info'
ADDCMD 'pri'
ADDCMD 'flush'
@end example
Because the A68k is a 2-Pass Assembler he can assemble this Source
without problems.
@example
dc.w "xy" is equivalent to dc.w "x","y"
dc.l "xyz1" is equivalent to dc.l "x","y","z","1"
@end example
@subsection C-Compiler Assembler
@subsubsection Dice
If you use Basm as a @samp{DASM} replacement you have to
run @samp{Basm} with the option -OAS to activate the
Smalldata mode.
If you wanna emulate the advanced @samp{Link},@samp{UnLink},
@samp{Movem} optimizing @samp{DASM} supports you have to use
the options -O,-OG,-ODh,-ODi,-ODj.
The option -OG is needed because the link stackframe
register list symbols are defined after the commands
so the assembler doesn't know them in the 1 pass mode.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node UA_LITERATURE, UA_SOFTWARE, UA_COMP, BAsmTop
@chapter Literature
@itemize
@item [Addison Wesley] RKM Libraries 2.04,CATS
@item [Addison Wesley] RKM Devices 2.04,CATS
@item [Addison Wesley] RKM Autodocs\&Includes 2.04,CATS
@item [Addison Wesley] RKM Hardware 2.04,CATS
@item [Addison Wesley] RKM Styleguide,CATS
@item [Addison Wesley] RKM Libraries 1.1,CATS
@item [Addison Wesley] RKM Intuition 1.1,CATS
@item [Addison Wesley] RKM Exec 1.1,CATS
@item [Addison Wesley] RKM Hardware 1.1,CATS
@item [Edotronik] Kommentiertes Rom-Listing 1,Dr. Ruprecht
@item [Edotronik] Kommentiertes Rom-Listing 2,Dr. Ruprecht
@item [Edotronik] Kommentiertes Rom-Listing 3,Dr. Ruprecht
@item [Ralph Babel] Guru Book,Selbstvertrieb
@end itemize
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node UA_SOFTWARE, UA_EA, UA_LITERATURE, BAsmTop
@chapter Software
For the development of Barfly the following programs were used:
@itemize
@item [CATS] Developer CD V2.0
@item [B.Hawes] WShell V2.0
@item [M.Sinz] Enforcer
@item [C.Scheppner] Mungwall
@item [SAS Institute] SAS/C
@item [GNU] GCC
@item [ASDG] CED
@item [Georg Hessmann] PasTex
@item [Stefan Stuntz] MFR 2.0d
@item [Mathias Scheler] Filer
@item [Matthew Dillon] DNet
@end itemize
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node UA_EA,UA_OPCODES,UA_SOFTWARE, BAsmTop
@chapter Assembler Addressmodes
@example
+--------------+------------------------+
| Notation | Description |
+--------------+------------------------+
+--------------+------------------------+
| EA | Effective Address |
| Dn | D0...D7 |
| An | A0...A7 |
| Xn | D0...D7, A0...A7 |
| .b | Operand Width 8Bit |
| .w | Operand Width 16Bit |
| .l | Operand Width 32Bit |
| size | w,l |
| Size | b,w,l |
| Scale | 1,2,4 or 8 |
| Xn.size*Scale| 68000-10 only Scale 1. |
+---------------------------------------+
@end example
@table @samp
@item Data register direct
Syntax: Dn
@item Address register direct
Syntax: An
@item Address register indirect
Syntax: (An)
@item Address register indirect with postincrement
Syntax: (An)+
@item Address register indirect with predecrement
Syntax: -(An)
@item Address register indirect with offset
Syntax: bd.w(An)
@item Address register indirekt with index and offset
Syntax: bd.b(An,Xn@{.Size*Scale@})
@item Address register indirect with index and offset
Syntax: (bd,An,Xn@{.Size*Scale@})
@item Address register indirect with index and offset
Syntax: (bd.b,An,Xn@{.Size*Scale@})
@item Address register indirect with index and base displacement
Syntax: (@{bd.size@{,An@{,Xn@{.Size@{*Scale@}@}@}@}@})
@item Indirekter Memory Addressierung mit postindex
Syntax: (@{[@{bd.size@{,An@}@}]@}@{Xn@{.Size@{*Scale@}@{,od.size@}@}@})
@item Indirekter Memory Addressierung mit preindex
Syntax: (@{[@{bd.size@{,An@}@}@{,Xn@{.Size@{*Scale@}]@}@{,od.size@}@}@})
@item PC Indirect
Syntax: (PC)
@item PC Indirect with offset
Syntax: bd.w(PC)
@item PC Indirect with index and offset
Syntax: bd.b(PC,Xn@{.Size*Scale@})
@item PC Indirect with index and offset
Syntax: bd.b(ZPC,Xn@{.Size*Scale@})
@item PC Indirect with index and base displacement
Syntax: (@{bd.size@{,PC@{,Xn@{.Size@{*Scale@}@}@}@}@})
@item PC Indirect with index and base displacement
Syntax: (@{bd.size@{,ZPC@{,Xn@{.Size@{*Scale@}@}@}@}@})
@item PC Indirect memory Addressing with post-index
Syntax: (@{[@{bd.size@{,PC@}@}]@}@{,Xn@{.Size@{*Scale@}@{,od.size@}@}@})
@item PC Indirect memory Addressing with post-index
Syntax: (@{[@{bd.size@{,ZPC@}@}]@}@{,Xn@{.Size@{*Scale@}@{,od.size@}@}@})
@item PC Indirect memory Addressing with pre-index
Syntax: (@{[@{bd.size@{,PC@}@}@{,Xn@{.Size@{*Scale@}]@}@{,od.size@}@}@})
@item PC Indirect memory addressing with pre-index
Syntax: (@{[@{bd.size@{,ZPC@}@}@{,Xn@{.Size@{*Scale@}]@}@{,od.size@}@}@})
@item Absolut short
Syntax: bd.w
@item Absolut long
Syntax: bd[.l]
@item Immediate Data
Syntax: #xxx
@end table
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@section Addressmode Examples
To avoid some problems here are some small examples how addressmode
have to build up.
@example
x=$40
y=$400
move.b (x,A0,D2.W),D0
move.b x(A0,D2.W),D0
;Both lines are correct
;(x,a0,d2.w) is optimized internal to (x,a0,d2.w).
;For more information please check the chapter about
;Optimizing Direct Addressmodes.
move.b (y,A0,D2.W),D0
move.b y(A0,D2.W),D0
;Now you get 2 errors, because y is not an 8bit word.
;These 2 lines shows the correct version.
move.b (y.w,A0,D2.W),D0
move.b (y.w,A0,D2.W),D0
;or
move.b (y.l,A0,D2.W),D0
move.b (y.l,A0,D2.W),D0
@end example
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node UA_OPCODES, ,UA_EA, BAsmTop
@chapter 680xx Opcode Overview
@example
+----------+---------+--------------+
| Opcode | Size | Processor |
+----------+---------+--------------+
+----------+---------+--------------+
| abcd | b | 68000..68060 |
| add | b,w,l | 68000..68060 |
| addq | b,w,l | 68000..68060 |
| adda | w,l | 68000..68060 |
| addi | b,w,l | 68000..68060 |
| addx | b,w,l | 68000..68060 |
| and | b,w,l | 68000..68060 |
| andi | b,w,l | 68000..68060 |
| asr | b,w,l | 68000..68060 |
| asl | b,w,l | 68000..68060 |
| bcc | b,w,l | 68000..68060 |
| bclr | b,l | 68000..68060 |
| bchg | b,l | 68000..68060 |
| bset | b,l | 68000..68060 |
| btst | b,l | 68000..68060 |
| bfchg | unsized | 68020..68060 |
| bfclr | unsized | 68020..68060 |
| bfext | unsized | 68020..68060 |
| bfffo | unsized | 68020..68060 |
| bfins | unsized | 68020..68060 |
| bfset | unsized | 68020..68060 |
| bftst | unsized | 68020..68060 |
| bkpt | unsized | 68020..68060 |
| callm | unsized | 68020 |
| cas | b,w,l | 68000..68060+|
| cas2 | b,w,l | 68020..68040 |
| chk | b,w,l | 68000..68060 |
| chk2 | b,w,l | 68000..68040 |
| clr | b,w,l | 68000..68060 |
| cinv | unsized | 68040..68060 |
| cpush | unsized | 68040..68060 |
| cmp | b,w,l | 68000..68060 |
| cmpa | w,l | 68000..68060 |
| cmpi | b,w,l | 68000..68060 |
| cmpm | b,w,l | 68000..68060 |
| cmp2 | b,w,l | 68020..68040 |
| dbcc | w | 68000..68060 |
| divu | w,l | 68000..68060 |
| divul | l | 68020..68060+|
| divs | w,l | 68000..68060 |
| divsl | l | 68020..68060+|
| eor | b,w,l | 68000..68060 |
| eori | b,w,l | 68000..68060 |
| ext | w,l | 68000..68060 |
| extb | l | 68020..68060 |
| exg | l | 68000..68060 |
| fabs | | 6888x |
| fsabs | | 68040..68060 |
| fdabs | | 68040..68060 |
| facos | | 6888x |
| fadd | | 6888x..68060 |
| fsadd | | 68040..68060 |
| fdadd | | 68040..68060 |
| fasin | | 6888x |
| fatan | | 6888x |
| fatanh | | 6888x |
| fbcc | | 6888x..68060 |
| fcmp | | 6888x..68060 |
| fcos | | 6888x..68060 |
| fcosh | | 6888x |
| fdbcc | | 6888x |
| fdiv | | 6888x |
| fsdiv | | 68040..68060 |
| fddiv | | 68040..68060 |
| fetox | | 6888x |
| fetoxm1 | | 6888x |
| fgetexp | | 6888x |
| fgetman | | 6888x |
| fint | | 6888x |
| fintrz | | 6888x |
| flogn | | 6888x |
| flognp1 | | 6888x |
| flog2 | | 6888x |
| flog10 | | 6888x |
| fmod | | 6888x |
| fmove | | 6888x..68060 |
| fsmove | | 68840..68060 |
| fdmove | | 68840..68060 |
| fmovecr | | 6888x..68060 |
| fmovem | | 6888x..68060+|
| fmul | | 6888x..68060 |
| fsmul | | 68040..68060 |
| fdmul | | 68040..68060 |
| fneg | | 6888x..68060 |
| fsneg | | 68040..68060 |
| fdneg | | 68040..68060 |
| fnop | | 6888x |
| frem | | 6888x |
| frestore| | 6888x..68060 |
| fsub | | 6888x..68060 |
| fssub | | 68040..68060 |
| fdsub | | 68040..68060 |
| fsave | | 6888x..68060 |
| fscale | | 6888x |
| fsglmul | | 6888x |
| fsgldiv | | 6888x |
| fsin | | 6888x |
| fsinh | | 6888x |
| fsincos | | 6888x |
| fsqrt | | 6888x..68060 |
| fssqrt | | 68040..68060 |
| fdsqrt | | 68040..68060 |
| ftan | | 6888x |
| ftanh | | 6888x |
| ftentox | | 6888x |
| ftst | | 6888x..68060 |
| ftwotox | | 6888x |
| ftrap | | 6888x..68060 |
| illegal | unsized | 68000..68060 |
| jmp | unsized | 68000..68060 |
| jsr | unsized | 68000..68060 |
| lea | l | 68000..68060 |
| link | w,l | 68000..68060 |
| lpstop | | 68060 |
| lsl | b,w,l | 68000..68060 |
| lsr | b,w,l | 68000..68060 |
| move | b,w,l | 68000..68060 |
| movea | w,l | 68000..68060 |
| moveq | l | 68000..68060 |
| movec | l | 68010..68060+|
| movem | w,l | 68000..68060 |
| movep | w,l | 68000..68040 |
| moves | b,w,l | 68010..68060 |
| move16 | | 68040..68060 |
| mulu | w,l | 68000..68060 |
| mulul | l | 68020
| muls | w,l | 68000..68060 |
| mulsl | l | 68020
| nbcd | b | 68000..68060 |
| neg | b,w,l | 68000..68060 |
| negx | b,w,l | 68000..68060 |
| nop | unsized | 68000..68060 |
| not | b,w,l | 68000..68060 |
| or | b,w,l | 68000..68060 |
| ori | b,w,l | 68000..68060 |
| pack | unsized | 68020..68060 |
| pea | l | 68000..68060 |
| pfflush | unsized | 68030 |
| pfload | unsized | 68030 |
| plpa | | 68060 |
| pmove | w,l,q | 68030 |
| ptest | unsized | 68030 |
| reset | unsized | 68000..68060 |
| rol | b,w,l | 68000..68060 |
| ror | b,w,l | 68000..68060 |
| roxl | b,w,l | 68000..68060 |
| roxr | b,w,l | 68000..68060 |
| rtd | unsized | 68000..68060 |
| rte | unsized | 68000..68060 |
| rtr | unsized | 68010..68060 |
| rts | unsized | 68000..68060 |
| rtm | unsized | 68020 |
| sbcd | b | 68000..68060 |
| scc | b | 68000..68060 |
| stop | unsized | 68000..68060 |
| sub | b,w,l | 68000..68060 |
| subq | b,w,l | 68000..68060 |
| suba | w,l | 68000..68060 |
| subi | b,w,l | 68000..68060 |
| subx | b,w,l | 68000..68060 |
| swap | w | 68000..68060 |
| tas | b | 68000..68060 |
| trap | unsized | 68000..68060 |
| tcc | ? ,w,l | 68020..68060 |
| trapv | unsized | 68000..68060 |
| tst | b,w,l | 68000..68060 |
| unlk | unsized | 68000..68060 |
| unpk | unsized | 68030..68060 |
+----------+---------+--------------+
@end example
+ means that there are differences between the processors
@contents
@bye