************ * Program PULSE_1 (6811) * * I/O Box on Cable #2 (right side of processor). * Illustartes how to use PORT2. * * Note that BSET and BCLR cannot be used on PORT2 * * Reads switches and winks LED 7 on and off the number of times * specified by switches. * * Must be assembled with PORT2.ASM. To assemble; * * as11 pulse_1.asm port2.asm -l>pulse_1.lst * * Note that a jump (JSR OUTPORT2) must be used as it is too far * for a branch. * * P. H. Anderson, 17 Oct 90; 15 Jan 93 ************** PSCT EQU $C000 DSCT EQU $D000 IDSCT EQU $D300 REGBASE EQU $1000 STACKTP EQU $0045 ORG PSCT LDS #STACKTP CLRA JSR OUTPORT2 * zero the LEDs JSR INPORT2 * get switches in A STAA TIMES AGN LDAA #$80 * turn ms bit on JSR OUTPORT2 BSR TIME * time delay CLRA * ms LED off JSR OUTPORT2 BSR TIME * time delay DEC TIMES BNE AGN * continue until decr to zero SWI TIME PSHX LDX #50000 L1 DEX BNE L1 PULX RTS ORG DSCT TIMES RMB 1