Tangerine Microtan 65
Monitor Commands


Memory Map
System variables
Display Format
Character Sets
Monitor Subroutines
Monitor Commands

Monitor Commands

All commands and data must be typed in upper case.  If you type anything incorrectly, TANBUG will display a "?" at the end of the line.

M - Memory examine/modify

Displays the content of a specified memory location and allows you to change it.

Command format:


Where ADDRESS is the address if the memory to display/change.

The current content is displayed after the address.  If you want to change it, type the new value.  Pressing ENTER will store the new value (if there is one) and exit.  Pressing Ctrl-ENTER (this was a single key on the Microtan keyboard - LF) stores the new value and opens up the next location.  ESC stores the new value and opens up the previous location.

L - List memory

Displays the contents of a section of memory.

Command format:


Where ADDRESS is the first address to be displayed and NUMBER OF LINES is the number of eight bytes lines to display.

Each line displayed comprises the address of the first byte on the line followed by eight bytes of data.

G - Go

Starts execution  of a program.

Command firmst:


Where ADDRESS is the address of the program start.  The program will execute until either a BRK instruction is executed, or the Microtan is reset.

R - CPU register display/modify

Memory locations 0015-001B are used to hold the contents of the CPU registers.  The CPU registers are loaded from these locations when you execute a program with the G command, and are stored there when a BRK instruction is executed, prior to the system returning to TANBUG.  The R command simply performs a M0015 command to allow you to display and modify the CPU registers.

0015 Program Counter (PC) low byte
0016 Program Counter (PC) high byte
0017 Processor status word (PSW)
0018 Stack Pointer (SP)
0019 Index X (IX)
001A Index Y (IY)
001B Accumulator (A)

S - Enable single instruction mode

When single instruction mode is enabled, your program will execute one instruction at a time.  The CPU registers will be displayed after each instruction.

N - Normal mode (disable single instruction mode)

This mode is also automatically set when the CPU is reset.

P - Proceed

Executes the next instruction.  If you follow the P command with a number, that number of instructions will be executed.

B - Set/clear breakpoint

Command format:


When ADDRESS is the address at which to set the breakpoint.  BREAKPOINT NUMBER is from 0 to 7 and is the ID number of the breakpoint.  To clear  a breakpoint, set its address to zero.  Used on its own, the B command will clear all breakpoints. 

NOTE: This command works by replacing the instructions at the breakpoint addresses with BRK instructions when you execute your program.  When your program hits a BRK and returns to TANBUG, all the breakpoint BRK instructions are replaced by their original values.  So:

1.    A breakpoint should only be set at the op-code part of your instruction.
2.    If breakpoints are set and the CPU is reset, the breakpoints will be left as BRK instructions.
3.    Setting more than one breakpoint at the same address will cause a BRK instruction to be left at that address.
4.    if your program is self-modifying and it changes an instruction where a breakpoint has been set, the breakpoint will not occur and the original value restored if the program exits because of a BRK.

O - Calculate branch offset

Calculates the offset required for a branch instruction

Command format:


Where BRANCH OPCODE ADDRESS is the address of the opcode of the branch instruction and BRANCH DESTINATION ADDRESS is the address where the branch is to jump to. 

C - Copy memory

Copies a block of memory.

Command format:


Where SOURCE START ADDRESS is the start address of the source block, SOURCE END ADDRESS is the end address of the source bock (this address is included in the copy) and DESTINATION START ADDRESS is the start address of the destination.

Note that this command always copies from the start to the end and, so if the destination start address is within the source block, the block will be corrupted.

T - Translate assembler to machine code

Begin using the single line assembler.

Command format:


Where ADDRESS is the address at which to begin assembling.  The display will show the address followed by the byte currently stored at this address and the input cursor (which has changed  to an exclamation mark).  You may now enter a line of 6502 assembler, followed by ENTER.

Each assembler line consists of a three letter mnemonic and, if there is an operand, a space followed by the operand.  All letters must be in upper case, and hexadecimal values must be preceded by a dollar "$".  You can enter a single character as operand data by preceding the character with an apostrophe '.  Labels cannot be used.  The immediate operator is a "#".

When you have entered a valid line of assembler, the machine code will be shown after the address, and the ASCII equivalent on the right.  The address will automatically increment.

If you enter an invalid line, a question mark will be shown and the address will not change.

Pressing caret "^", will cause the address to decrement by one and Ctrl-ENTER causes the address to increment by one.

You may change the address by entering *=$<ADDRESS>

Data may be directly entered by typing $<HEX BYTE> or '<CHARACTER>

When you have finished, press ESC.

An example is shown below:

Example assembler program

I - Interpret (disassemble) machine code as assembler

Disassemble a section of memory.

Command format:


Where ADDRESS is the address at which to begin disassembling.

The display will show fifteen lines of disassembly and stop.  You may new press:

    ENTER - display the next fifteen lines
    ESC - return to TANBUG
    Ctrl-ENTER - display continuous disassembly until the Microtan is reset.


BAS - Start BASIC interpreter

This starts the BASIC interpreter.  You can also type GE2ED, which does the same thing.

Previous Page


Copyright (C) 1999-2002 by Geoff Macdonald

Last updated 19/03/2002