home *** CD-ROM | disk | FTP | other *** search
- Macro Examples
- **************
-
- Presented here are four examples of macros designed to better aquaint you
- with the features of ReSource. These macros can be found in the file
- "S/RS.macros" on the ReSource distribution Disk 1. If you have this file in
- the S: directory, it will be automatically loaded when you run ReSource.
- Otherwise, you will need to load the file using the "LOCAL MACROS/Load macros"
- function, and entering the path where this file may be found.
-
- ReSource's default execution speed for macros will be too fast for you to
- properly see the self-documenting messages that these macros display before
- they scroll away. In order to see the messages, slow the macro execution
- speed by using the "LOCAL MACROS/Execution speed/Very slow" or "LOCAL MACROS/
- Execution speed/Wait on mouse" function. If you choose "Very slow", the
- macros will execute approximately one function per second. If you would like
- even more control over macro execution, choose "Wait on mouse". ReSource
- will wait for you to press the left-mouse-button before executing the next
- macro function.
-
- In each of the example macros below, the macro functions are listed one per
- line. If a function takes a string argument, that will be found on the next
- line and indented. The first three macros disassemble ARP programs. In
- order for them to work properly, the programs MUST be from ARP release V39.1.
- All three programs can be found, and are assumed to be, in "ReSource:c" on
- the ReSource distribution Disk 1. The macros will load the programs for you;
- no need to load them into ReSource first.
-
- After completion of each macro, you may select the "Print file" macro if you
- wish a hardcopy listing of the disassembly. This macro will send its output
- to the PRT: device.
-
- Example Macro #1: Disassemble ARP 'Stack'
- =========================================
-
- This macro will load, disassemble and comment ARP release V39.1 of the
- 'Stack' program.
-
- PROJECT/Open load file
- 'resource:c/stack'
- OPTIONS 2/Multiple constants/Off
- LABELS/Create single/Label - fwd ref
- LABELS/Create single/Full-line comment
- 'Start executing here!'
- CURSOR/Relative/Next line * 1
- DISPLAY/Set data type/Code
- LABELS/Create single/Full-line comment
- 'ARP resident looks for this to recognize other ARP programs'
- CURSOR/Relative/Next line * 1
- DISPLAY/Set data type/Longs
- LABELS/Create single/Full-line comment
- 'Default stack size used by ARP "Resident"'
- CURSOR/Relative/Next line * 2
- DISPLAY/Set data type/Code
- CURSOR/Relative/Next line * 1
- LABELS/Edit single/Symbol
- 'AbsExecBase'
- LABELS/Create single/Full-line comment
- 'Get pointer to exec library'
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 1
- DISPLAY/Set Numeric base/Decimal
- LABELS/Create single/End-of-line comment
- 'Minimum version number of ARP library'
- CURSOR/Relative/Next line * 1
- SYMBOLS 1/Libraries/Exec
- LABELS/Create single/End-of-line comment
- 'Open ARP library'
- CURSOR/Relative/Next line * 1
- LABELS/Create single/End-of-line comment
- 'Did it open okay?'
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- LABELS/Create single/End-of-line comment
- 'branch if opened okay'
- CURSOR/Absolute/Forward reference
- LABELS/Create single/Label
- 'ARPOpened'
- CURSOR/Absolute/Previous location
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- LABELS/Create single/Full-line comment
- 'The following is only executed if ARP library couldn't be opened'
- CURSOR/Relative/Next line * 1
- SYMBOLS 1/Libraries/Exec
- CURSOR/Relative/Next line * 1
- LABELS/Create single/End-of-line comment
- 'Dis DOS library open okay?'
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- CURSOR/Absolute/Forward reference
- LABELS/Create single/Label
- 'NoDOS'
- CURSOR/Absolute/Previous location
- CURSOR/Relative/Next line * 1
- LABELS/Create single/End-of-line comment
- 'Put DOS base into A6 register'
- CURSOR/Relative/Next line * 1
- SYMBOLS 1/Libraries/DOS
- LABELS/Create single/End-of-line comment
- 'Get Standard Out'
- CURSOR/Relative/Next line * 3
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 2
- LABELS/Create single/End-of-line comment
- 'Length of string to be displayed'
- CURSOR/Relative/Next line * 1
- SYMBOLS 1/Libraries/DOS
- CURSOR/Relative/Next line * 7
- LABELS/Create single/End-of-line comment
- 'Put ARP library base into A6'
- CURSOR/Relative/Next line * 1
- LABELS/Edit single/Symbol
- 'AbsExecBase'
- CURSOR/Relative/Next line * 1
- SYMBOLS 1/Libraries/Exec
- LABELS/Create single/Full-line comment
- 'Get a pointer to our own task structure'
- CURSOR/Relative/Next line * 1
- SYMBOLS 2/Prf-Pz/Process structure
- LABELS/Create single/Full-line comment
- 'If this was run from CLI, pr_CLI should not be null'
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- CURSOR/Absolute/Forward reference
- LABELS/Create single/Label
- 'FromCLI'
- CURSOR/Absolute/Previous location
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Full-line comment
- 'The following code is only executed if run from WorkBench'
- CURSOR/Relative/Next line * 1
- DISPLAY/Set Numeric base/Decimal
- SYMBOLS 2/Q-R/Return codes
- LABELS/Create single/End-of-line comment
- 'Return code'
- CURSOR/Relative/Next line * 2
- LABELS/Create single/Full-line comment
- 'pr_CLI is in the D1 register. It is a BCPL pointer, this line converts to APTR'
- CURSOR/Relative/Next line * 1
- LABELS/Create single/End-of-line comment
- 'store for later use'
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Full-line comment
- 'Restore pointer to command line, and command length'
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 2
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 1
- SYMBOLS 1/Libraries/ARP
- LABELS/Create single/Full-line comment
- 'This ARP call looks at the command line'
- CURSOR/Relative/Next line * 1
- LABELS/Create single/End-of-line comment
- 'pointer to our Command Line Interface'
- CURSOR/Relative/Next line * 2
- LABELS/Create single/End-of-line comment
- 'How many parameters were given?'
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 1
- SYMBOLS 1/Libraries/ARP
- LABELS/Create single/Full-line comment
- 'Convert string given by user to a number, returned in D0'
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- CURSOR/Absolute/Forward reference
- LABELS/Create single/Label
- 'BadNumberGiven'
- CURSOR/Absolute/Previous location
- CURSOR/Relative/Next line * 1
- DISPLAY/Set Numeric base/Decimal
- LABELS/Create single/Full-line comment
- 'Check for minimum stack size. Must be at least 1800 bytes'
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- CURSOR/Absolute/Forward reference
- LABELS/Create single/Label
- 'StackTooSmall'
- CURSOR/Absolute/Previous location
- CURSOR/Relative/Next line * 1
- LABELS/Create single/End-of-line comment
- 'Divide by 4 to keep BCPL happy'
- CURSOR/Relative/Next line * 1
- SYMBOLS 2/C/CLI structure
- LABELS/Create single/Full-line comment
- 'Store the new stack size into our Command Line Interface structure'
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- CURSOR/Absolute/Forward reference
- LABELS/Create single/Label
- 'GoodExit'
- CURSOR/Absolute/Previous location
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 2
- SYMBOLS 1/Libraries/ARP
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- CURSOR/Absolute/Forward reference
- LABELS/Create single/Label
- 'ErrorExit'
- DISPLAY/Set Numeric base/Decimal
- SYMBOLS 2/Q-R/Return codes
- LABELS/Create single/End-of-line comment
- 'Return code'
- CURSOR/Absolute/Previous location
- CURSOR/Relative/Next line * 2
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 1
- SYMBOLS 1/Libraries/ARP
- CURSOR/Relative/Next line * 3
- LABELS/Create single/Label - fwd ref
- CURSOR/Absolute/Forward reference
- LABELS/Create single/Label
- 'EXIT'
- CURSOR/Absolute/Previous location
- CURSOR/Relative/Next line * 1
- SYMBOLS 2/C/CLI structure
- LABELS/Create single/Full-line comment
- 'Here, we are going to print the current stack size'
- LABELS/Create single/Full-line comment
- 'To do this, we get the number from our Command Line Interface structure,'
- LABELS/Create single/Full-line comment
- 'multiply it by four, and show its value!'
- CURSOR/Relative/Next line * 1
- LABELS/Create single/End-of-line comment
- 'Convert back to real number'
- CURSOR/Relative/Next line * 3
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 1
- SYMBOLS 1/Libraries/ARP
- CURSOR/Relative/Next line * 1
- SYMBOLS 2/Q-R/Return codes
- CURSOR/Relative/Next line * 1
- SYMBOLS 1/Libraries/ARP
- LABELS/Create single/Full-line comment
- 'Although this is a JSR (subroutine call), it never returns'
- DISPLAY/Fill-in data types
- CURSOR/Absolute/Start of file
-
- Example Macro #2: Disassemble ARP 'CD'
- =========================================
-
- This macro load, will disassemble and comment ARP release V39.1 of the 'CD'
- program.
-
- OPTIONS 2/Multiple constants/Off
- PROJECT/Open load file
- 'resource:c/cd'
- LABELS/Create single/Label - fwd ref
- LABELS/Create single/End-of-line comment
- 'Start executing here!'
- CURSOR/Relative/Next line * 1
- DISPLAY/Set data type/Code
- LABELS/Create single/Full-line comment
- 'ARP resident looks for this to recognize other ARP programs'
- CURSOR/Relative/Next line * 1
- DISPLAY/Set data type/Longs
- LABELS/Create single/End-of-line comment
- 'Default stack size useed by ARP "Resident"'
- CURSOR/Relative/Next line * 2
- LABELS/Create single/End-of-line comment
- 'Store CmdPtr and CmdLen'
- CURSOR/Relative/Next line * 1
- LABELS/Edit single/Symbol
- 'AbsExecBase'
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- LABELS/Create single/End-of-line comment
- 'Prepare to open ARP library'
- CURSOR/Relative/Next line * 1
- DISPLAY/Set Numeric base/Decimal
- LABELS/Create single/End-of-line comment
- 'Minimum version number'
- CURSOR/Relative/Next line * 1
- SYMBOLS 1/Libraries/Exec
- LABELS/Create single/End-of-line comment
- 'Open ARP library'
- CURSOR/Relative/Next line * 1
- LABELS/Create single/End-of-line comment
- 'Did ARP open okay?'
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- LABELS/Create single/End-of-line comment
- 'branch if opened okay'
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- LABELS/Create single/Full-line comment
- 'Only executed if ARP not available'
- CURSOR/Relative/Next line * 1
- SYMBOLS 1/Libraries/Exec
- LABELS/Create single/End-of-line comment
- 'Open DOS library'
- CURSOR/Relative/Next line * 1
- LABELS/Create single/End-of-line comment
- 'Have we got DOS library base in D0?'
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- LABELS/Create single/End-of-line comment
- 'Branch if not (Panic!!)'
- CURSOR/Relative/Next line * 1
- LABELS/Create single/End-of-line comment
- 'Place DOS library base into A6 register'
- CURSOR/Relative/Next line * 1
- SYMBOLS 1/Libraries/DOS
- LABELS/Create single/End-of-line comment
- 'Get StdOut handle'
- CURSOR/Relative/Next line * 1
- LABELS/Create single/End-of-line comment
- 'This will be our file handle for Write'
- CURSOR/Relative/Next line * 1
- LABELS/Create single/End-of-line comment
- 'If not StdOut, exit immediately'
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- LABELS/Create single/End-of-line comment
- 'The message to display'
- CURSOR/Relative/Next line * 2
- DISPLAY/Set Numeric base/Decimal
- LABELS/Create single/End-of-line comment
- 'Length of message to show'
- CURSOR/Relative/Next line * 1
- SYMBOLS 1/Libraries/DOS
- LABELS/Create single/End-of-line comment
- 'Show "you need arp.library V39+"'
- CURSOR/Relative/Next line * 1
- LABELS/Create single/End-of-line comment
- 'Fix up stack'
- CURSOR/Relative/Next line * 1
- LABELS/Create single/End-of-line comment
- 'Get our of here!'
- CURSOR/Relative/Next line * 5
- LABELS/Create single/Label
- 'ArpOpenedOkay'
- LABELS/Create single/End-of-line comment
- 'Put ARP library base into A6'
- CURSOR/Relative/Next line * 1
- ELS/Edit single/Symbol
- 'AbsExecBase'
- CURSOR/Relative/Next line * 1
- SYMBOLS 1/Libraries/Exec
- LABELS/Create single/Full-line comment
- 'Actually, this will be a ptr to our process also'
- CURSOR/Relative/Next line * 1
- SYMBOLS 2/Prf-Pz/Process structure
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- LABELS/Create single/End-of-line comment
- 'Branch if we were run from CLI'
- CURSOR/Relative/Next line * 1
- LABELS/Create single/End-of-line comment
- 'Executed only if from WorkBench'
- CURSOR/Relative/Next line * 1
- DISPLAY/Set Numeric base/Decimal
- SYMBOLS 2/Q-R/Return codes
- CURSOR/Relative/Next line * 2
- LABELS/Create single/End-of-line comment
- 'Convert BPTR to APTR'
- CURSOR/Relative/Next line * 1
- LABELS/Create single/End-of-line comment
- 'Restore CmdLen and CmdPtr'
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 2
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 1
- SYMBOLS 1/Libraries/ARP
- LABELS/Create single/End-of-line comment
- 'Get ARP to collect arguments'
- CURSOR/Relative/Next line * 1
- LABELS/Create single/End-of-line comment
- 'Ptr to Command Line Interface'
- CURSOR/Relative/Next line * 3
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 5
- SYMBOLS 1/Libraries/ARP
- CURSOR/Relative/Next line * 2
- SYMBOLS 1/Libraries/ARP
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 2
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 3
- SYMBOLS 1/Libraries/ARP
- CURSOR/Relative/Next line * 3
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 2
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 2
- SYMBOLS 1/Libraries/ARP
- CURSOR/Relative/Next line * 8
- SYMBOLS 1/Libraries/ARP
- CURSOR/Relative/Next line * 4
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 2
- SYMBOLS 1/Libraries/ARP
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 4
- SYMBOLS 1/Libraries/ARP
- CURSOR/Relative/Previous line * 1
- SYMBOLS 2/K-L/Lock type
- CURSOR/Relative/Next line * 5
- SYMBOLS 1/Libraries/ARP
- CURSOR/Relative/Next line * 2
- SYMBOLS 1/Libraries/ARP
- CURSOR/Relative/Next line * 2
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 3
- SYMBOLS 1/Libraries/ARP
- CURSOR/Relative/Previous line * 1
- SYMBOLS 2/Q-R/Return codes
- CURSOR/Relative/Next line * 3
- SYMBOLS 1/Libraries/ARP
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 1
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 2
- SYMBOLS 1/Libraries/ARP
- CURSOR/Relative/Next line * 5
- SYMBOLS 1/Libraries/ARP
- CURSOR/Relative/Next line * 1
- DISPLAY/Set Numeric base/Decimal
- SYMBOLS 2/Q-R/Return codes
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 3
- SYMBOLS 2/Prf-Pz/Process structure
- CURSOR/Relative/Next line * 2
- SYMBOLS 1/Libraries/ARP
- CURSOR/Relative/Next line * 2
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 3
- CURSOR/Relative/Next line * 1
- SYMBOLS 1/Libraries/ARP
- DISPLAY/Fill-in data types
- CURSOR/Absolute/Start of file
-
- Example Macro #3: Disassemble ARP 'Sort'
- =========================================
-
- This macro will load, disassemble and comment ARP release V39.1 of the 'Sort'
- program.
-
- OPTIONS 2/Multiple constants/Off
- PROJECT/Open load file
- 'resource:c/sort'
- */DOS command
- 'date >ram:rste%mpfile'
- STRINGS/Get/File
- 'ram:rste%mpfile'
- STRINGS/Edit functions/Clip end
- 10
- STRINGS/Edit functions/Prepend
- 'Disassembled '
- LABELS/Create single/Full-line comment
- 27,27
- LABELS/Create single/Label - fwd ref
- LABELS/Create single/End-of-line comment
- 'Execution starts here'
- CURSOR/Relative/Next line * 1
- DISPLAY/Set data type/Code
- LABELS/Create single/Full-line comment
- 'ARP resident looks for this to recognize other ARP programs'
- CURSOR/Relative/Next line * 1
- DISPLAY/Set data type/Longs
- LABELS/Create single/Full-line comment
- 'Default stack size used by ARP "Resident"'
- CURSOR/Relative/Next line * 2
- LABELS/Create single/End-of-line comment
- 'Store CmdPtr and CmdLen'
- CURSOR/Relative/Next line * 1
- LABELS/Edit single/Symbol
- 'AbsExecBase'
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- LABELS/Create single/End-of-line comment
- 'Prepare to open ARP library'
- CURSOR/Relative/Next line * 1
- DISPLAY/Set Numeric base/Decimal
- LABELS/Create single/End-of-line comment
- 'Minimum version number'
- CURSOR/Relative/Next line * 1
- SYMBOLS 1/Libraries/Exec
- LABELS/Create single/End-of-line comment
- 'Open ARP library'
- CURSOR/Relative/Next line * 1
- LABELS/Create single/End-of-line comment
- 'Did ARP open okay?'
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- LABELS/Create single/End-of-line comment
- 'branch if opened okay'
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- LABELS/Create single/Full-line comment
- 'Executed only if ARP library not available'
- CURSOR/Relative/Next line * 1
- SYMBOLS 1/Libraries/Exec
- LABELS/Create single/End-of-line comment
- 'Open DOS library'
- CURSOR/Relative/Next line * 1
- LABELS/Create single/End-of-line comment
- 'Have we got DOS library base in D0?'
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- LABELS/Create single/End-of-line comment
- 'Branch if not (Panic!!)'
- CURSOR/Relative/Next line * 1
- LABELS/Create single/End-of-line comment
- 'Place DOS base into A6 register'
- CURSOR/Relative/Next line * 1
- SYMBOLS 1/Libraries/DOS
- LABELS/Create single/End-of-line comment
- 'Get StdOut handle'
- CURSOR/Relative/Next line * 1
- LABELS/Create single/End-of-line comment
- 'This will be our file handle for Write'
- CURSOR/Relative/Next line * 1
- LABELS/Create single/End-of-line comment
- 'If not StdOut, exit immediately'
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- LABELS/Create single/End-of-line comment
- 'The message to display'
- CURSOR/Relative/Next line * 2
- DISPLAY/Set Numeric base/Decimal
- LABELS/Create single/End-of-line comment
- 'Length of message to show'
- CURSOR/Relative/Next line * 1
- SYMBOLS 1/Libraries/DOS
- LABELS/Create single/End-of-line comment
- 'Show "you need arp.library V39+"'
- CURSOR/Relative/Next line * 1
- LABELS/Create single/End-of-line comment
- 'Fix up stack'
- CURSOR/Relative/Next line * 1
- LABELS/Create single/End-of-line comment
- 'Get out of here!'
- CURSOR/Relative/Next line * 5
- LABELS/Create single/Label
- 'ArpOpenedOkay'
- LABELS/Create single/End-of-line comment
- 'Put ARP library base into A6'
- CURSOR/Relative/Next line * 1
- LABELS/Create single/End-of-line comment
- 'Restore CmdLen and CmdPtr'
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- LABELS/Create single/End-of-line comment
- 'Prepare args for GADS()'
- CURSOR/Relative/Next line * 1
- DISPLAY/Set Numeric base/Decimal
- LABELS/Create single/Full-line comment
- 'Clear a table of 20 longwords for GADS to use'
- CURSOR/Relative/Next line * 2
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Previous line * 1
- LABELS/Create single/Label
- 'ClearLoop'
- CURSOR/Relative/Next line * 3
- LABELS/Create single/Label - fwd ref
- CURSOR/Absolute/Forward reference
- LABELS/Create single/Label
- 'HelpfulMessage'
- CURSOR/Absolute/Previous location
- CURSOR/Relative/Previous line * 5
- CURSOR/Absolute/Forward reference
- LABELS/Create single/Label
- 'OurTemplate'
- CURSOR/Absolute/Previous location
- CURSOR/Relative/Next line * 6
- SYMBOLS 1/Libraries/ARP
- CURSOR/Relative/Next line * 2
- LABELS/Create single/Label - fwd ref
- CURSOR/Absolute/Forward reference
- LABELS/Create single/Label - fwd ref
- CURSOR/Absolute/Forward reference
- LABELS/Create single/Label
- 'ShowUsageMsg'
- CURSOR/Absolute/Previous location
- CURSOR/Relative/Next line * 2
- SYMBOLS 1/Libraries/ARP
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- CURSOR/Absolute/Forward reference
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- CURSOR/Absolute/Forward reference
- CURSOR/Relative/Next line * 3
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 2
- SYMBOLS 1/Libraries/ARP
- CURSOR/Relative/Next line * 2
- SYMBOLS 1/Libraries/ARP
- CURSOR/Relative/Next line * 1
- SYMBOLS 1/Libraries/ARP
- CURSOR/Relative/Previous line * 2
- LABELS/Create single/Label
- 'EXIT'
- CURSOR/Relative/Previous line * 6
- CURSOR/Absolute/Previous location
- CURSOR/Relative/Previous line * 1
- SYMBOLS 2/Q-R/Return codes
- CURSOR/Absolute/Previous location
- CURSOR/Relative/Previous line * 3
- LABELS/Create single/Label
- 'ShowUsage'
- CURSOR/Absolute/Previous location
- CURSOR/Relative/Next line * 2
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 2
- LABELS/Create single/Label - fwd ref
- CURSOR/Absolute/Forward reference
- CURSOR/Relative/Next line * 1
- LABELS/Edit single/Symbol
- 'AbsExecBase'
- LABELS/Create single/End-of-line comment
- 'Get exec library base'
- CURSOR/Relative/Next line * 1
- SYMBOLS 1/Libraries/Exec
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- CURSOR/Absolute/Forward reference
- SYMBOLS 2/Prf-Pz/Process structure
- CURSOR/Relative/Next line * 1
- SYMBOLS 1/Set field/Second
- SYMBOLS 2/Prf-Pz/Process structure
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- CURSOR/Absolute/Forward reference
- LABELS/Create single/Label
- 'T.Device.Msg'
- CURSOR/Absolute/Previous location
- CURSOR/Relative/Next line * 3
- SYMBOLS 1/Libraries/ARP
- CURSOR/Absolute/Previous location
- CURSOR/Relative/Next line * 2
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 2
- LABELS/Create single/Label - fwd ref
- CURSOR/Absolute/Forward reference
- LABELS/Create single/Label
- 'TempFileName'
- CURSOR/Absolute/Previous location
- CURSOR/Relative/Next line * 4
- LABELS/Create single/Full-line comment
- 'The following is a new ARP call (undocumented at time of macro creation!)'
- CURSOR/Relative/Next line * 3
- SYMBOLS 2/E-G/File open parms
- CURSOR/Relative/Next line * 1
- SYMBOLS 1/Libraries/ARP
- CURSOR/Relative/Next line * 2
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 2
- LABELS/Create single/Label - fwd ref
- CURSOR/Absolute/Previous location
- CURSOR/Relative/Next line * 2
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 2
- SYMBOLS 1/Libraries/ARP
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- CURSOR/Absolute/Forward reference
- LABELS/Create single/Label
- 'BadNumber'
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 1
- CURSOR/Absolute/Forward reference
- LABELS/Create single/Label
- 'ShowError'
- CURSOR/Relative/Next line * 2
- CURSOR/Absolute/Forward reference
- LABELS/Create single/Label
- 'ErrorExit'
- CURSOR/Absolute/Previous location
- CURSOR/Absolute/Previous location
- CURSOR/Relative/Previous line * 2
- CURSOR/Absolute/Previous location
- CURSOR/Relative/Next line * 3
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 2
- SYMBOLS 1/Libraries/ARP
- CURSOR/Relative/Next line * 5
- SYMBOLS 1/Libraries/ARP
- CURSOR/Relative/Previous line * 1
- SYMBOLS 2/K-L/Lock type
- CURSOR/Relative/Next line * 3
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 6
- SYMBOLS 1/Libraries/ARP
- CURSOR/Relative/Next line * 1
- SYMBOLS 2/E-G/FileInfoBlock
- CURSOR/Relative/Next line * 3
- SYMBOLS 1/Libraries/ARP
- CURSOR/Relative/Next line * 3
- SYMBOLS 1/Libraries/ARP
- CURSOR/Relative/Next line * 2
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 3
- SYMBOLS 2/E-G/File open parms
- CURSOR/Relative/Next line * 1
- SYMBOLS 1/Libraries/ARP
- CURSOR/Relative/Next line * 6
- SYMBOLS 1/Libraries/ARP
- CURSOR/Relative/Next line * 3
- SYMBOLS 1/Libraries/ARP
- CURSOR/Relative/Next line * 2
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 4
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 3
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 8
- SYMBOLS 1/Libraries/ARP
- CURSOR/Relative/Next line * 7
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 2
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 7
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 2
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 3
- SYMBOLS 1/Libraries/ARP
- CURSOR/Relative/Next line * 2
- SYMBOLS 1/Libraries/ARP
- CURSOR/Relative/Next line * 3
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 2
- SYMBOLS 2/E-G/File open parms
- CURSOR/Relative/Next line * 1
- SYMBOLS 1/Libraries/ARP
- CURSOR/Relative/Next line * 4
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 3
- SYMBOLS 1/Libraries/ARP
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 1
- SYMBOLS 1/Libraries/ARP
- CURSOR/Relative/Next line * 3
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 1
- SYMBOLS 2/Q-R/Return codes
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label
- '_EXIT'
- CURSOR/Relative/Previous line * 4
- CURSOR/Relative/Next line * $14
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * $17
- SYMBOLS 1/Libraries/ARP
- CURSOR/Relative/Next line * 5
- SYMBOLS 1/Libraries/ARP
- CURSOR/Relative/Next line * 2
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 2
- SYMBOLS 1/Libraries/ARP
- CURSOR/Relative/Next line * 2
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 3
- SYMBOLS 1/Libraries/ARP
- CURSOR/Relative/Next line * $0D
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 3
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 3
- SYMBOLS 1/Libraries/ARP
- CURSOR/Relative/Next line * 3
- SYMBOLS 1/Libraries/ARP
- CURSOR/Relative/Next line * 1
- SYMBOLS 2/Prf-Pz/Process structure
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 2
- SYMBOLS 1/Libraries/ARP
- CURSOR/Relative/Next line * 2
- SYMBOLS 2/Prf-Pz/Process structure
- CURSOR/Relative/Next line * 5
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 2
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 2
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 9
- SYMBOLS 1/Libraries/ARP
- CURSOR/Relative/Next line * 3
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 2
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 1
- SYMBOLS 1/Libraries/ARP
- CURSOR/Relative/Next line * 1
- SYMBOLS 1/Libraries/ARP
- CURSOR/Relative/Previous line * 4
- CURSOR/Absolute/Forward reference
- CURSOR/Relative/Next line * 3
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- CURSOR/Absolute/Previous location
- CURSOR/Relative/Next line * 7
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 2
- LABELS/Create single/Label - fwd ref
- CURSOR/Absolute/Forward reference
- LABELS/Create single/Label
- 'CompareStringLoop'
- CURSOR/Absolute/Previous location
- CURSOR/Relative/Next line * 2
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 1
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * $0B
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Previous line * 1
- LABELS/Create single/Label
- 'StringEndLoop'
- CURSOR/Relative/Next line * 4
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 2
- LABELS/Create single/Label - fwd ref
- CURSOR/Relative/Next line * 3
- LABELS/Create single/Label - fwd ref
- DISPLAY/Fill-in data types
- CURSOR/Absolute/Start of file
-
- Example Macro #4: Disassemble BOOT sector
- =========================================
-
- This macro will disassemble and comment the boot sector of the disk in drive
- DF0:.
-
- PROJECT/Read tracks
- 'df0: 0 0 2'
- DISPLAY/Set data type/ASCII
- CURSOR/Relative/Next byte * 4
- DISPLAY/Set data type/Longs
- CURSOR/Relative/Next line * 1
- DISPLAY/Set data type/Longs
- CURSOR/Relative/Next line * 1
- DISPLAY/Set data type/Code
- LABELS/Create multiple/All
- DISPLAY/Fill-in data types
- CURSOR/Absolute/Start of file
- LABELS/Edit single/Full-line comment
- 'The first longword of a DOS disk is "DOS" followed by hex 0,'
- LABELS/Edit single/Full-line comment
- 'or hex 1 if formatted using fast filesystem'
- CURSOR/Relative/Next line * 1
- LABELS/Edit single/Full-line comment
- 'The second longword of a bootable boot sector is the checksum'
- CURSOR/Relative/Next line * 1
- LABELS/Edit single/Full-line comment
- 'I'm not quite sure what the next longword is used for'
- CURSOR/Relative/Next line * 1
- LABELS/Edit single/Full-line comment
- 'If the first longword is "DOS", followed by hex 0, and'
- LABELS/Edit single/Full-line comment
- 'the checksum is correct for the current boot sector contents,'
- LABELS/Edit single/Full-line comment
- 'when you boot on the disk, control is passed to offset $0C, HERE'
- CURSOR/Relative/Next line * 1
- SYMBOLS 1/Libraries/Exec
- LABELS/Create single/End-of-line comment
- 'is DOS still around?'
- CURSOR/Relative/Next line * 2
- LABELS/Create single/End-of-line comment
- 'branch if no DOS around'
- CURSOR/Relative/Next line * 1
- LABELS/Edit single/Full-line comment
- 'place DOS base into A0'
- CURSOR/Relative/Next line * 1
- SYMBOLS 1/Libraries/DOS
- LABELS/Edit single/Full-line comment
- 'We MUST place the version number of DOS into A0 if we plan to boot properly'
- CURSOR/Relative/Next line * 1
- LABELS/Edit single/Full-line comment
- 'when we return to Kickstart, D0 must be zero if the disk is to be booted'
- CURSOR/Relative/Next line * 2
- LABELS/Edit single/Full-line comment
- 'Something is wrong!! Don't boot on this disk!'
- CURSOR/Relative/Previous line * 1
- CURSOR/Absolute/Start of file
- OPTIONS 1/DCB statements/ON
- OPTIONS 1/DCB statements/OFF
-