This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Port C is connected to eight different LED’s and port A and port B are connected to 16 switches. If any switch in port A is ON, the upper portion of port C Will be ON. If any switch in port B is turned ON, then the lower portion of port C will ON and OFF with some delay on each case. Write a DOCUMENTED program to monitor the system continually START: MOV DX, 5000H ; INPUT PORT A IN AL, DX AND AL, 0FFH ; CHECK IF ANY SWITCH IS ON JZ CONT MOV AL, 0F0H ; MAKE UPPER C ON CONTINUOUSLY MOV DX, 5002H OUT DX, AL CONT: MOV DX, 5001H ; INPUT PORT B IN AL, DX AND AL, 0FFH ; CHECK IF ANY SWITCH IN PORT B IS ON JZ START ; IF NO SWITCH IS ON, THEN REPEAT MOV AL, 0FH ; IF ANY SWTICH IN B IS ON MOV DX, 5002H ; MAKE LOWER C ON ON_OFF: OUT DX, AL CALL DELAY ; CALL DELAY XOR AL, 0FH ; ALTERNATE LOWER C ON AND OFF. JMP ON_OFF...
View Full Document
This note was uploaded on 05/17/2010 for the course EE EE390 taught by Professor Mohandes during the Spring '10 term at King Fahd University of Petroleum & Minerals.
- Spring '10