%W% %G% %R% 

Help File for ADSP-21020 Emulator

To convert to simulator help file:

1) delete from "xxxx" down in both sections

2) perform the following global substitutions:

OLD         ->      NEW
---                 ---
EMU         ->      SIM
Emulator    ->      Simulator
emulator    ->      simulator
ice21k      ->      sim21k

%%
1,0:1
2,0:2
3,0:3
4,0:4
5,0:5
6,0:6
7,0:7
8,0:8
9,0:9
10,0:10
11,0:11
12,0:12
14,0:14
15,0:15
16,0:16
17,0:17
18,0:18
19,0:19
20,0:20
21,0:21
22,0:21
23,0:21
24,0:24
25,0:24
26,0:24
27,0:27
28,0:27
29,0:29
30,0:29
31,0:31
32,0:31
33,0:33
34,0:33
35,0:35
36,0:36
37,0:37
38,0:38
39,0:39
40,0:40
41,0:41
42,0:42
43,0:43
44,0:44
45,0:45
46,0:46
47,0:47
48,0:48
50,0:50 
51,0:50
52,0:50
53,0:50
54,0:54 
55,0:54
56,0:54
57,0:57
58,0:58
59,0:59
60,0:60
61,0:61
62,0:62
65,0:65
66,0:66
67,0:67
68,0:68
69,0:69
70,0:70
71,0:71
72,0:72
73,0:73
77,0:77
78,0:78
79,0:79
80,0:80
81,0:81
82,0:82
83,0:83
84,0:84
85,0:85
86,0:86
87,0:87
88,0:87
GUI_BATON_COM_SYM_PM_DELETE_ALL,0:GUI_BATON_COM_SYM_PM_DELETE_ALL
89,0:89 
90,0:89
GUI_BATON_COM_SYM_DM_DELETE_ALL,0:GUI_BATON_COM_SYM_DM_DELETE_ALL
92,0:92
93,0:93
94,0:94
95,0:95
98,0:98
99,0:99
101,0:101
102,0:102
103,0:103
104,0:104
105,0:105
106,0:106
107,0:107
108,0:108
110,0:110
111,0:111
112,0:112
113,0:113
114,0:114
115,0:115
116,0:115
117,0:117
120,0:120
121,0:121
122,0:122
123,0:123
124,0:124
126,0:126
127,0:127
128,0:128
129,0:129
130,0:130
131,0:131
132,0:132
133,0:133
134,0:134
135,0:135
136,0:136
137,0:137
138,0:138
139,0:139
174,0:174
175,0:175
177,0:177
178,0:178
179,0:179
180,0:180
181,0:181
182,0:182
186,0:186
187,0:187
188,0:188
189,0:189
190,0:190
191,0:191
192,0:192
193,0:193
194,0:194
195,0:195
196,0:196
197,0:197
198,0:198
%%
.1
Menu Bar 
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The menu bar provides the means for all emulator windows to be chosen and 
subsequently displayed.  At the top of the screen are a list of categories.
Upon selecting one of the categories at the top of screen, a drop down submenu 
containing choices relevant to the selected category will appear.  These choices
typically specify windows to open or actions to occur.  Selecting one of these
options will either open the chosen window or cause the emulator to take the 
given action. 

Note: The <ESC> key will cancel a menu selection.  Press <ESC> twice if a
submenu is displayed, but just press <ESC> once if only the menu bar itself is
selected.  

These are the categories of the menu bar:

@190[File]  @191[Core]  @GUI_BATON_APP _HELP_FC2[Memory]  @193[Execution]  @194[Setup]  @195[Help]
.3
Quit
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The Quit function provides a means to leave the emulator and return to the
operating system.  
A pop-up window appears prompting the user for confirmation before the emulator
quits.

.4
Abort 
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The Abort function actually provides several functions depending upon the
current context.  It is usually invoked by pressing the <ESC> key.

   - When invoked from the @195[help system], this function will return the user to 
     the emulator.

   - When invoked from the active window, this function will close the active
     window.

   - When invoked from the @1[menu bar], this function will cancel any selections
     made from the menu.

   - When invoked from a pop-up, this function will close the pop-up and cancel
     any actions incurred by the pop-up.

.5
Next Window
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This function allows the user to move between windows.  This function is invoked
by the @188[<F2>] key.  
.6
Redraw Display
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This function simply redraws the entire screen.  This function is invoked from
the @194[Setup Menu].
.7
Center Windows
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This function will center all open windows to the middle of the screen.  It is 
typically used when some window(s) has been moved off the screen.  This function
is invoked from the @194[Setup Menu].
.8
List Windows
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This function will produce a pop-up window containing a list of all open
windows.  The user can select from the list a window to transfer control into or
simply remain in the current window.

This function can be invoked from the @194[Setup Menu] or by pressing @188[<Ctrl-L>].

.9
Move Window Up
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This function will move the current window, if that window is a movable window,
toward the top of the screen.  This function can be invoked by pressing the
@188[<F5>] key.  

The mouse can also be used to move windows by clicking and dragging the window
border to the new location.
.10
Move Window Down
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This function will move the current window, if that window is a movable window,
toward the bottom of the screen.  This function can be invoked by pressing
the @188[<F6>] key.  

The mouse can also be used to move windows by clicking and dragging the window
border to the new location.
.11
Move Window Left
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This function will move the current window, if that window is a movable window,
toward the left side of the screen.  This function can be invoked by pressing
the @188[<F7>] key.  

The mouse can also be used to move windows by clicking and dragging the window
border to the new location.
.12
Move Window Right
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This function will move the current window, if that window is a movable window,
toward the right side of the screen.  This function can be invoked by pressing
the @188[<F8>] key.  

The mouse can also be used to move windows by clicking and dragging the window
border to the new location.
.14
Make Window Taller
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This function will vertically increase the size of the current window, if that
window is a sizable window.  This function can be invoked by pressing the
@188[<Shift-F5>] key.  

The mouse can also be used to size windows by clicking and dragging a corner
of the window border.
.15
Make Window Shorter
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This function will vertically decrease the size of the current window, if that
window is a sizable window.  This function can be invoked by pressing the
@188[<Shift-F6>] key.  

The mouse can also be used to size windows by clicking and dragging a corner
of the window border.
.16
Make Window Wider
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This function will horizontally increase the size of the current window, if that
window is a sizable window.  This function can be invoked by pressing the
@188[<Shift-F7>] key.  

The mouse can also be used to size windows by clicking and dragging a corner
of the window border.
.17
Make Window Narrower
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This function will horizontally decrease the size of the current window, if that
window is a sizable window.  This function can be invoked by pressing the
@188[<Shift-F8>] key.  

The mouse can also be used to size windows by clicking and dragging a corner
of the window border.
.18
Toggle Window Format
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This function will toggle the current display format of the current window, 
assuming the window is capable of supporting multiple formats.  For example,
when the current window is a Program Memory window, this function will
change the display format from it's current format to either hexadecimal, 
fixed point, floating point or disassembled.  

This function is normally invoked from the @194[Setup Menu] or via the @188[<Ctrl-T>] key.

.19
Video Mode
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This function allows the user to change the video mode of the display.  The
emulator supports 3 video modes, all of which are text modes:

                 - 80 Columns x 25 Rows (default)
                 - 80 Columns x 43 Rows (EGA and VGA only)
                 - 80 Columns x 50 Rows (VGA only)

The emulator first determines which modes are supported on the hardware 
platform and then pops up a selection menu containing a list of choices based
upon the hardware configuration.  The video mode is saved in and loaded from
the the window file.  This function is invoked from the the @194[Setup Menu]. 

See also @73[Save Window File] and @72[Load Window File].

(NOTE: This feature is supported on PC platforms only.)
.20
About Emulator...
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This function displays information about the emulator.  This function is
invoked from the the @195[Help Menu].


.21
Register File 
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This is the display of the foreground Register File registers.  The Register
File provides the interface between the main processor buses (Program Memory
Data and Data Memory Data) and the computational units.  The register file
consists of 32 data registers (16 primary and 16 secondary registers).  All
registers are 40 bits wide.  The selection of primary and secondary sets is
made via the @35[MODE1] register.

The register file can be displayed in hexadecimal, fixed point and floating
point formats.  The current format can be changed by pressing @18[<Ctrl-T>].
See also @24[Alternate Register File].  
.24
Alternate Register File 
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This is the display of the Alternate Register File registers.  The Alternate
Register File Displays show the set of register file registers that are 
currently in the background as selected by the @35[MODE1] register.

The alternate register file can be displayed in hexadecimal, fixed point and 
floating point formats.  The current format can be changed by pressing @18[<Ctrl-T>].
See also @21[Register File].

.27
DAG1 Registers
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

These are the Data Address Generator 1 (DAG1) registers.  DAG1 is used to
generate data memory addresses.  There are 8 sets of 32 bit registers in DAG1:

                    Index Registers:   I0 thru I7
                    Modify Registers:  M0 thru M7
                    Base Registers:    B0 thru B7
                    Length Registers:  L0 thru L7

Each register set (I, M, B, and L registers) has an alternate set.  The
alternate registers are organized into 2 groups, a lower half (0-3) and an
upper half (4-7).  For each group, the selection of primary or alternate
register sets is controlled by a bit in the @35[MODE1] register.  

The DAG1 registers can be displayed in hexadecimal and fixed point formats. 
Note that in the fixed point display format the I, B and L registers are
displayed as 32 bit unsigned values whereas the M registers are displayed in 32
bit signed two's complement format.  The current format can be changed by 
pressing @18[<Ctrl-T>].

See also @29[Alternate DAG1 Registers]. 
.29
Alternate DAG1 Registers
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

These are the Alternate Data Address Generator 1 (DAG1) registers.  The
Alternate DAG1 Register display shows the set of DAG1 registers that are
currently in the background as selected by the @35[MODE1] register.

The Alternate DAG1 registers can be displayed in hexadecimal and fixed point
formats.  Note that in the fixed point display format the I, B and L
registers are displayed as 32 bit unsigned values whereas the M registers
are displayed in 32 bit signed two's complement format.  The current format
can be changed by pressing @18[<Ctrl-T>].

See also @27[DAG1 Registers]. 
.31
DAG2 Registers
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

These are the Data Address Generator 2 (DAG2) registers.  DAG2 is used to
generate program memory addresses.  There are 8 sets of 24 bit registers in 
DAG2:

                    Index Registers:   I8 thru I15
                    Modify Registers:  M8 thru M15
                    Base Registers:    B8 thru B15
                    Length Registers:  L8 thru L15

