|
|
|
Using TANBUGTANBUG has several commands which are used to enter programs. The "M" command is used to view or modify a single byte. Machine code can be entered in this way. The "L" command is used to list blocks of memory. XBUG provides two additional commands, "T" translates assembler into machine code - one line at a time. "I" interprets machine code into assembler. The single line assembler provided by XBUG does not allow the use of labels. Detailed information about the operation of these commands can be found in the Documentation. Using a Two-Pass assemblerIf you want to write programs for the Microtan yourself, it's far easier to use a PC based two-pass assembler than the XBUG single line assembler. If you want to rough it, see the XBUG manual! Any two-pass 6502 assembler will do, as long as it can produce Intel Hex files. A suitable DOS based assembler is available in Software Downloads.
Remember
Example ProgramThis program calls TANBUG routines to display the letters "A" through "Z". org $0400 jsr $fe73 ;New line lda #$41 ;Start with "A" loop pha ;Display it jsr $fe75 pla clc ;Increment to next character adc #$1 cmp #$5b ;Have we finished? bne loop ;No - loop back brk ;Stop end |
| ||||