Skip to content

Basic Debugging Features

Jackson edited this page Jul 2, 2024 · 3 revisions

Shortcuts

Calculator Key Computer key
F6 Step
F7 Step Over
F8 Step Next
F9 Step Out
F10 Open Debugger
Pause Type Asm(

Features

Disassembly

This shows the current assembly code that is executing. You can step through instructions by using the Debug Control dock. You can import a .lab or .map file in order to change addresses into readable equates by pressing the Load... button. You can then use these equates across all debugging features.

Breakpoints

Execution breakpoints trigger whenever the emulated Program Counter (PC) reaches the specified address. This is useful for stepping through code to determine which routines may be giving issues. It is also useful for observing how CPU registers and memory are affected at each breakpoint address. You can set breakpoints from the Break / Watch / Port debug dock.

Watchpoints

Read / Write breakpoints trigger whenever the CPU reads or writes to that specific address. This is useful for determining when a variable is being modified or used. It is possible to change the length of the displayed variable in order to see what the value may be. You can set breakpoints from the Break / Watch / Port debug dock.

Port Monitor

The Port Monitor is used to view the status of various ports connected to the internal ASIC. It is useful to determine when specific ports are being accessed either through a read or write operation, and you can even lock the value of the port by using the Freeze checkbox column.

CPU Status

This dock shows the current state of the CPU, including CPU registers, flags, stack values, and interrupt information. You can also use the cycle counter in order to profile the execution time of various routine by using the Zero Cycles button. If you press the green text of a register, it will open the memory view at the address of the register (described below).

Memory Views

Memory views are used to see the internal bytes in the calculator's memory. You can search for specific strings or hexadecimal sequences, and modify bytes as well from the interface. Use the Goto button to seek to a particular address.

Timers

The current state of the General Purpose Timers and the Real Time Clock is displayed in this dock. This is also viewable from a memory view, but is provided here for convenience.

OS View

When the debugger is active, the state of the OP registers is visible. These may contain things such as TI floating point values, variable names, etc. In addition, the Variable Allocation Table (VAT) is read and listed. You can right-click on any items in these table to go directly to their entries in the memory views.

Save and Restore State

From the Calculator menu, you can quickly save and restore states in order to rewind to track down a particular bug. Alternatively a full "States" dock is provided to give you as many states as possible in order to make debugging even more efficient.

Miscellaneous

Items such as the current LCD state and battery status are viewable and modifiable here. For a more complete LCD modification, consider using the Memory Visualizer.