,ll 6.6
,cs 10
,pl 66
,lm 0.2,0.5
,pn 9
,ju
,hd
,ce
OmegaSoft 6809 Cross Pascal Target Debugger (V1.0)
,,
,ft

,ce 1
14-##
,,
,ce
OmegaSoft 6809 Cross Pascal Target Debugger (V1.0)
,ce
PASCAL MODE COMMANDS

Li [<line>]
This command will list the source lines near the line specified. If line is not specified, the current line you are stopped at is used. Line numbers will be provided, and breakpointable statements will be noted with an asterisk.

MD N
Define macro. Macro N is set to the series of commands that follow. Valid macro numbers are 1 through 20. You will be prompted for commands, one per line. To terminate the macro definition enter only a "#" on the line.

Me N [cnt]
Execute macro N cnt times. The commands specified in the macro definition are executed just as if they were entered from the terminal. If cnt is not specified then the macro is executed once, else it is executed cnt number of times.

Nu <name>
Will display the line number of the begin statement of the procedure named. If the name is "PROGRAM" then the begin statement of the main program will be displayed.

PR [cnt]
Proceed and trace cnt statements. If cnt is not specified then one statement will be executed.

Pt [<line>]
Proceed and set temporary breakpoint. If no line number is specified then execution will continue until a breakpoint is encountered, an error occurs, or the program terminates.

Qu
Quit debugger.

Re {<line>}
Remove breakpoints. If no line is specified then you will be prompted to see if you wish to remove all breakpoints.

St [M][R]
Display where you are stopped due to breakpoint, trace, or error. If the M option is used then a module list will also be displayed. If the R option is used then the register contents will also be displayed.

SV
Re-installs all vectors set while in filer mode (up to 20). This command is necessary if you had to reset the target system for any reason. Resetting the target system defaults all vectors, so this command must be used before re-starting the user program if any vectors were set in Filer mode. One way to avoid this inconvenience is to have the user program set the vectors itself. 

T+
Enable line number trace storage.

T-
Disable line number trace storage.
,pg
,ce
PASCAL MODE COMMANDS

TS [nn]
Displays last nn statement executed (if T+ option on). If nn is not specified then the last 10 statements executed are displayed. The maximum number of statements that can be displayed is 50.

TP [nn]
Displays the last nn procedure entered and exited. If nn is not specified then the last 10 entries are displayed. The maximum number of entries that can be displayed is 50.

$<command line>
If supported on your version, allows you to pass the command line to the operating system. See chapter 2 for details.

,ce
ASSEMBLY MODE

This mode allows debugging at the assembly language level. You cannot return to the filer mode but you can switch back and forth between assembly mode and pascal mode.

,ce
ADDRESS SYNTAX

Instruction addresses are hex numbers plus an offset. Data addresses are hex numbers without an offset.

,ce
ASSEMBLY MODE COMMANDS

As from
Assemble, disassemble starting at location from. The code is dis-assembled starting at location from. To move through the code use the cursor control keys (same as screen editor). The following keys are functional : move down one, move up one, move down half page, and move up half page. If you wish to change an instruction then enter the key for replace and you may then enter the new instruction. The key for new line will put that instruction into memory and move you to the next instruction. The key for escape will put that instruction into memory and exit the replace mode. The key for edit quit will exit you from the assemble/disassemble mode. Up to 50 lines can be displayed, if you hit the end of the 50 lines you must exit and start again at a higher address. If there is a period "." in the from specification it is taken as a pascal line number instead of an address.

Br {loc[;mac]}
Enters breakpoints at the specified locations. Up to 16 breakpoints may be active. Note that breakpoints take up 4 bytes and so you cannot put a breakpoint at a one word instruction and one immediately following it. If no location is specified then the currently active breakpoints are displayed. If a macro number is specified that macro will be run when the breakpoint is encountered. If you encounter one of these breakpoints you must remove the breakpoint before proceeding.

BM from to dest
Block move start at location from going to location to (inclusive) with the data stored starting at location dest. The destination cannot be between from and to.
,pg
,ce
ASSEMBLY MODE COMMANDS

CA <expression>
Calculate result of expression. The format of expression is :
  left op right
with spaces between left and op and op and right. Op can be either "+" or "-". Left and right are longhex values.

