First page Back Continue Last page Overview Text
2. Add code to the above program. Using the branch instruction(s), write a program that waits for switch 2 (bit 1) to go low (on), then lights LED 6 (use either the BSET or BCLR instruction). The program should loop until switch 2 goes low (use either the BRCLR or BRSET instruction) before lighting the LED. Remember to set all the switches high before running the program. The switches are accessed at port $ae (Port T). Use a breakpoint to stop program execution after the wait loop. When using a breakpoint the program will run at full execution speed until the breakpoint is encountered.