Each register set (I, M, B, and L registers) has an alternate set.  The
alternate registers are organized into 2 groups, a lower half (8-11) and an
upper half (12-15).  For each group, the selection of primary or alternate
register sets is controlled by a bit in the @35[MODE1] register.  

The DAG2 registers can be displayed in hexadecimal and fixed point formats. 
Note that in the fixed point display format the I, B and L registers are
displayed as 24 bit unsigned values whereas the M registers are displayed in 24
bit signed two's complement format.  The current format can be changed by 
pressing @18[<Ctrl-T>].

See also @33[Alternate DAG2 Registers]. 
.33
Alternate DAG2 Registers
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

These are the Alternate Data Address Generator 2 (DAG2) registers.  The
Alternate DAG2 Register display shows the set of DAG2 registers that are
currently in the background as selected by the @35[MODE1] register.

The Alternate DAG2 registers can be displayed in hexadecimal and fixed point
formats.  Note that in the fixed point display format the I, B and L
registers are displayed as 32 bit unsigned values whereas the M registers
are displayed in 32 bit signed two's complement format.  The current format
can be changed by pressing @18[<Ctrl-T>].

See also @31[DAG2 Registers]. 
.35
MODE1 Register
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The MODE1 register is a 32 bit control register that enables various operating
modes of the ADSP-21020.  The bits in MODE1 are defined as follows:

   Bit    Name    Definition
    0             Reserved
    1     BR0     Bit-reverse for I0
    2     SRCU    Alternate register select for computation units
    3     SRD1H   @27[DAG1] alternate register select (4-7)
    4     SRD1L   @27[DAG1] alternate register select (0-3)
    5     SRD2H   @31[DAG2] alternate register select (12-15)
    6     SRD2L   @31[DAG2] alternate register select (8-11)
    7     SRRFH   @21[Register File] alternate select for R(8-15)
    10    SRRFL   @21[Register File] alternate select for R(0-7)
    11    NESTM   Interrupt Nesting Enable
    12    IRPTEN  Global Interrupt Enable
    13    ALUSAT  Enable ALU saturation (full scale in fixed point)
    14            Reserved
    15    TRUNC   1 = floating point truncation, 0 = round to nearest
    16    RND32   1 = round floating point to 32 bits, 0 = round to 40 bits
    17-31         Reserved
                   @35[ ]
.36
MODE2 Register
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The MODE2 register is a 32 bit control register that enables various operating
modes of the ADSP-21020.  The bits in MODE2 are defined as follows:

   Bit    Name    Definition
    0     IRQ0E   IRQ0 sensitivity (1 = edge, 0 = level)
    1     IRQ1E   IRQ1 sensitivity (1 = edge, 0 = level)
    2     IRQ2E   IRQ2 sensitivity (1 = edge, 0 = level)
    3     IRQ3E   IRQ3 sensitivity (1 = edge, 0 = level)
    4     CADIS   Cache Disable
    5     TIMEN   Timer Enable
    6-14          Reserved
    15    FLG0O   FLAG0 Direction (1 = output, 0 = input)
    16    FLG1O   FLAG1 Direction (1 = output, 0 = input)
    17    FLG2O   FLAG2 Direction (1 = output, 0 = input)
    18    FLG3O   FLAG3 Direction (1 = output, 0 = input)
    19    CAFRZ   Cache Freeze
    20-31         Reserved
.37
ASTAT
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The Arithmetic Status Register (ASTAT) information is generated by the 
computational units.  The bits in ASTAT are define as follows:

   Bit    Name    Definition
    0     AZ      ALU result zero or floating point underflow
    1     AV      ALU overflow
    2     AN      ALU result negative
    3     AC      ALU fixed point carry
    4     AS      ALU X input sign (ABS and MANT operations)
    5     AI      ALU floating point invalid operation
    6     MN      Multiplier result negative
    7     MV      Multiplier overflow
    8     MU      Multiplier floating point underflow
    9     MI      Multiplier floating point invalid operation
    10    AF      ALU floating point operation
    11    SV      Shifter overflow
    12    SZ      Shifter result zero
    13    SS      Shifter input sign
    14-17         Reserved
    18    BTF     Bit test flag for system registers
    19    FLG0    FLAG0 value
    20    FLG1    FLAG1 value
    21    FLG2    FLAG2 value
    22    FLG3    FLAG3 value
    23            Reserved
    24-31         CACC (Compare Accumulation) bits
      @37[ ]
.38
STKY Register
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The Sticky Arithmetic Status Register (STKY) is a register that retains some of
the bits that have been set by an operation even after those bits have been
cleared.  It maintains "sticky" versions of some of the @37[ASTAT] bits as well as
circular buffer overflow.  In addition it contains helpful debug information
on stack overflow and underflow for the @83[PC], @84[status] and @86[loop address] and 
@85[loop counter] stacks.   The bits in STKY are define as follows:

   Bit    Name    Definition
    0     AUS     ALU floating point underflow
    1     AVS     ALU floating point overflow
    2     AOS     ALU fixed point overflow 
    3-4           Reserved
    5     AIS     ALU floating point invalid operation
    6     MOS     Multiplier fixed point overflow
    7     MVS     Multiplier floating point overflow
    8     MUS     Multiplier floating point underflow
    9     MIS     Multiplier floating point invalid operation
    10-16         Reserved
    17    CB7S    @27[DAG1] circular buffer 7 overflow
    18    CB15S   @31[DAG2] circular buffer 15 overflow
    19-20         Reserved
    21    PCFL    @83[PC stack] full
    22    PCEM    @83[PC stack] empty
    23    SSOV    @84[Status stack] overflow
    24    SSEM    @84[Status stack] empty
    25    LSOV    @86[Loop address stack] and @85[loop counter stack] overflow
    26    LSEM    @86[Loop address stack] and @85[loop counter stack] overflow
    27-31         Reserved
                     @38[ ]
.39
Interrupt Control Registers
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

Interrupts are controlled by a set of 3 interrupt control registers:

   - IRPTL (Interrupt Latch Register) contains any current interrupt or any
pending interrupt.  

   - IMASK (Interrupt Mask Register) is a register which masks individual
interrupts.  If an IMASK bit is set, the corresponding interrupt is unmasked
(enabled), if the bit is cleared, the interrupt is masked (disabled).

   - IMASKP (Interrupt Mask Pointer Register) is used only in nesting mode.  It
is used to generate a temporary interrupt that masks all interrupts of equal or
lower priority to the interrupt being serviced.  

The following bit definitions apply to IRPTL, IMASK and IMASKP (Note: Interrupt
priority is from 0 (highest) to 32 (lowest)):

   Bit    Name    Definition
    0     EMUI    Emulator Interrupt (Non-Maskable)
    1     RSTI    Reset Interrupt (Non-Maskable)
    2             Reserved
    3     SOVFI   @84[Status]/@85[Loop Counter]/@86[Loop Address] stack overflow or @83[PC] stack 
                  full
    4     TMZOI   @41[Timer] = 0 (high priority option)
    5     IRQ3I   IRQ3 asserted
    6     IRQ2I   IRQ2 asserted
    7     IRQ1I   IRQ1 asserted
    8     IRQ0I   IRQ0 asserted
    9-10          Reserved
    11    CB7I    @27[DAG1] circular buffer 7 overflow interrupt
    12    CB15I   @31[DAG2] circular buffer 15 overflow interrupt
    13            Reserved
    14    TMZI    @41[Timer] = 0 (low priority option)
    15    FIXI    Fixed point overflow exception
    16    FLTOI   Floating point overflow exception
    17    FLTUI   Floating point underflow exception
    18    FLTII   Floating point invalid exception
    19-23         Reserved
    24    USER0   User software interrupt 0
    25    USER1   User software interrupt 1
    26    USER2   User software interrupt 2
    27    USER3   User software interrupt 3
    28    USER4   User software interrupt 4
    29    USER5   User software interrupt 5
    30    USER6   User software interrupt 6
    31    USER7   User software interrupt 7
    32    USER8   User software interrupt 8
                  @39[ ]
.40
User Status Registers
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The User Status Registers, USTAT1 and USTAT2, are user defined.  Because they 
are system registers, they can be set and tested using system instructions.  An
external status or input flag register can be loaded into a user register and
tested.  Likewise, external output flags can be controlled by setting a bit in
a user register and writing the user register to an external flag register.
.41
Timer Registers
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The ADSP-21020 includes a programmable interval timer to allow periodic
interrupt generation.  The timer can be enabled or disabled via a control bit 
in the @36[MODE2] register.  The 2 registers controlling the timer are TCOUNT and
TPERIOD.  The registers are 32 bits wide and are readable and writable.  

TCOUNT contains the current value of the counter.  It can be initialized by
loading with an initial counter value.  When the timer is enabled, the TCOUNT
register is decremented each clock cycle.  When the TCOUNT value is 0, the 
timer interrupt is generated.  On the next clock cycle the counter is loaded
from the TPERIOD register.  The TPERIOD register thereby specifies the 
frequency of timer interrupts.  The number of cycles between interrupts is
TPERIOD + 1.  

Both the TPERIOD and TCOUNT registers can be read and written as part of the 
universal registers.  Reading the registers has no effect on the timer
function.  A write to TCOUNT has priority over loading from TPERIOD or
decrementing TCOUNT.  Neither TCOUNT nor TPERIOD get modified by a chip reset,
so both registers should be initialized before the timer is activated.
.42
Emulation Registers
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

Emulation registers are not supported.
.43
PX Registers
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

   PX1 and PX2 are 2 universal registers used for transferring data between the
48 bit @50[Program Memory Data] (PMD) bus and the 40 bit register file locations or
the 40 bit @54[Data Memory Data] (DMD) bus.  PX1 is 16 bits wide and PX2 is 32 bits
wide.  Either register can be read from or written to the PMD bus, the DMD bus
or the register file. 
 
   When data is transferred between PX2 and the PMD bus, bits 16-47 of the PMD
bus are used.  On transfers from PX2, the 16 LSBs are filled with zeros. 

   When data is transferred between PX2 and the DMD bus or register file, bits
8-39 of the DMD bus or the register file are used.  On transfers from PX2, the 
8 LSBs are filled with zeros.

   When data is transferred between PX1 and the PMD bus, bits 16-31 of the PMD
bus are used.  On transfers from PX1, bits 0-15 and 32-47 are filled with 
zeros. 

   When data is transferred between PX1 and the DMD bus or register file, bits
8-23 of the DMD bus or the register file are used.  On transfers from PX1, bits
0-7 and 24-39 are filled with zeros.

   PX1 and PX2 can also be treated as a single PX register, but only for read