Ch <register>
Change register value. Displays the current contents of the register and allows you to change it. If you wish to leave the register alone simply enter a carriage return when prompted for the new value. The registers that can be changed are CC, A, B, D, DP, X, Y, U, S, and PC.

Du from [to]
Dump memory starting at location from and going until location to. If to is not specified then from + $FF will be used. The address, hex contents, and ascii equivalents are displayed 16 bytes per line. This routine is also used when displaying pascal variables as structures.

Fi from to <pattern>
Finds the pattern starting at location from and going until location to. The pattern can consist of up to 16 bytes in length. If the pattern starts with a single quote "'" then the characters that follow are considered a text pattern. If the pattern does not start with a "'" then the pattern must be a series of hex numbers separated by spaces. If a text pattern was entered then upper/lower case is ignored as is the parity (or sign) bit. All occurrences of the pattern will have their address displayed.

He
Displays a menu of commands that are valid in this mode.

In from to value
The byte equivalent of the hex value is stored in locations starting at from up until location to inclusive.

Mm loc 
Memory modify. The value starting at loc is displayed and then you have the following options :
  /   : exit memory modify mode.
  ^   : backup up to the previous address.
  'X  : put in character X and move to next address.
  "X  : put in character X + $80 and move to next address.
  nn  : put in hex value nn and move to next address.
A period immediately preceding a new value, such as :
1400 3F .3E
1400
will prevent the location from changing, this is useful when you must place a number of values in the same location, such as required when initializing some I/O devices.

MS loc 
This command is identical in operation to the memory modify command it does not read the location, this is useful when setting values into a write only I/O device.

Of loc
Set offset, default is zero. This offset only applies to instruction related addresses, such as breakpoints and assembly/disassembly.
,ce
ASSEMBLY MODE COMMANDS

PA
Change to pascal debug mode.

Pt [loc]
Proceed, putting a temporary breakpoint in if loc is specified. The breakpoint is removed as soon as it is encountered.

Qu
Quit debugger.

Re {loc}
Remove breakpoints at the specified locations. If no location is specified then you will be prompted to see if you want to remove all breakpoints.

St
Display user program registers.

$<command line>
If supported on your version, allows you to pass the command line to the operating system. See chapter 2 for details.

,ce
GENERAL OPERATIONAL NOTES

If your program requires any of the standard I/O devices (input, output, auxout, keyboard, or disk files) it must use the Filer T command before linking.

As an example of filer commands, suppose you have a main program called test, two pascal modules called test1 and test2, an assembly language module called test3, and your program uses input and output. You can type in at filer mode prompt, or edit into a debugger command file the following :

i test test1 test2
a test3
t
l
p

If this were edited into a file called "test.df" for instance, then you could run the debugger :

db test.df

It would then load files test through test3, and link them together, and leave you in pascal mode ready for your commands.

More commonly the control file used is the shell file created by the linkage creator.

The execute macro on breakpoint facility can be used to place commands to display key variables at certain points in the program without stopping the program, as an example :
<P> md 1
<M> d loop_counter
<M> d error_flag
<M> p
<P> b test.35;1
<P>
,pg
,ce
GENERAL OPERATIONAL NOTES

This sequence would display the variables loop_counter and error_flag each time statement test.35 was executed and then continue execution. This feature can also be used to change the value of a variable at a certain statement, such as :
<P> md 1
<M> c error_flag
<M> false
<M> p
<P>

If this macro were specified for a breakpoint, then error_flag would be set to false each time the line were executed.

,ce
CONVERTING THE I/O FILES FOR ROMMING YOUR PROGRAM

After you are done debugging your program you will want to replace the target debugger EPROMS with those that contain your program. The example I/O drivers IO2661 and IO6850 have conditional assembly that allow you to convert them for use as standard input, output, and keyboard when running stand alone without the debugger. The runtime files sd2 and se1 also have conditional assembly for this same purpose. As an example, you might want to create an I/O library for a single board computer you are using :

copy io2661 sbs1
copy sd2 sbs2
copy se1 sbs3
<change conditional assembly and assemble all three>
xlb sbslib sbs1 sbs2 sbs3

you could then specify "sbslib" to the linkage creator when prompted for the I/O library to use (non-auto mode).
