First page Back Continue Last page Overview Graphics
Laboratory 2.2 (cont)
num_in: ds.b 1
port_t: equ $ae
start: ldaa port_t
Why doesn’t the ldaa port_t instruction have a # sign in front of the port_t? _________
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.