from and writes to PMD.  This allows the PX pair to contain the entire 48 bits
coming from or going to program memory.  PX2 contains the 32 MSBs of the 48 bit
word while PX1 contains the 16 LSBs.  (Program memory is 40 bits wide and is
left-justified in the 48 bit word.)
               @43[ ]
.44
Memory Control Registers
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

@50[Program memory] is controlled by 2 registers, PMWAIT and PMBANK1.  PMBANK1
defines the memory bank boundaries for program memory.  Bank 0 spans from
address 0 up to, but not including, the value in PMBANK1.  PMWAIT defines the 
wait state control and page size information for program memory.  PMWAIT is 
defined as follows:

   Bit    Name      Definition
   0-1    WTMODE0   Wait mode for bank 0
   2-4    WTCNT0    Wait state count for bank 0
   5-6    WTMODE1   Wait mode for bank 1
   7-9    WTCNT1    Wait state count for bank 1
   10-12  PGSZ      Page size (LSB = 256 words)
   13     PGWTEN    Page wait enable

The wait mode is defined as follows:

   WTMODE     Description
     00       External acknowledge only
     01       Internal software wait states only (Emulator supports this only)
     10       Both internal and external acknowledge
     11       Either internal or external acknowledge

@54[Data memory] control is analogous to program memory control with the exception
that data memory has 4 memory banks, defined by DMBANK1, DMBANK2 and DMBANK3. 
Bank 0 spans from address 0 up to, but not including, the value in DMBANK1.  
Bank 1 runs to the beginning of bank 2, bank 2 to bank 3, and bank 3 to the end
of DM space.  DMWAIT is defined as follows:

   Bit    Name      Definition
   0-1    WTMODE0   Wait mode for bank 0
   2-4    WTCNT0    Wait state count for bank 0
   5-6    WTMODE1   Wait mode for bank 1
   7-9    WTCNT1    Wait state count for bank 1
   10-11  WTMODE2   Wait mode for bank 2
   12-14  WTCNT2    Wait state count for bank 2
   15-16  WTMODE3   Wait mode for bank 3
   17-19  WTCNT3    Wait state count for bank 3
   20-22  PGSZ      Page size (LSB = 256 words)
   23     PGWTEN    Page wait enable

Two other memory control registers, PMADR and DMADR, contain the address of the
most recent program memory and data memory location, respectively.
                @44[ ]
.45
Loop Registers
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The Current Loop Counter (CURLCNTR) register refers to the top entry in the 
@85[loop counter] stack.  Writing to CURLCNTR affects the count value of the loop
currently executing.  Reading CURLCNTR when the loop counter stack is empty
gives a value of 0xffffffff.

The Loop Counter (LCNTR) register is at the top of the @85[loop counter] stack PLUS
1, ie: it is the location on the stack which will take effect on the next loop
stack push.  To set up a count value for a nested loop without affecting the 
count value of the loop currently executing, you write the count value to 
LCNTR.

The Loop Address (LADDR) register refers to the top entry in the @86[loop address]
stack.  Reading LADDR when the loop counter stack is empty gives a value of 
0xffffffff.
.46
Program Counter Registers
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The Program Counter (PC) register contains the address of the next instruction
to be executed.

The Decode Address (DADDR) register contains the address of the next
instruction to be decoded.  This register is not writable and is always
follows the Program Counter (PC).

The Fetch Address (FADDR) register contains the address of the next
instruction to be fetched.  This register is not writable and is always
follows the Program Counter (PC).

The PC Stack (PCSTK) register contains the address at the top of the @83[PC stack].

The PC Stack Pointer (PCSTKP) register contains a count of the number of
active locations on the @83[PC stack].  Note that this value is displayed as an
unsigned decimal value.  

.47
Cache Registers
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

Any entry in the cache can be transferred, in three parts, to or from any
universal register.  The three 24 bit cache registers that exist for that
purpose are:

    CH - Holds the upper half of the instruction (bits 24-47)

    CL - Holds the lower half of the instruction (bits 0-23)

    CA - Holds the 20 bit address tag, valid bit and least recently used (LRU)
         flag:

             CA Bits    Value
               0        Valid bit
               1        LRU bit
               2-3      Reserved
               4-23     Address tag


See also @65[Internal Cache].
.48
Computational Registers
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The 80 bit MR register is subdivided into MR2, MR1 and MR0.  Fixed point
results reside in and may be read from MR.  MR is divided as follows:

                 80        64                32                0
      (16 bits)  |         |                 |                 |
   +-------------+---------+--------+        |                 |
   | sign extend | 16 bits | 0....0 |        |                 |
   +-------------+---------+--------+        |                 |
                     MR2   |                 |                 |
                           +-----------------+--------+        |
                           |     32 bits     | 0....0 |        |
                           +-----------------+--------+        |
                                   MR1       |                 |
                                             +-----------------+--------+
                                             |     32 bits     | 0....0 |
                                             +-----------------+--------+
                                                     MR0

When data is written into MR2, MR1 or MR0 from the @21[register file], the 8 LSBs in
the 40 bit data register are ignored.  Data written to MR1 is sign-extended to
MR2; the MSB of MR1 is repeated in the 16 bits of MR2.  Data written to MR0,
however, is not sign-extended.  When data is read from MR2, it is sign-extended
to 32 bits.  

MR has both primary and alternate register sets.  A bit in the @35[MODE1] register 
activates either set (for all computational units as well as the multiplier).
MR is unique in that both primary and alternate registers are accessible at the
same time, not just the set selected by @35[MODE1].  All instructions utilizing MR
must specify either foreground or background MR; foreground refers to those
registers currently activated by the @35[MODE1] bit, and background refers to those
that are not.
                   @48[ ]
.50
Program Memory
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

Program memory (PM) is 48 bits wide and spans from address 0 through 0xffffff.
The display contains the @57[memory map] access for the location, address, data (in
whatever format), and symbol name, if any. PM can be displayed in hexadecimal,
fixed point, floating point and disassembled formats. 

In the disassembled formatted window, highlighted access fields indicate the
presence of a @177[Software Breakpoint].  Also note that in the instruction
pointed to by the @46[Program Counter] (PC), the address field is highlighted.  When
an address field is highlighted in the "normal" highlighted color, this 
indicates the instruction will really be executed.  

The following @188[special keys] are active for PM windows:
        @58[<Ctrl-D>] Dump Memory
        @59[<Ctrl-M>] Load Memory
        @60[<Ctrl-F>] Fill Memory
        @61[<Ctrl-G>] Go To Memory
        @62[<Ctrl-P>] Plot Memory
        @63[<Ctrl-O>] Toggle memory tracking
        @18[<Ctrl-T>] Toggles Window Display Format
.54
Data Memory
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

Data memory (DM) is 40 bits wide and spans from address 0 through 0xffffffff.
The display contains the @57[memory map] access for the location, address, data (in
whatever format), and symbol name, if any.  DM can be displayed in hexadecimal,
fixed point and floating point formats.

The following @188[special keys] are active for DM windows:

        @58[<Ctrl-D>] Dump Memory
        @59[<Ctrl-M>] Load Memory
        @60[<Ctrl-F>] Fill Memory
        @61[<Ctrl-G>] Go To Memory
        @62[<Ctrl-P>] Plot Memory
        @18[<Ctrl-T>] Toggles Window Display Format

.57
Memory Map
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The memory map defines the type of access that is allowed to @50[program memory]
(PM) and @54[data memory] (DM).  This is normally done by loading an
@70[architecture file], but can also be done interactively.  The display shows the
maps for PM and DM, which include starting address, ending address and current
access.  Access is defined as follows:

                        ----  No access
                        RAM   Read and write access
                        ROM   Read only
                        PORT  Memory port

The map can be changed by selecting the appropriate memory type.  You are then
prompted for the address range and desired access.  

Note that memory map settings are for informational use only.
.58
Dump Memory
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This function is used to dump memory data to a file.  You are prompted for an
address range and file name.  The data is dumped in a format consistent with
the format of the window from which it is invoked, ie: hexadecimal, floating
point etc..  

This function is valid only when applied from a memory, @50[PM] or @54[DM], window.  It
is normally invoked from the @192[Memory Menu] or via the @188[<Ctrl-D>] key.

See also @59[Load Memory].
.59
Load Memory
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This function is used to load memory data from a file.  You are prompted for
an address range and file name.  The data is loaded, in a format consistent
with the format of the window from which it is invoked, ie: hexadecimal,
floating point etc., starting at the address supplied.  

This function is valid only when applied from a memory, @50[PM] or @54[DM], window.  It
is normally invoked from the @192[Memory Menu] or via the @188[<Ctrl-M>] key. 

See also @58[Dump Memory].
.60
Fill Memory
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This function is used to fill memory with a given pattern.  You are prompted 
for an address range and pattern which will be replicated in memory.  The
pattern is entered in hexadecimal format.  

This function is valid only when applied from a memory, @50[PM] or @54[DM], window.  It
is normally invoked from the @192[Memory Menu] or via the @188[<Ctrl-F>] key.
.61
Go To Address
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This function is used to go to a particular memory address.  You are prompted 
for an address.  After entering the address, the window is moved to the given
address.  

This function is valid only when applied from a memory, @50[PM] or @54[DM], window.  It
is normally invoked from the @192[Memory Menu] or via the @188[<Ctrl-G>] key.
.62
Plot range of addresses
     @0[Return to Simulator]         @-1[Previous Screen]         @GUI_BATON_APP
_HELP_GENERAL[General Info]

This function is used to go to a plot memory addresses.  You are prompted
for a range of addresses and a stride. The data is plotted in the window's
data format.

This function is valid only when applied from a memory window, @GUI_BATON_COM_MEM_
DM_HEX[DM],@50[PM].  It
is normally invoked from the @1[menu bar] or via the @GUI_BAT
ON_APP_HELP_KEYS[<Ctrl-P>] key.
.65
Cache Display
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The Internal Cache consists of 32 entries.  Each entry consists of a valid bit,
20 bit address tag (20 MSBs of the address), and 48 bit opcode.  The entries 
are grouped into 16 sets, each set containing 2 entries and a Least Recently
Used (LRU) bit, which indicates the entry in the set that was least recently
used.  

Note that due to the 3-stage pipelining of the ADSP-21020, when an instruction
executing at location 'n' requires @50[Program Memory] (PM), it is the instruction
which is being fetched at location 'n + 2' which is cached.  Should this 
instruction at location 'n' be re-executed, the presence of instruction 'n + 2'
in the cache will resolve the PM conflict.

