First page Back Continue Last page Overview Graphics

Laboratory 2.2 (cont)


This program reads the switches from the evaluation board and stores their value in Accumulator A. The switches are accessed via I/O port T (address $ae). Switch 0 is bit position 0, switch 1 is bit position 1, switch 2 is bit position 2, and switch 3 is bit position 3. The program sets the constant port_t equal to $ae, a useful practice to improve readability. Type in and assemble the program.

Important: The switches are located in the lower left corner of the lower board. Do not change the switch positions of the switch block on the upper board.