*============================================================== * buffalo.asm - Defines Buffalo-specific addresses of interest, * namely addresses of the subroutine jumptable in ROM and * the interrupt service routine (ISR) jumptable in RAM. * Must be included before your own ORG directives. *============================================================== #include "core.asm" ; Defines ADDRSIZE JUMPINST_SIZE equ 1+ADDRSIZE ; A jump instruction is a 1-byte opcode plus an address * Buffalo subroutine jumptable addresses * Each location in the jump table contains an appropriate JMP instruction. * To use, just JSR to the jump table address that you want to use. Buffalo_utljmp_base org $ffa0 UPCASE rmb JUMPINST_SIZE ; Convert character to uppercase WCHEK rmb JUMPINST_SIZE ; Test character for whitespace DCHEK rmb JUMPINST_SIZE ; Check character for delimiter INITDEV 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 ($04) 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 VECINIT rmb JUMPINST_SIZE ; Initialize RAM interrupt vector table * Buffalo interrupt vector jumptable addresses * Each location in the jump table contains an appropriate JMP instruction. * To use, store the address of your ISR at the jumptable address+1. Buffalo_intjmp_base org $00c4 JSCI rmb JUMPINST_SIZE ; Serial Communications Interface JSPI rmb JUMPINST_SIZE ; Serial Peripheral Interface JPAIE rmb JUMPINST_SIZE ; Pulse Accumulator input edge JPAO rmb JUMPINST_SIZE ; Pulse Accumulator overflow JTOF rmb JUMPINST_SIZE ; Timer overflow JTI4C5 rmb JUMPINST_SIZE ; Timer input capture 4 / output compare 5 JTOC4 rmb JUMPINST_SIZE ; Timer output compare 4 JTOC3 rmb JUMPINST_SIZE ; Timer output compare 3 JTOC2 rmb JUMPINST_SIZE ; Timer output compare 2 JTOC1 rmb JUMPINST_SIZE ; Timer output compare 1 JTIC3 rmb JUMPINST_SIZE ; Timer input capture 3 JTIC2 rmb JUMPINST_SIZE ; Timer input capture 2 JTIC1 rmb JUMPINST_SIZE ; Timer input capture 1 JRTI rmb JUMPINST_SIZE ; Real-time interrupt JIRQ rmb JUMPINST_SIZE ; IRQ pin (maskable) JXIRQ rmb JUMPINST_SIZE ; XIRQ pin (nonmaskable) JSWI rmb JUMPINST_SIZE ; Software Interrupt JILLOP rmb JUMPINST_SIZE ; Illegal opcode trap JCOP rmb JUMPINST_SIZE ; Computer Operating Properly watchdog failure JCLM rmb JUMPINST_SIZE ; Clock monitor failure