Operation of the cache can be controlled by the CADIS and CAFRZ bits in the 
@36[MODE2] register.  
.66
Cycle Counter Display
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This window maintains a count of clock cycles.  This count is incremented at
each clock cycle.  It is reset to 0 upon a @67[chip reset] or @181[emulator reset].  
.67
Chip Reset
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This function will reset the ADSP-21020 emulator.  The context of the 
emulator will be changed analogously to the RESET pin being asserted on the
ADSP-21020.


See also @181[Emulator Reset].
.68
Color Display Attributes
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This function is used to alter the color attributes of the windowing system of
the emulator.  A pop-up window is displayed with a list of window types and
areas within those windows on the left hand side and the corresponding
color attributes currently in effect.  Upon choosing the item for which a
change in color is desired, another pop-up window is displayed which presents
a pallette of colors.  The current color attributes for the item which was
selected is enclosed by brackets ([]).  Upon choosing a new color selection,
the original pop-up is redisplayed, showing the new color selections. 

Selecting the "Accept" option will redisplay the screen with the new color 
selections.  The "Cancel" option cancels any new color selections made.  The 
"Reset" option resets all colors to the emulator defaults.


Note that color attributes are saved in window files, either upon @2[exiting] the
emulator or manually saving the @73[window file].  
.69
Floating Point Display Attributes
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This function is used to alter the attributes of all floating point displays in
the emulator.  A pop-up window is displayed with a list of attributes and
their current settings.  The current setting can be changed by selecting the
appropriate attribute.  

In order for the new selections to take effect, the "accept changes" option
must be selected after the new attributes have been chosen.

Note that this affects the floating point displays only, it does not affect the
floating point operation of the chip nor does it modify any floating
point values.  To modify the floating point operation of the chip, 
modify the @35[MODE1] register accordingly.
.70
Load Architecture File
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This function is used to load architecture files into the emulator.  The 
architecture file typically defines memory map data and segment symbolic
information.

This function is invoked from the @190[File Menu].
.71
Load Executable File
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This function is used to load executable files into the emulator.  The 
executable file typically defines @50[Program Memory] (PM), @54[Data Memory] (DM) and 
symbolic information.

Note that executable files are loaded independently of any memory map
attributes.  

This function is invoked from the @190[File Menu].
.72
Load Window File
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This function is used to load window files into the emulator.  The window file
defines window sizes, positions, colors, video mode, floating point display
attributes and emulator defaults.  

When a window file is loaded, the current window attributes are replaced with 
those from the file.

This function is invoked from the @190[File Menu].

See also @73[Save Window File].
.73
Save Window File
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This function is used to create a window file for the emulator.  The window file
defines window sizes, positions, colors, video mode, floating point display
attributes and emulator defaults.

When a window file is created, the current window attributes are stored in the
filename supplied by the user.  Creating a window file does not affect the
current window attributes in any manner.

This function is invoked from the @190[File Menu].

See also @72[load window file].
.77
Start Keystroke Recording
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This function is used to create a keystroke file for the emulator.  A
keystroke file is essentially a log of both keystrokes and mouse actions that 
can be created and then "played back".  It is typically used when a set of
actions is, or will be, done repeatedly.  When a keystroke file is created, all
subsequent keystrokes and mouse actions are recorded to the given file, until
the @78[Stop Keystroke Recording] command is issued.  Later, the file can be "played
back" with the @79[Playback Keystroke File] command.

This function is invoked from the @190[File Menu].

See also @78[Stop Keystroke Recording] and @79[Playback Keystroke File].
.78
Stop Keystroke Recording
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This function is used to stop recording keystrokes to a keystroke file.  The 
keystroke file is closed and no further keystrokes nor mouse actions are logged
to the file.

This function is invoked from the @190[File Menu].

See also @77[Start Keystroke Recording] and @79[Playback Keystroke File].
.79
Playback Keystroke File
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This function is used to "playback" a keystroke file.  All keystrokes and mouse
actions are repeated in exactly the same order in which the keystroke file was
created.  

This function is invoked from the @190[File Menu].

See also @77[Start Keystroke Recording] and @78[Stop Keystroke Recording].
.80
Display File
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This function is used to display a text file.  When invoked, the user is 
prompted for a filename.  The file is then loaded into the emulator and
displayed.  

This function is invoked from the @190[File Menu].
.81
Operating System Shell
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This function is used to create an operating system shell.  

For DOS platforms, the emulator is suspended and the user is transferred to
an operating system shell.  Typing 'exit' from the shell will return the
user to the emulator.

For Unix platforms, an 'xterm' is spawned.

This function is invoked from the @190[File Menu].

See also @82[Shell an OS Command ].
.82
Shell an OS Command 
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This function is used to execute a single command in an operating system shell.  

For DOS platforms, the emulator is suspended and the Command is executed in an
operating system shell.  Control will return to the emulator when the Command
completes.

This function is invoked from the @190[File Menu].

See also @81[Operating System Shell].

.83
PC Stack
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This is the display of the Program Counter (PC) stack.  The PC stack is 24 bits
wide and 20 locations deep.  The stack generates a full signal (PCFL) when all
entries in the stack are active and an empty signal (PCEM) when no entries in
the stack are occupied.  PCFL and PCEM are located in the @38[STKY] register.  

The top entry is also known as the PCSTK register.  The number of active
entries in the stack is given by the PCSTKP register.  Both of these registers
are shown in the @46[Program Counter Register] display.
.84
Status Stack
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This is the display of the Status Stack.  The Status Stack is 5 locations deep
and 2 words wide (for @37[ASTAT] and @35[MODE1]).  The stack generates an overflow signal
(SSOV) when the stack is overflowed and an empty signal (SSEM) when no entries
in the stack are occupied.  SSOV and SSEN are located in the @38[STKY] register.
.85
Loop Counter Stack
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This is the display of the Loop Counter Stack.  The Loop Counter Stack is 6 
locations deep and 32 bits wide.  The Loop Counter Stack is synchronized with
the @86[Loop Address Stack].  They will always contain the same number of active
locations.  The stack generates an overflow signal (LSOV) when the stack is
overflowed and an empty signal (LSEM) when no locations in the stack are
occupied.  LSOV and LSEM are located in the @38[STKY] register.  

The top entry in the Loop Counter Stack is also known as the CURLCNTR register.
This register is shown in the @45[Loop Register] display.  

