* Popular equates EXT_RAM_START EQU $0200 * Start of external RAM in U5 BUF_UTLJMP_START EQU $ffa0 * Start of Buffalo utility subroutine jump table in ROM JUMPINST_SIZE EQU 3 * Length of jump opcode + 2 byte addr EOT EQU $04 * ASCII code for "end of transmission" * Define the entries in the Buffalo utility jump table ORG BUF_UTLJMP_START UPCASE RMB JUMPINST_SIZE * Convert character to uppercase WCHEK RMB JUMPINST_SIZE * Test character for whitespace DCHEK RMB JUMPINST_SIZE * Check character for delimiter INIT RMB JUMPINST_SIZE * Initialize I/O device INPUT RMB JUMPINST_SIZE * Read I/O device OUTPUT RMB JUMPINST_SIZE * Write I/O device OUTLHLF RMB JUMPINST_SIZE * Convert left nibble to ASCII and output OUTRHLF RMB JUMPINST_SIZE * Convert right nibble to ASCII and output OUTA RMB JUMPINST_SIZE * Output ASCII character OUT1BYT RMB JUMPINST_SIZE * Convert binary byte to 2 ASCII characters and output OUT1BSP RMB JUMPINST_SIZE * Convert binary byte to 2 ASCII characters and output followed by space OUT2BSP RMB JUMPINST_SIZE * Convert 2 consecutive binary bytes to 4 ASCII characters and output followed by space OUTCRLF RMB JUMPINST_SIZE * Output ASCII carriage return followed by line feed OUTSTRG RMB JUMPINST_SIZE * Output ASCII string until end of transmission (004) OUTSTRG0 RMB JUMPINST_SIZE * Same as OUTSTRG except leading carriage return and line feed is skipped INCHAR RMB JUMPINST_SIZE * Input ASCII character and echo back * Here's our actual program. ORG EXT_RAM_START * Start code at beginning of external RAM * "Hello" subroutine, prints "Hello World!" on Serial Comm. Interface. HELLO: LDX #MSG * Point X at "Hello World!" string JSR OUTSTRG0 * Call appropriate "Out String" subroutine to print RTS * Return from subroutine MSG: FCC 'Hello World!' FCB EOT