HW4soln-3750

HW4soln-3750 - EE 3750 HW 4 solutions 1 EE 3750 Homework 4...

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

View Full Document Right Arrow Icon
EE 3750 — HW 4 solutions 1 EE 3750 — Homework 4 solutions Spring 2004 1. (a) Brey, Chapter 9, Problem 11 - When does ALE float to its high-impedance state? (b) Brey, Chapter 9, Problem 27 - What 8086/8088 signal is used to select the direction of the data flows through the 74LS245 bi-directional bus buffer? (a) The only time that ALE floats to a high-impedance state is during a RESET; otherwise, it is always active. (b) The DT / R signal (data transmit/receive) controls the direction of data flow through the bi-directional bus buffer. See Figure 9-6 for an illustration of the connections. 2. Let SWIPE be a word array holding 160 signed integers. Write an 8086 instruction sequence to use program-controlled I/O to output the words with value at least 3000. (If a word has value less than 3000, then do not output it.) Let DEVOUT denote the output device. The status port for DEVOUT is a byte port at address 2D9CH; bit 2 is the ready bit. The data port for DEVOUT is a word port at address 2D9EH. STATUS EQU 2D9CH ; will use labels instead of port addresses to DATA EQU 2D9EH ; make program more readable READY EQU 100B MOV SI, 0 ; pointer in array SWIPE MOV CX, 160 ; loop counter TOP: CMP SWIPE[SI], 3000 JL NEXT ; if less than 3000, then move to next element of SWIPE MOV DX, STATUS ; use DX because port address is longer than 8 bits CKRDY: IN AL, DX ; poll ready bit of DEVOUT TEST AL, READY JZ CKRDY MOV AX, SWIPE[SI] MOV DX, DATA OUT DX, AX ; output word with value at least 3000 NEXT: ADD SI, 2 ; update pointer LOOP TOP
Background image of page 1

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

View Full DocumentRight Arrow Icon
EE 3750 — HW 4 solutions 2 3. Write an 8086 instruction sequence to input arrays low and high , then compute and output the S+P transform of those arrays using program-controlled I/O. (Homework 3, Problem 4 described this transform.) The program will operate as part of an embedded image processing system — a camera captures an image, then the S+P transform is one stage of an image compression operation that compresses the image before transmitting it. Your program is to input the size of the
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

HW4soln-3750 - EE 3750 HW 4 solutions 1 EE 3750 Homework 4...

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

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