See also the @86[Loop Address Stack] and the @45[Loop Register] display. 
.86
Loop Address Stack
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This is the display of the Loop Address Stack.  The Loop Address Stack is 6 
locations deep and 32 bits wide.  Each entry in the stack contains a 24 bit
loop termination address, a 5 bit loop termination code and a 2 bit loop type
code:
           Bit        Description
           0-23       Loop termination address
           24-28      Loop termination code (See User's Manual)
           29         Reserved
           30-31      Loop type code
                         00 - Arithmetic condition based
                         01 - Counter based, length = 1
                         10 - Counter based, length = 2
                         11 - Counter based, length > 2

The Loop Address Stack is synchronized with the @85[Loop Counter Stack].  They will
always contain the same number of active locations.  The stack generates an 
overflow signal (LSOV) when the stack is overflowed and an empty signal (LSEM)
when no locations in the stack are occupied.  LSOV and LSEM are located in the
@38[STKY] register.  

The top entry in the Loop Address Stack is also known as the LADDR register.
This register is shown in the @45[Loop Register] display.  

See also the @85[Loop Counter Stack] and the @45[Loop Register] display. 
.87
PM Symbol Display
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This is the display of all @50[Program Memory] (PM) symbols.  The symbols can be 
displayed in either alphabetical or numeric order, according to the selection 
from the @192[Memory Menu].  The display shows the symbolic name and the address of the
symbol.  Symbols are loaded into the emulator via the @70[Load Architecture File]
and the @71[Load Executable File] functions.

Only global and static symbols are recognized.

See also @GUI_BATON_COM_SYM_PM_DELETE_ALL[Delete PM Symbols] and @GUI_BATON_COM_SYM_DM_ALPHA[Data Memory (DM) Symbol Display].   
.GUI_BATON_COM_SYM_PM_DELETE_ALL
Delete PM Symbols
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This function will delete all Program Memory (PM) symbols from the emulator.

See also @87[PM Symbol Display] and @GUI_BATON_COM_SYM_DM_DELETE_ALL[Delete Data Memory (DM) Symbols].   
.89
DM Symbol Display
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This is the display of all @54[Data Memory] (DM) symbols.  The symbols can be 
displayed in either alphabetical or numeric order, according to the selection 
from the @192[Memory Menu].  The display shows the symbolic name and the address of the
symbol.  Symbols are loaded into the emulator via the @70[Load Architecture File]
and the @71[Load Executable File] functions.

Only global and static symbols are recognized.

See also @GUI_BATON_COM_SYM_DM_DELETE_ALL[Delete DM Symbols] and @GUI_BATON_COM_SYM_PM_ALPHA[Program Memory (PM) Symbol Display].   
.92
Step
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This function is used to single step the emulator.  A single step will take
1 or more clock cycles, due to memory wait states etc..  The display is 
automatically updated after each step.  This function does not halt upon 
reaching a breakpoint.

This function is normally invoked from the @193[Execution Menu] or via 
the @188[<F10>] key.

See also the @93[Step 'n' Times], @94[Auto-Step] and @95[Run/Halt] commands.
.93
Step 'n' Times
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This function is used to execute 'n' single steps of the emulator.  A single
step will take 1 or more clock cycles, due to memory wait states etc..
This function will halt upon reaching a breakpoint, or pressing any key.

This function is normally invoked from the @193[Execution Menu] or via 
the @188[<Shift-F10>] key.

When this function is activated a pop-up will appear requesting the number of
steps to execute.  While Stepping a histogram will display how many steps have
been completed.  The display will be updated when the function completes.

See also the @92[Step], @94[Auto-Step] and @95[Run/Halt] commands.
.GUI_BATON_COM_SYM_DM_DELETE_ALL
Delete DM Symbols
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This function will delete all Data Memory (DM) symbols from the emulator.

See also @89[DM Symbol Display] and @GUI_BATON_COM_SYM_PM_DELETE_ALL[Delete Program Memory (PM) Symbols].   
.94
Auto-Step
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This function executes continous single steps of the emulator.  A single
step will take 1 or more clock cycles, due to memory wait states etc..
The display is automatically updated after each step. This function will 
halt upon reaching a breakpoint, or pressing any key.

This function is normally invoked from the @193[Execution Menu] or via 
the @188[<Ctrl-A>] key.

See also the @93[Step 'n' Times], @92[Step] and @95[Run/Halt] commands.
.95
Run/Halt
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This function is used to begin/end continuous execution of the target.  The 
target will continue executing until one of the following occur:

         - An instruction at which a @177[Software Breakpoint] is set was about
             to be executed (ie: PC = <breakpoint address>).

         - A @180[Hardware Breakpoint] event occurred.

         - The @182[RUN Timeout] period expires.

         - The user halts the target by pressing the @188[<F4>] key or 
             selects Run/Halt from the @193[Execution Menu].

This function is normally invoked from the @193[Execution Menu] or via the @188[<F4>] key.

See also the @93[Step 'n' Times], @94[Auto-Step], @92[Step] and @182[Non-Real-Time Mode] commands.

.98
CBUG Index
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

@120[Assign]             @136[Max]
@128[Backtrace]          @105[Next]
@110[Break]              @107[Next 'n' Times]
@113[Condition]          @127[Params]
@102[Continue]           @137[Pretty Print]
@175[Data Formats]       @117[Print]
@111[Delete]             @101[Restart]
@116[Disable]            @139[Settings]
@99[Display]            @131[Sources]
@130[Down]               @124[Stack]
@115[Enable]             @104[Step]
@108[Finish]             @106[Step 'n' Times]
@132[Functions]          @135[Sym Dump]
@133[Globals]            @123[Typedef]
@103[Go Until]           @134[Typenames]
@114[Ignore]             @138[Union Print]
@112[List]               @129[Up]
@126[Locals]             @122[What Is]
@174[Location]           @121[Where Is]
.99
CBUG Display
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The Display command creates a CBUG Display window which displays an
expression and its value in the appropriate data @175[format]. CBUG Display
windows remain on-screen until deleted manually using the <Esc> key,
and can be moved and re-sized like other emulator/simulator window.

The expression is evaluated in the current scoping context, and if any
expression components go out of context (by use of the @129[Up] and @130[Down]
commands, or by program execution), an "out of context" message is
displayed.

Related CBUG "Data" menu choices are:
        @117[Print]    - Evaluate and print an expression
        @120[Assign]   - Alter the value of a variable
        @99[Display]  - Monitor expression values
        @122[What Is]  - Describe the data type of an expression
        @121[Where Is] - Describe where a symbol is stored
.101
CBUG Restart
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The Restart command resets the emulator/simulator, clears all CBUG
breakpoint @114[ignore] counts (but does not clear breakpoints or breakpoint
@113[conditions]), and starts executing code. This is analogous to issuing
the emulator/simulator Chip Reset and @95[Run] commands. After the Restart
command, CBUG runs until it is stopped. Use the Restart command when
you want to emulate a reboot of your system.

Related CBUG "Execution" menu choices are:
        @104[Step]           - Execute one C line; follow calls
        @105[Next]           - Execute one C line; do not follow calls
        @106[Step 'n' Times] - Step that many times
        @107[Next 'n' Times] - Next that many times
        @102[Continue]       - Resume execution (await stop or halt)
        @103[Go Until]       - Continue and stop at a specified @174[location]
        @108[Finish]         - Continue until back in calling function
        @101[Restart]        - Execute a @67[chip reset] and Continue
.102
CBUG Continue
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The Continue command causes CBUG to resume execution from the current
program counter. After the Continue command, CBUG runs until it is
stopped.

Related CBUG "Execution" menu choices are:
        @104[Step]           - Execute one C line; follow calls
        @105[Next]           - Execute one C line; do not follow calls
        @106[Step 'n' Times] - Step that many times
        @107[Next 'n' Times] - Next that many times
        @102[Continue]       - Resume execution (await stop or halt)
        @103[Go Until]       - Continue and stop at a specified @174[location]
        @108[Finish]         - Continue until back in calling function
        @101[Restart]        - Execute a @67[chip reset] and Continue
.103
CBUG Go Until
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The Go-Until command sets a self-deleting CBUG @110[breakpoint] at a
specified location and resumes execution as in the Continue command.
The break location is set in a pop-up window. The Go-Until command
will run until it hits the breakpoint or is otherwise stopped.

The Go-Until command can be used for shortcut breakpoint operations
such as running to a function (specify a function name), finishing a
loop (specify a line number outside a loop), executing one iteration
of a loop (specify a line number inside a loop), etc.
 
Related CBUG "Execution" menu choices are:
        @104[Step]           - Execute one C line; follow calls
        @105[Next]           - Execute one C line; do not follow calls
        @106[Step 'n' Times] - Step that many times
        @107[Next 'n' Times] - Next that many times
        @102[Continue]       - Resume execution (await stop or halt)
        @103[Go Until]       - Continue and stop at a specified @174[location]
        @108[Finish]         - Continue until back in calling function
        @101[Restart]        - Execute a @67[chip reset] and Continue
.105
CBUG Next
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The Next command is emilar to Step, but the entire expression
(including all function calls and assignments) is executed without
stopping. Execution stops when control reaches the next line of code
in the same function which was executing when the Next command was
given; function calls are not followed.

Related CBUG "Execution" menu choices are:
        @104[Step]           - Execute one C line; follow calls
        @105[Next]           - Execute one C line; do not follow calls
        @106[Step 'n' Times] - Step that many times
        @107[Next 'n' Times] - Next that many times
        @102[Continue]       - Resume execution (await stop or halt)
        @103[Go Until]       - Continue and stop at a specified @174[location]
        @108[Finish]         - Continue until back in calling function
        @101[Restart]        - Execute a @67[chip reset] and Continue
.106
CBUG Step 'n' Times
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The Step 'n' Times command steps the execution of your program as in
the Step command, but does so n times. A pop-up window is presented
for entering the count. If a breakpoint is encountered (or execution
is otherwise stopped), Step 'n' Times stops before taking all n steps.
Function calls are followed.

Related CBUG "Execution" menu choices are:
        @104[Step]           - Execute one C line; follow calls
        @105[Next]           - Execute one C line; do not follow calls
        @106[Step 'n' Times] - Step that many times
        @107[Next 'n' Times] - Next that many times
        @102[Continue]       - Resume execution (await stop or halt)
        @103[Go Until]       - Continue and stop at a specified @174[location]
        @108[Finish]         - Continue until back in calling function
        @101[Restart]        - Execute a @67[chip reset] and Continue
.107
CBUG Next 'n' Times
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The Next 'n' Times executes code as in Next, but it does so n times. A
pop-up window is presented for entering the repeat count. If a
@110[breakpoint] is encountered (or execution is otherwise stopped), Next
'n' Times stops before taking all n steps. Function calls are not
followed.

Related CBUG "Execution" menu choices are:
        @104[Step]           - Execute one C line; follow calls
        @105[Next]           - Execute one C line; do not follow calls
        @106[Step 'n' Times] - Step that many times
        @107[Next 'n' Times] - Next that many times
        @102[Continue]       - Resume execution (await stop or halt)
        @103[Go Until]       - Continue and stop at a specified @174[location]
        @108[Finish]         - Continue until back in calling function
        @101[Restart]        - Execute a @67[chip reset] and Continue
.108
CBUG Finish
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The Finish command resumes execution and runs until the
currently-scoped function returns or execution is stopped. If the @129[Up]
and @130[Down] commands have changed the scoping context, the Finish command
finishes from the changed context. The Finish command is useful when
you want to complete the execution of a function and return to its
parent.

Related CBUG "Execution" menu choices are:
        @104[Step]           - Execute one C line; follow calls
        @105[Next]           - Execute one C line; do not follow calls
        @106[Step 'n' Times] - Step that many times
        @107[Next 'n' Times] - Next that many times
        @102[Continue]       - Resume execution (await stop or halt)
        @103[Go Until]       - Continue and stop at a specified @174[location]
        @108[Finish]         - Continue until back in calling function
        @101[Restart]        - Execute a @67[chip reset] and Continue
.110
CBUG Break
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The Break command sets a breakpoint. A @174[location] is specified in a
pop-up window. All breakpoints may have break expressions and ignore
counts.

Breakpoints and break expressions are preserved whenever the program
is @101[restarted], although all ignore counts are reset to zero. Use the
Ignore command if you want to set a breakpoint's ignore count.

You can set a breakpoint on a single line by double-clicking on that
line.

Related CBUG "Breaks" menu choices are:
        @110[Break]     - Add a CBUG breakpoint
        @111[Delete]    - Remove a CBUG breakpoint
        @112[List]      - Describe CBUG breakpoints and their status
        @113[Condition] - Gate a CBUG breakpoint with a C expression
        @114[Ignore]    - Gate a CBUG breakpoint with an ignore count
        @115[Enable]    - Activate a CBUG breakpoint
        @116[Disable]   - Deactivate a CBUG breakpoint
.111
CBUG Delete
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The Delete command deletes a breakpoint. A pop-up window requests the
breakpoint number(s) or "all" to delete from the breakpoint list.

You can delete a breakpoint on a single line by double-clicking on
that line.

Related CBUG "Breaks" menu choices are:
        @110[Break]     - Add a CBUG breakpoint
        @111[Delete]    - Remove a CBUG breakpoint
        @112[List]      - Describe CBUG breakpoints and their status
        @113[Condition] - Gate a CBUG breakpoint with a C expression
        @114[Ignore]    - Gate a CBUG breakpoint with an ignore count
        @115[Enable]    - Activate a CBUG breakpoint
        @116[Disable]   - Deactivate a CBUG breakpoint
.112
CBUG List
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The List command lists all CBUG breakpoints, showing their number,
where in the program they are, and break expression and ignore count
active for each, if any. Disabled breakpoints are included in the
list, but marked as disabled.

Related CBUG "Breaks" menu choices are:
        @110[Break]     - Add a CBUG breakpoint
        @111[Delete]    - Remove a CBUG breakpoint
        @112[List]      - Describe CBUG breakpoints and their status
        @113[Condition] - Gate a CBUG breakpoint with a C expression
        @114[Ignore]    - Gate a CBUG breakpoint with an ignore count
        @115[Enable]    - Activate a CBUG breakpoint
        @116[Disable]   - Deactivate a CBUG breakpoint
.113
CBUG Condition
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The Condition command prompts for a breakpoint number and break
expression in a pop-up window. Conditional breakpoints cause program
execution to stop only when the break expression is true.

Conditional breakpoints may be combined with an ignore count.  In this
case, the ignore count is decremented whenever the breakpoint is
2reached and the condition is true. After the ignore count reaches
zero, the breakpoint reverts to a conditional breakpoint.

Conditional breakpoints affect run-time execution speed.

Related CBUG "Breaks" menu choices are:
        @110[Break]     - Add a CBUG breakpoint
        @111[Delete]    - Remove a CBUG breakpoint
        @112[List]      - Describe CBUG breakpoints and their status
        @113[Condition] - Gate a CBUG breakpoint with a C expression
        @114[Ignore]    - Gate a CBUG breakpoint with an ignore count
        @115[Enable]    - Activate a CBUG breakpoint
        @116[Disable]   - Deactivate a CBUG breakpoint
.114
CBUG Ignore
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The Ignore command allows CBUG to skip a breakpoint a set number of
times. The Ignore command prompts for a breakpoint number and ignore
count in a pop-up window.

Ignore counts may be combined with conditional breakpoints. In this
case, the ignore count is decremented whenever the breakpoint is
reached and the condition is true. After the ignore count reaches
zero, the breakpoint reverts to a conditional breakpoint.

Breakpoints with ignore counts affect run-time execution speed.

Related CBUG "Breaks" menu choices are:
        @110[Break]     - Add a CBUG breakpoint
        @111[Delete]    - Remove a CBUG breakpoint
        @112[List]      - Describe CBUG breakpoints and their status
        @113[Condition] - Gate a CBUG breakpoint with a C expression
        @114[Ignore]    - Gate a CBUG breakpoint with an ignore count
        @115[Enable]    - Activate a CBUG breakpoint
        @116[Disable]   - Deactivate a CBUG breakpoint
.115
CBUG Enable
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The Enable command prompts for a list of breakpoint numbers or "all"
to enable in a pop-up window.  Only breakpoints which are enabled are
actually used by CBUG at run time.

Related CBUG "Breaks" menu choices are:
        @110[Break]     - Add a CBUG breakpoint
        @111[Delete]    - Remove a CBUG breakpoint
        @112[List]      - Describe CBUG breakpoints and their status
        @113[Condition] - Gate a CBUG breakpoint with a C expression
        @114[Ignore]    - Gate a CBUG breakpoint with an ignore count
        @115[Enable]    - Activate a CBUG breakpoint
        @116[Disable]   - Deactivate a CBUG breakpoint
.116
CBUG Disable
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

Rather than deleting a breakpoint, you might prefer to disable it.
This makes the breakpoint inoperative as if it has been deleted, but
remembers the information on the breakpoint so that you can enable it
again later.

The Disable command prompts for a list of breakpoint numbers or "all"
to disable in a pop-up window. Breakpoints which are disabled are not
used by CBUG at run time.

Related CBUG "Breaks" menu choices are:
        @110[Break]     - Add a CBUG breakpoint
        @111[Delete]    - Remove a CBUG breakpoint
        @112[List]      - Describe CBUG breakpoints and their status
        @113[Condition] - Gate a CBUG breakpoint with a C expression
        @114[Ignore]    - Gate a CBUG breakpoint with an ignore count
        @115[Enable]    - Activate a CBUG breakpoint
        @116[Disable]   - Deactivate a CBUG breakpoint
.117
CBUG Print
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

Expression values (and assignments) may be printed to the Status
display using the Print command. The expression is evaluated and
printed once in whatever context is valid at the time.

Print expressions are entered by a pop-up window. The expression may
consist of any valid C expression (including type casts and CBUG data
@175[formatting]) operating upon program variables and constants. Function
calls or string constants may not appear in the expression.

Related CBUG "Data" menu choices are:
        @117[Print]    - Evaluate and print an expression
        @120[Assign]   - Alter the value of a variable
        @99[Display]  - Monitor expression values
        @122[What Is]  - Describe the data type of an expression
        @121[Where Is] - Describe where a symbol is stored
.120
CBUG Assign
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The Assign command sets the value of variables. The assignment
statement is entered in a pop-up window. The assignment statement must
be comprised of two valid C expressions, related by an assignment
operator. The left-hand expression must be an assignable value (a C
lvalue).

The variables are evaluated with respect to the current scoping
context. You may not use Assign to evaluate a function call.

Type compatibility and bounds checking are not performed by CBUG
variable assignments. Display expressions are updated after each
command assigned.

Related CBUG "Data" menu choices are:
        @117[Print]    - Evaluate and print an expression
        @120[Assign]   - Alter the value of a variable
        @99[Display]  - Monitor expression values
        @122[What Is]  - Describe the data type of an expression
        @121[Where Is] - Describe where a symbol is stored
.121
CBUG Where Is
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The Whereis command provides information about the storage allocation
for a symbol. The symbol is entered into a pop-up window. The Whereis
command displays the register number, frame pointer offset, or
absolute address and memory space (PM vs. DM) of the symbol's data,
as appropriate, in the Status display.

Related CBUG "Data" menu choices are:
        @117[Print]    - Evaluate and print an expression
        @120[Assign]   - Alter the value of a variable
        @99[Display]  - Monitor expression values
        @122[What Is]  - Describe the data type of an expression
        @121[Where Is] - Describe where a symbol is stored
.122
CBUG What Is
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The Whatis command displays the data type of an expression or
variable. The expression or variable is entered into a pop-up window.
Results are displayed in the Status display.

Related CBUG "Data" menu choices are:
        @117[Print]    - Evaluate and print an expression
        @120[Assign]   - Alter the value of a variable
        @99[Display]  - Monitor expression values
        @122[What Is]  - Describe the data type of an expression
        @121[Where Is] - Describe where a symbol is stored
.123
CBUG Typedef
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The Typedef command opens a pop-up window into which a type name or
tag name may be entered. The description of that data type is
presented.

Related CBUG "Symbols" menu choices are:
        @131[Sources]   - List source files
        @132[Functions] - List functions
        @133[Globals]   - List global variables
        @126[Locals]    - List local variables
        @127[Params]    - List function parameters
        @134[Typenames] - List typedefs
        @123[Typedef]   - Describe a typedef
        @135[Sym Dump]  - Spill the symbol table to a file
.124
CBUG Stack
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The Stack command presents C run-time stack information relative to
the current scoping context in the Status display, namely:

        - nesting level, function name, source file and line number
        - current, parent, and child frame pointers (as appropriate)
        - parameter names and values

Refer to the ADSP-21000 Family C Programmer's Manual for detailed
information about the C run-time stack model.

Related CBUG "Context" menu choices are:
        @124[Stack]     - Report info on the current stack frame
        @128[Backtrace] - Report the function call tree
        @129[Up]        - Change the scoping context up one level
        @130[Down]      - Change the scoping context down one level
.126
CBUG Locals
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The Locals command lists all local variables of the currently scoped
function.

Related CBUG "Symbols" menu choices are:
        @131[Sources]   - List source files
        @132[Functions] - List functions
        @133[Globals]   - List global variables
        @126[Locals]    - List local variables
        @127[Params]    - List function parameters
        @134[Typenames] - List typedefs
        @123[Typedef]   - Describe a typedef
        @135[Sym Dump]  - Spill the symbol table to a file
.127
CBUG Params
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The Params command lists all parameter variables of the currently
scoped function.

Related CBUG "Symbols" menu choices are:
        @131[Sources]   - List source files
        @132[Functions] - List functions
        @133[Globals]   - List global variables
        @126[Locals]    - List local variables
        @127[Params]    - List function parameters
        @134[Typenames] - List typedefs
        @123[Typedef]   - Describe a typedef
        @135[Sym Dump]  - Spill the symbol table to a file
.128
CBUG Backtrace
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The Backtrace command displays the calling sequence in the Status
display, showing how the program reached the currently-executing
function. The sequence starts with main() and ends with the function
that is in the current execution context. Each entry in the report
shows the function's

        - frame level
        - program counter value (return address)
        - function name 
        - parameter names and values
        - source file name 
        - line number	

Related CBUG "Context" menu choices are:
        @124[Stack]     - Report info on the current stack frame
        @128[Backtrace] - Report the function call tree
        @129[Up]        - Change the scoping context up one level
        @130[Down]      - Change the scoping context down one level
.129
CBUG Up
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The Up command temporarily changes the current scoping context up one
level (to the function's parent) without changing the execution
context. The Source and CBUG Display windows are updated to reflect
the new scoping context.

The Up command reports to the Status display the new scoping context,
and its associated program counter value (if not at the start of the
function), function name and its parameter list and values, and its
source file name and line number.

Related CBUG "Context" menu choices are:
        @124[Stack]     - Report info on the current stack frame
        @128[Backtrace] - Report the function call tree
        @129[Up]        - Change the scoping context up one level
        @130[Down]      - Change the scoping context down one level
.130
CBUG Down
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The Down command temporarily changes the current scoping context down
one level without changing the execution context. The Source and CBUG
Display windows are updated to reflect the new scoping context.

The Down command reports to the Status display the new scoping
context, and its associated program counter value (if not at the start
of the function), function name and its parameter list and values, and
its source file name and line number.

Related CBUG "Context" menu choices are:
        @124[Stack]     - Report info on the current stack frame
        @128[Backtrace] - Report the function call tree
        @129[Up]        - Change the scoping context up one level
        @130[Down]      - Change the scoping context down one level
.131
CBUG Sources
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The Sources command lists all source files for which debugging
information is available.

Related CBUG "Symbols" menu choices are:
        @131[Sources]   - List source files
        @132[Functions] - List functions
        @133[Globals]   - List global variables
        @126[Locals]    - List local variables
        @127[Params]    - List function parameters
        @134[Typenames] - List typedefs
        @123[Typedef]   - Describe a typedef
        @135[Sym Dump]  - Spill the symbol table to a file
.132
CBUG Functions
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The Functions command lists the names and data types of all debuggable
functions.

Related CBUG "Symbols" menu choices are:
        @131[Sources]   - List source files
        @132[Functions] - List functions
        @133[Globals]   - List global variables
        @126[Locals]    - List local variables
        @127[Params]    - List function parameters
        @134[Typenames] - List typedefs
        @123[Typedef]   - Describe a typedef
        @135[Sym Dump]  - Spill the symbol table to a file
.133
CBUG Globals
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The Globals command lists the names and data types of all non-local
variables.

Related CBUG "Symbols" menu choices are:
        @131[Sources]   - List source files
        @132[Functions] - List functions
        @133[Globals]   - List global variables
        @126[Locals]    - List local variables
        @127[Params]    - List function parameters
        @134[Typenames] - List typedefs
        @123[Typedef]   - Describe a typedef
        @135[Sym Dump]  - Spill the symbol table to a file
.134
CBUG Typenames
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The Typenames command lists all user-defined data types.

Related CBUG "Symbols" menu choices are:
        @131[Sources]   - List source files
        @132[Functions] - List functions
        @133[Globals]   - List global variables
        @126[Locals]    - List local variables
        @127[Params]    - List function parameters
        @134[Typenames] - List typedefs
        @123[Typedef]   - Describe a typedef
        @135[Sym Dump]  - Spill the symbol table to a file
.135
CBUG Sym Dump
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The Sym Dump command causes CBUG to dump its entire symbol table into
a file specified in a pop-up window. The dump includes the breakpoint
line number/program counter table and a mapping of the program's
symbol table in terms of its block structure.

Related CBUG "Symbols" menu choices are:
        @131[Sources]   - List source files
        @132[Functions] - List functions
        @133[Globals]   - List global variables
        @126[Locals]    - List local variables
        @127[Params]    - List function parameters
        @134[Typenames] - List typedefs
        @123[Typedef]   - Describe a typedef
        @135[Sym Dump]  - Spill the symbol table to a file
.136
CBUG Max
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The Max command sets the Max mode value. The Max mode value limits the
number of elements of arrays and characters in a string that CBUG will
@117[print] or @99[display]. The default value is 40, but may be changed or disabled
with the Max command (enter a value of zero to disable limiting).

Normally character arrays (of type char[]) are printed in their
entirety.  Character pointers (of type char *) will always print the
pointer value and attempt to expand the character string if Max
limiting is enabled. String expansion for character pointers stops
when the the number of characters printed equals the Max mode value
set, or a NULL is encountered.

Related CBUG "Modes" menu choices are:
        @136[Max]          - Limit string/array expansion
        @137[Pretty Print] - Indent structures
        @138[Union Print]  - Expand unions in structures
        @139[Settings]     - Show currents settings
.137
CBUG Pretty Print
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The Pretty print command toggles the pretty-print mode, which indents
complex data structures making them easier to read. The default
pretty-print mode is off; structures are printed on one line.

Related CBUG "Modes" menu choices are:
        @136[Max]          - Limit string/array expansion
        @137[Pretty Print] - Indent structures
        @138[Union Print]  - Expand unions in structures
        @139[Settings]     - Show currents settings
.138
CBUG Union Print
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The Union print command toggles the union-print mode, which controls
whether unions within structures are shown. The default union-print
mode is off; unions within structures are not shown.

Related CBUG "Modes" menu choices are:
        @136[Max]          - Limit string/array expansion
        @137[Pretty Print] - Indent structures
        @138[Union Print]  - Expand unions in structures
        @139[Settings]     - Show currents settings
.139
CBUG Settings
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The Settings command lists the current mode settings in the Status
display.

Related CBUG "Modes" menu choices are:
        @136[Max]          - Limit string/array expansion
        @137[Pretty Print] - Indent structures
        @138[Union Print]  - Expand unions in structures
        @139[Settings]     - Show currents settings
.174
CBUG Locations
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

CBUG "locations" may specify a function name or line number, and may
be preceded with an optional filename and/or followed by an optional
break expression. Line numbers may be either relative (using +-) or
absolute (no +-).

Locations are specified in one of two forms:

        [filename:] function [if expression]
           -- or --
        [+- | filename:] linenum [if expression]

The expression must be valid in the context that the breakpoint is set.
.175
CBUG Data Formats
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

In the absence of any explicit type casting, formatting is applied to
the value according to its declaration. Default formats may be coerced
to others by prefixing one of the following switches to the expression
in the pop-up window:

/x Format as a hexadecimal integer.
/d Format as a signed decimal integer.
/u Format as an unsigned decimal integer.
/o Format as an octal integer.
/a Format as an address.
/c Format as a single character.
/f Format as a single-precision floating-point number.
/g Format as a double-precision floating-point number.
.176
C-Debugger (CBUG)
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

CBUG is the ADSP-21000 Family C source-level debugger. Source-level
debugging allows you to @104[step] through a C program line by line, set
@110[breakpoints], @117[examine] and @120[set] the values of variables, and scrutinize
program execution.

CBUG is run under control of either the ADSP-21020 EZ-ICE Emulator or
the ADSP-21020 Simulator; full emulator or simulator functionality is
retained during debugging. CBUG is invoked as a command from the @1[Misc]
menu of the emulator/simulator.

CBUG automatically reads in debugging information from the currently
loaded executable file. C source files compiled with the C compiler's
-g switch may use CBUG's source-level debugging. (Complete programming
requirements are listed in the Programming Requirements section of the
CBUG Reference Manual.)  Functions compiled without debugging
information will be executed, but may not be source-level debugged.

Use the @98[CBUG Index] for a complete list of CBUG commands and help.
.177
Set/Clear Software Breakpoint
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This function is used to set or clear a software breakpoint.  A software
breakpoint is an address at which the emulator will stop executing immediately
prior to the execution of the specified address. The specified address MUST
be located in RAM for the software breakpoint to be set.

This function is only available when employed from the context of a Program
Memory (PM) window in the disassembled format.  Software Breakpoints are
displayed in the disassembled PM window.  They are indicated by the
highlighting of the access field at the breakpoint address.  Use of this
function will toggle the state of a software breakpoint at the address at
which the cursor is present; if a software breakpoint is not set at that
address, one will be established; if a software breakpoint is set at that
address, it will be cleared.

Note that once a software breakpoint is "hit", it remains active. 

This function is normally invoked from the @193[Execution Menu] or via the @188[<F9>] key.

See also @178[Display Software Breakpoints] and @179[Clear All Software Breakpoints].  
.178
Display Software Breakpoints
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This function is used to display software breakpoints.  When invoked, this
function produces a pop-up window on the display.  The display contains the
address (or symbol name if one exists at the address).

This function is invoked from the @193[Execution Menu].

See also @177[Set/Clear Software Breakpoint] and @179[Clear All Software Breakpoints].  
.179
Clear All Software Breakpoints
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This function is used to clear all software breakpoints in the emulator.

This function is invoked from the @193[Execution Menu].

See also @177[Set/Clear Software Breakpoint] and @178[Display All Software Breakpoints].  
.180
Display Hardware Breakpoints
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This window provides the display and control of hardware breakpoints in the
emulator.  When invoked, a pop-up window is displayed that shows the present
status of the hardware breakpoints.  The first column displays the hardware
breakpoint number.  There are 3 for Program Memory Instruction, 1 for Program
Memory Data and 2 for Data Memory.  The next few columns display the address
range for the hardware breakpoint.  The next column displays the break
condition, this specifies the sense the address comparators must use to
determine when to halt the target.  The last column enables or disables the
hardware breakpoint.  The 3 choices at the bottom of the window will Accept
the values in the window, Cancel the values in the window or Reset all
hardware breakpoints.

This functionality is best described by example.  Suppose the following:

      Number             Address Range        Break When   State

      PMI_1       000000 <= Address <= 000100    True     Enabled
      PMI_2       000200 <= Address <= 000300    False    Enabled
      PMI_3       000400 <= Address <= 000500    True     Disabled

PMI_1 would cause the target to halt when an instruction between address 0 and
address 100 were accessed.  PMI_2 would cause the target to halt when an
instruction that was outside the range 200 to 300 was accessed.  PMI_3 would
never cause the target to halt because it is disabled.
@180[ ]

.181
Emulator Reset
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This function will reset the emulator.  This function re-initializes all 
emulator hardware in addition to the functionality provided by a @67[chip reset].
Also, all memory and maps are initialized, SW and HW breakpoints are cleared, 
and all symbolic data is purged.  

A pop-up window appears prompting the user for confirmation before the emulator
reset operation is performed.

See also @67[Chip Reset].
.182
Emulator Defaults
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The emulator defaults window provides for the display and control of default
settings, modes, etc., of the emulator.  

     Memory Verification - This feature, when enabled, will verify all
            writes to memory.  Whenever data is written to memory, it
            will be read back to insure data integrity.

     Non-Real-Time Mode - This feature, when enabled, allows the user
            to perform all functions of the emulator regardless of 
            whether or not the target is running.  It does this by
            stopping the target, performing the selected function, and
            then resuming target execution.  For example, if Non-Real-Time
            mode is enabled and the target is running, register values
            could be changed, other windows opened etc.. When disabled,
            only those functions that do not require the services of 
            the 210x0 are allowed.

     Non-Real-Time Mode Update Rate - When Non-Real-Time mode is enabled,
            all windows on the screen can be automatically refreshed.  This
            value determines the period, in seconds, between refreshes.  A
            value of  0 indicates no automatic refreshes.

     RUN Timeout - This feature sets a maximum timeout, in seconds, for any 
            target @95[Run].  This is especially useful when combined with
            @79[Playback Keystroke File] to avoid the emulator staying in target
            execution and never reaching any software or hardware breakpoints 
            A value of 0 indicates no timeout.

     Board Address - This entry cannot be changed.  It merely informs the
            user of the board address of the emulator plug-in card.

Note that these values are saved in the window file.  See also @72[load window file]
and @73[save window file].
.186
Help on Help
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The on-line help system of the ADSP-21020 Emulator is designed to be easy to
understand and simple to use.  The help system is also context sensitive.  This 
means that the help system is sensitive to what you are doing, or trying to do, 
and will try to give you help relative to your current situation.  

You can get help at any time by pressing the <F1> key.  The screen will then
display a help message pertinent to whatever window you were working in.  Once
the help system is entered, you can choose to remain in the help system or
return to the emulator.  

At the top of the screen, and in the text of many help screens, are words that 
are, typically, in a different color.  These are called keywords and provide an
easy and efficient means of moving throughout the help system.  Selecting these
keywords, either by clicking on them with the mouse or using the arrow keys to 
choose one and pressing <ENTER>, will switch from the current help screen to 
a help screen containing help on your chosen keyword.  Pressing the <ESC> key 
anywhere in the help system will always return you to the emulator.  

Note: The arrow keys will scroll the help screens where appropriate.
.187
Help Index
@20[About Emulator...]
@4[Abort]
@29[Alternate DAG1 Registers]
@33[Alternate DAG2 Registers]
@24[Alternate Register File]
@37[ASTAT]
@94[Auto-Step]
@176[C-Debugger (CBUG)]
@65[Cache Display]
@47[Cache Registers]
@7[Center Windows]
@191[Core Menu Option]
@67[Chip Reset]
@179[Clear all Software Breakpoints]
@68[Color Display Attributes]
@48[Computational Registers]
@66[Cycle Counter Display]
@27[DAG1 Registers]
@31[DAG2 Registers]
@54[Data Memory]
@GUI_BATON_COM_SYM_DM_DELETE_ALL[Delete DM Symbols]
@GUI_BATON_COM_SYM_PM_DELETE_ALL[Delete PM Symbols]
@80[Display File]
@180[Display Hardware Breakpoints]
@89[DM Symbol Display]
@58[Dump Memory]
@181[Emulator Reset]
@193[Execution Menu Option]
@2[Exit]
@190[File Menu Option]
@60[Fill Memory]
@69[Floating Point Display Attributes]
@189[General Info]
@61[Go To Address]
@187[Help Index]
@186[Help on Help]
@39[Interrupt Control Registers]
@8[List Windows]
@70[Load Architecture File]
@71[Load Executable File]
@59[Load Memory]
@72[Load Window File]
@86[Loop Address Stack]
@85[Loop Counter Stack]
@45[Loop Registers]
@17[Make Window Narrower]
@15[Make Window Shorter]
@14[Make Window Taller]
@16[Make Window Wider]
@44[Memory Control Registers]
@57[Memory Map]
@192[Memory Menu Option]
@1[Menu Bar]
@35[MODE1 Register]
@36[MODE2 Register]
@10[Move Window Down]
@11[Move Window Left]
@12[Move Window Right]
@9[Move Window Up]
@5[Next Window]
@81[Operating System Shell]
@82[Shell an OS Command]
@62[Plot Memory ]
@83[PC Stack]
@79[Playback Keystroke File]
@87[PM Symbol Display]
@46[Program Counter Registers]
@50[Program Memory]
@43[PX Registers]
@194[Setup Menu Option]
@3[Quit]
@6[Redraw Display]
@21[Register File]
@95[Run/Halt]
@73[Save Window File]
@188[Special Keys]
@77[Start Keystroke Recording]
@84[Status Stack]
@93[Step 'n' Times]
@92[Step]
@38[STKY Register]
@78[Stop Keystroke Recording]
@41[Timer Registers]
@18[Toggle Window Format]
@40[User Status Registers]
@19[Video Mode]


.188
Special Keys
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The following are a list of special keys and their associated functions:

   Execution Functions
        @95[<F4>]        Run/Halt
        @92[<F10>]       Step
        @93[<Shift F10>] Step 'n' Times
        @94[<Ctrl-A>]    Auto-Step
        @177[<F9>]        Set/Clear Breakpoint

   Memory Functions
        @58[<Ctrl-D>] Dump Memory
        @60[<Ctrl-F>] Fill Memory
        @61[<Ctrl-G>] Go To Memory
        @62[<Ctrl-P>] Plot Memory
        @59[<Ctrl-M>] Load Memory
 
   Window Sizing Functions
         @14[<Shift-F5>] Grow Window Vertically
         @15[<Shift-F6>] Shrink Window Vertically
         @16[<Shift-F7>] Grow Window Horizontally
         @17[<Shift-F8>] Shrink Window Horizontally

   Window Movement Functions
         @9[<F5>] Move Window Up
         @10[<F6>] Move Window Down
         @11[<F7>] Move Window Left
         @12[<F8>] Move Window Right

   Window Selection Functions
        @4[<ESC>]    Close Current Window
        @5[<F2>]     Go To Next Window
        @1[<F3>]     Go To Menu Bar
        @8[<Ctrl-L>] List/Go To Specific Window

   Window Display Functions
        @186[<F1>]     Help
        @18[<Ctrl-T>] Toggles Window Display Format

.189
General Info
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This program provides the emulation control software for the ADDS-21020-EZ-ICE
in-circuit emulator for the Analog Devices ADSP-21020 Floating Point Digital
Signal Processor.  

This program is controlled by a menu driven, graphical user interface.  Items
are selected and controlled from the keyboard and/or mouse.  A menu bar at the
top of the screen provides access to windows and functions.  In addition, some
functions can be invoked directly from the keyboard whenever a special key is
pressed.  

An online help system provides help at any time simply by pressing the <F1> key
or by selecting the Help option from the menu bar.  

Further information available:
                        - @186[Help on Help System]
                        - @1[Menu Bar]
                        - @188[Special Keys]
                        - @187[Index]
                        - @176[CBUG Overview] and @98[CBUG Index]
               
CBUG Step
.190
File Menu Option
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This submenu controls file related functions of the emulator.  Choices within
this submenu are:
   Load Files...  which contains the following choices:
       @71[.exe]          - Loads an executable file into the emulator
       @70[.ach]          - Loads an architecture file into the emulator
       @72[.win]          - Loads a window file into the emulator
   @80[View File]         - Displays a text file
   @73[Save Window File]  - Saves current configuration into a file
   Keystroke Recording...  which contains the following choices:
       @77[Start Recording] - Records keystrokes to a file
       @78[Stop Recording]  - Stops recording keystrokes to a file
       @79[Playback]        - Playback a keystroke file

   @81[Execute Shell CMD]      - Executes shell command
   @81[Operating System Shell]    - Shells to the Operating System
   @3[Quit]                   - Exit emulator 

.191
Core Menu Option
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This submenu controls register related functions of the emulator.  Choices 
within this submenu are:

   @21[Register File]   - Displays register file registers
   @27[DAG1]            - Displays DAG1 registers
   @31[DAG2]            - Displays DAG2 registers
   @39[IRQS]            - Displays interrupt control registers
   Counters...  which contains the following choices:
       @46[Program Counters]        - Displays program counter registers
       @45[Loop counters]           - Displays loop registers
       @41[Timers]                  - Displays timer registers
       @66[Cycle Count]             - Displays a clock cycle counter
   Stacks...  which contains the following choices:
       @86[Loop Address] - Displays the loop address stack
       @85[Loop Counter] - Displays the loop counter stack
       @83[PC]           - Displays the PC stack
       @84[Status]       - Displays the status stack
   Status...  which contains the following choices:
       @37[ASTAT]                   - Display ASTAT register
       @40[USTAT]                   - Displays user status registers
       @38[STKY]                    - Displays STKY register
       @35[MODE1]                   - Displays MODE1 register
       @36[MODE2]                   - Displays MODE2 register
   Inactive...  which contains the following choices:
       @24[Register File']  - Displays inactive register file registers
       @29[DAG1']           - Displays inactive DAG1 registers
       @33[DAG2']           - Displays inactive DAG2 registers
   Other...  which contains the following choices:
   @48[MR]                 - Displays MR registers
   @43[PX]                 - Displays PX registers
   @47[Cache Control]      - Displays cache registers
   @65[Cache Contents]    - Displays cache contents
   @44[Memory Control]    - Displays memory control registers 
.192
Memory Menu Option
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This submenu controls register related functions of the emulator.  Choices
within this submenu are:

   @54[Data Memory Display]       - Displays Data Memory (DM)
   @50[Program Memory Display]    - Displays Program Memory (PM)
                        Symbols...  which contains the following choices:
         @89[DM by Alpha]         - Displays DM symbols alphabetically
         @90[DM by Address]       - Displays DM symbols in numerical order
         @87[PM by Alpha]         - Displays PM symbols alphabetically
         @87[PM by Address]       - Displays PM symbols in numerical order
         @91[Delete Symbols]      - Deletes all symbols
   @57[Segment Map]                - Displays/Modifies the memory map
  Ports...  which contains the following choices:
         @GUI_BATON_APP_MEM_PORT_DISPLAY[List]              - Displays port status
         @GUI_BATON_APP_MEM_PORT_OPEN[Open]               - Opens a port
         @GUI_BATON_APP_MEM_PORT_CLOSE[Close]              - Closes a port
  Operations...  which contains the following choices:
      @58[Dump Memory]           - Dumps memory to a file
      @59[Load Memory]           - Loads memory from a file
      @60[Fill Memory]           - Fills memory with a pattern
      @62[Plot Memory ]          - Plots a range of memory
      @63[Track Memory ]         - Toggles memory tracking
   @61[Go To Address]           - Changes window to a particular address
.193
Execution Menu Option
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This submenu controls Execution related functions of the emulator.  Choices within
this submenu are:
   @67[Chip Reset]            - Emulates a chip reset signal
   @176[C-Debugger (CBUG)]     - Starts up CBUG
   @181[Emulator Reset]       - Resets the emulator
   @95[Run]                    - Runs a emulation
   @92[Step]                   - Executes a single step
 Special...  which contains the following choices:
       @93[Step 'n' Times]     - Executes 'n' single st
       @94[Auto-Step]          - Executes steps until user stops
eps

  Assembly Breaks...  which contains the following choices:
       @GUI_BATON_APP_BP_CLEAR_ALL[Clear All]      - Clears all breakpoints
       @GUI_BATON_APP_BP_DISPLAY[List]           - Displays all breakpoints
       @GUI_BATON_APP_BP_TOGGLE[Toggle]         - Sets/Clears a breakpoint
       @180[HW Breaks]     - Hardware breaks


.194
Setup Menu Option
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This submenu controls setup related functions of the emulator.  Choices within
this submenu are:

   @182[Emulator Defaults]        - Display/Modify the emulator defaults 
   @68[Color]                 - Display/Modify the color attributes of the display
   @69[Floating Point Format] - Display/Modify the way floating point data is displayed
   @19[Screen Size]           - Display/Modify the video mode of the display
   @8[List Windows]          - List all open windows
   @7[Center Windows]        - Centers all open windows
   @6[Redraw Display]        - Redraws the display

   @GUI_BATON_APP_AI_CONTROL[Auto-Flag Control]          - Display/Modify automatic flag generation
   @GUI_BATON_APP_AI_CONTROL[Auto-Interrupt Control]     - Display/Modify automatic interrupt generation
.195
Help Menu Option
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

This submenu controls Help related functions of the emulator.  Choices
within this submenu are:

   @186[<F1>]                  - Help on Help
   @20[About Emulator...]    - Emulator Information
     @0[Return to Emulator]         @-1[Previous Screen]         @189[General Info]

The Step command executes one line of C source code. Function calls
are followed; if a function call is executed, the called function is
entered.

Related CBUG "Execution" menu choices are:
        @104[Step]           - Execute one C line; follow calls
        @105[Next]           - Execute one C line; do not follow calls
        @106[Step 'n' Times] - Step that many times
        @107[Next 'n' Times] - Next that many times
        @102[Continue]       - Resume execution (await stop or halt)
        @103[Go Until]       - Continue and stop at a specified @174[location]
        @108[Finish]         - Continue until back in calling function
        @101[Restart]        - Execute a @67[chip reset] and Continue
.End