8. To interface 8253 programmable interval timer to 8085 and verify the operation of 8253 in six different modes.
ORG 0000h ; Starting address of the program
; Initialize the 8253
MOV AL, 00110110b ; Load control word for timer 0 into AL (mode 3, binary counting, L-H byte access)
OUT 43h ; Send control word to 8253
MOV AL, 11110100b ; Load L-byte count (LSB) of 1000 into AL
OUT 40h ; Send LSB of count to 8253
MOV AL, 00000100b ; Load H-byte count (MSB) of 1000 into AL
OUT 40h ; Send MSB of count to 8253
; Verify Mode 3 operation
IN AL, 40h ; Read back L-byte count
MOV BL, AL ; Save L-byte count in BL
IN AL, 40h ; Read back H-byte count
MOV BH, AL ; Save H-byte count in BH
HLT ; End of program