OUTA EQU $FFB8 ; ADDRESSES MAY VARY BY BOARD IRQJMP EQU $00EE XIRJMP EQU $00F1 ************************************************************************** * Buffalo emulation section for Wookie: * * * * To get Wookie to work, add RTS instructions at the Buffalo locations. * * Remove this section before compiling for Buffalo. * * You can set breakpoints here if you want to see if your program is * * behaving correctly. * * * * The part after ORG $FFF2 sets up the IRQ and XIRQ for Wookie. The * * Buffalo method for setting up these interrupts is completely different.* ************************************************************************** ORG OUTA RTS ORG $FFF2 ; SETS IRQ AND XIRQ INTERRUPT VECTORS FDB IRQJMP ; DUPLICATES THE WAY THAT BUFFALO FDB XIRJMP ; HANDLES THESE INTERRUPTS ************************************************************************** * End of Buffalo emulation section. * ************************************************************************** ORG $8800 MEM1 FDB $0000 IRCNT FCB 0 XIRCNT FCB 0 ORG $8000 ******************************************************************************* * Begin another Buffalo emulation section: Buffalo does stack initialization * * So you need to initialize the stack in Wookie BUT NOT IN BUFFALO * ******************************************************************************* LDS #$88FF ******************************************************************************* * End of Buffalo emulation section. * ******************************************************************************* ; Start by initializing the jump table MAIN LDAA #$7E ; 7E is a JMP instruction... LDX #IRQH ; X now has location of IRQ handler... STAA IRQJMP ; Store "JMP" at IRQJMP location STX IRQJMP+1 ; Store address at next location * These 4 previous instructions write a "JMP" instruction to the jump table * entry for IRQ LDX #XIRQH STAA XIRJMP ; Store "JMP XIRQH" at XIRJMP location STX XIRJMP+1 * Likewise, these 3 instructions write a "JMP" instruction to the jump table * entry for XIRQ CLRA ; Now that the jump table is set up... TAP ; ... turn on both interrupt sources LOOP BRA LOOP ; When you get here, the main program is done... IRQH INC IRCNT * In your program, insert code here to write the location of the ASCII string * to memory location MEM1 RTI XIRQH INC XIRCNT * In your program, insert code here to read the memory location MEM1 and, if * it is not NULL, send the string to the terminal using OUTA (1 char at a time) RTI