* memory segments STACK equ $00ff EEPROM equ $f800 * motor port location MOTORS equ $1004 * interrupt vector IRQ equ $fff2 * constants for configuration register OPTION equ $1039 IRQE equ %00100000 * code area org EEPROM start * need to set up the option register ASAP ldaa #IRQE staa OPTION * set up stack pointer lds #STACK * Enable interrupts. Note IRQ has no local mask cli * main loop mloop wai * standby bra mloop * IRQ interrupt handler. We'll just invert the state of the LEDs so * we can watch them flash irqhan com MOTORS rti * interrupt vector org IRQ fdb irqhan end start