CONTENTS | INDEX | PREV | NEXT
SAMPLE WEDGE COMMANDS AND RESULTING OUTPUT
NOTE: Normally you would set up a ".w" script and/or icon to install a
WEDGE.
Example 1.
WEDGE exec.library AvailMem function (oxff28) with Stack reporting (OPT S).
Only report on calls made by Workbench or the CLI command AVAIL.
Enter:
1> run Toolkit:Debug/Wedge/WEDGE exec 0xff28 opt s "c=AvailMem d1=Type"
"t=Workbench|Avail"
Sample WEDGE Output:
----------------------------------------------------------------------------
AvailMem d1=Type
COMMAND: Avail PROCESS: Initial CLI ($203798) [F]
Pre-wedge a7=$232D7C Task Stack: Lower=$203854, Upper=$203E94
Command Stack: Base at startup=$232DF8, Size=10000
AvailMem d1=Type
PROCESS: Workbench ($20FB40)
Pre-wedge a7=$210F14 Task Stack: Lower=$20FBFC, Upper=$210F84
----------------------------------------------------------------------------
When a CLI command calls the WEDGEd function, the COMMAND name is reported.
In addition, if Stack reporting has been requested, both the PROCESS and the
separate COMMAND stack are reported. Also note the "[F]" in one of the
reports. This means the task calling the function had a Forbid() in effect.
A Disable() would have been reported as "[D]", both as "[FD]".
Example 2
WEDGE dos.library Open function (offset 0xffe2), report registers d1 and d2
(0x0006). Report what d1 points at (0x0002), and report both Result (opt r)
and Stack (opt s).
Enter:
1> run Toolkit:Debug/Wedge/WEDGE dos 0xffe2 0x0006 0x0002 opt rs "c=Open
d1=Name d2=Mode"
Sample WEDGE Output when Workbench calls Open (".info",MODE_NEWFILE):
---------------------------------------------------------------------------
Open d1=Name d2=Mode
PROCESS: Workbench ($20FB40)
d1 $00FECD60 -> $2E696E66 6F005359 533A5379 7374656D .info.SYS:System
d2 $000003EE
Pre-wedge a7=$210DFC Task Stack: Lower=$20FBFC, Upper=$210F04
Result ID=6
Result: $86EB9 (ID=6)
---------------------------------------------------------------------------
In the ASCII dump at the right, all unprintable values, such as the 0
terminating the ".info" filename, are printed as a period ("."). All
output lines except the "PROCESS" line are optional and are requested via
CLI arguments or TOOL TYPES.
The OpenWindow.w, Open.w, and AvailMem.w icons have been provided for
wedging common system functions. OpenWindow.w installs a WEDGE into $FF34
of the intuition.library; Open.w installs a WEDGE into $FFE2 of the
dos.library; and AvailMem.w installs a WEDGE into $FF28 of the exec.library.
These projects can be run through the Workbench. To change any of the
parameters, change the TOOL TYPES entries in the icon's Info window.
The icons are set up for Local output. The scripts are set up for default
(serial) output with no baud rate specified. To use serial scripts for
Local or Parallel debugging, pass the appropriate flag when you execute the
script. In order for Execute to find the scripts, you must cd where they
are or copy them to your s: directory. Here are some examples of passing
options to the AvailMem.w script:
execute AvailMem.w prs (prs = Parallel, Result reports, Stack reports)
execute AvailMem.w l (l = Local)
execute AvailMem.w dr (dr = Debug on first call, Result reports)