HW5soln-3750

HW5soln-3750 - EE 3750 HW 5 solutions 1 EE 3750 Homework 5...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
EE 3750 — HW 5 solutions 1 EE 3750 — Homework 5 solutions Spring 2006 1. Write an interrupt service routine for an 8086 to input a word of data from device DEV6, then store it in array ORANGE if the value of the data is odd. Assume that word variable POINTER holds the offset to which the next word is to be stored in ORANGE. Let the address of the input data port of DEV5 be 6CCH. The interrupt service routine should input only one word on each interrupt from DEV6. INDEV6 PROC FAR PUSH DX ; save registers changed during routine PUSH AX PUSH BX MOV DX, 6CCH ; use DX because port address is longer than 8 bits IN AX, DX TEST AX, 1 JZ EXIT ; do not store if value is even MOV BX, POINTER MOV ORANGE[BX], AX ADD POINTER, 2 ; update pointer EXIT: POP BX ; restore registers changed during routine POP AX POP DX IRET INDEV6 ENDP 2. Write an 8086 instruction sequence to enable interrupts when Port B of an 82C55 (parallel interface) is ready for output where Group B is in Mode 1. Assume that the modes and input/output directions of the 82C55 have already been initialized. Let B8H be the lowest port address for this 82C55. MOV AL, 5 ; low 4 bits are 0101, setting PC2 to 1 OUT 0BBH, AL ; output to command register 3. Write an 8086 instruction sequence to initialize a 16550 UART (serial interface). Set data length to 8 bits, use 1 stop bit, use no parity, use a baud rate divisor of 3840, disable the FIFO queues, and enable transmitter and receiver interrupts. Let the low port address of the 16550 be 30H. Clearly state any additional assumptions that you make. DLL
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/25/2012 for the course EE 3750 taught by Professor Desouza during the Fall '08 term at LSU.

Page1 / 3

HW5soln-3750 - EE 3750 HW 5 solutions 1 EE 3750 Homework 5...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online