QUICK COMMAND REFERENCE load Load hex and map files listing Load listing file (default extension: LST) wp Write program memory rp Read program memory wd Write data memory rd Read data memory mr Modify a C25 register pwait Program memory wait state dwait Data memory wait state bp Set a breakpoint clrbps Clear all breakpoint go Run N steps or until next breakpoint cycles Run for N processor cycles reset Reset the C25 bkgnd Run C25 continuously as background process (or stop) int Manually trigger an interrupt symbols Show symbol table match? Find all global labels matching current PC quit Quit this program Use Home, End, PageUp, PageDown, and up and down arrows to navigate, any other key returns to the simulator. Function keys: F1 => view this help file F2 => view source listing file F3 => view symbol table F4 => execute one instruction (active only in simulator) F5 => string search (active only in viewer) F6 => repeat string search (active only in viewer) MORE DETAILS ON COMMANDS Commands are case-insensitive. "WP", "Wp", "wP", and "wp" are all valid. Many commands take numerical arguments. Numbers are interpreted as decimal by default, and are interpreted as hexadecimal if they have the prefix "0x", as in C. Numerical arguments can be decimal numbers (29), hexadecimal numbers (0x1234), or global symbols defined in the MAP file. Assuming there is a global symbol "_interrupt_handler", these would all be acceptable ways to set a breakpoint. bp 0x53 bp 83 bp _interrupt_handler "Go" takes an optional numerical argument. If no argument is used, "go" will execute code until either a breakpoint is hit, or a key is pressed on the keyboard. If an argument is given, "go" will stop on either of those conditions, or when that number of instructions have been executed. "steps" and "cycles" each take a number, respectively specifying how many instructions or processor cycles to execute. "wp" and "wd" take two numerical arguments, an address followed by data. "bp" takes on numerical argument, an address, and sets a breakpoint there. "rp" and "rd" take an address, and optionally a second address. If two addresses are specified, then a range of memory values is displayed, up to but not including the second address, for example: READY> rd 0x1C00 0x1C10 Data memory 1C00 - 1234 5678 0246 1357 1234 5678 0246 1357 1C08 - 1234 5678 0246 1357 1234 5678 0246 1357 "load" takes a filename, and loads Intel hex files for C25 code, and a Texas Instruments map file, if one exists. For more details, see the description below of the functions load_hex_files() and load_map_file(). "listing" takes a filename, and loads a new source listing file. This can be viewed by pressing the F2 key. While in the listing view screen, you can navigate with Home, End, PageUp, PageDown, and the up and down arrow keys. Press any other key to return to the simulator. If the simulator is invoked with a filename argument, it will try to load a listing file automatically. If the argument is "FOO", the simulator will look for "FOO.LST". If an extension is specified, it will use that. "symbols" prints the symbol table (extracted from the MAP file), showing the names of globally defined symbols and their hexadecimal values. "match?" prints the names of all globally defined symbols whose values match the current PC. "mr" takes the name of a register, followed by a new value to assign that register. The valid register names are: arp ov ovm intm dp arb cnf tc sxm c hm fsm xf fo txm pm pc t sp ar0 ar1 ar2 ar3 ar4 ar5 ar6 ar7 bio acc p drr dxr tim prd imr greg. "pwait" and "dwait" set up wait states for ranges of program and data memory. To specify a range of program memory with two wait states from address 0x800 to 0xFFF, type "pwait 0x800 0xFFF 2". "dwait" works the same way for data memory. Up to twenty ranges can be specified for program memory, and another twenty for data memory. "int" takes an interrupt type name, and manually triggers an interrupt of that type. The valid C25 interrupts are: RS, INT0, INT1, INT2, TINT, RINT, XINT, TRAP. MORE DETAILS ON THE FILE VIEWER The file viewer lets you conveniently view text files from the simulator. At any time while simulating, you may press the F1 key to view this help file, the F2 key to view the source listing, or the F3 key to view the symbol table. When in the file viewer, you can navigate using the Home, End, PageUp, PageDown, and up and down arrow keys. Within the file viewer you can search for a string of text. Press F5 and you will be prompted for the string to be searched for. The first line, at or after your current position, that contains that string will be moved to the top of the screen. When you press the F6 key, the next line containing that string will be moved to the top of the screen. If the string is not found, a warning to that effect will appear. GNU GENERAL PUBLIC LICENSE C25SIM is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.