Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Consider acomputer system that contains an I/O module controlling a simplekeyboa

ID: 3617140 • Letter: C

Question

Consider acomputer system that contains an I/O module controlling a simplekeyboard/printer teletype. The following registers are contained inthe processor and connected directly to the system bus:

INPR:             Input Register, 8 bits

OUTR:           Output Register, 8 bits

FGI:               Input Flag, 1 bit

FGO:              Output Flag, 1 bit

IEN:               Interrupt Enable, 1 bit

Keystroke inputfrom the teletype and printer output to the teletype are controlledby the I/O module. The teletype is able to encode an alphanumericsymbol to an 8 bit word and decode an 8 bit word into analphanumeric symbol.

a)   a) Describe how the processor,using the first four registers listed in this problem, can achieveI/O with the teletype.

b)   b) Describe how the function canbe performed more efficiently by also employing IEN.

Explanation / Answer

Dear,

INPR

OUTR

FGI

FGO

Receiving Data:

From the Teletype input stored in INPR, it will accept data whenFGI = 0

If (FGI == 0) then accept data

When an 8-bit word enters the INPR from Teletype then FGI =1

If(FGI==1) then CPU transfers contents of INPR to AC(ACCUMULATOR)

                              &    FGIbecomes 0

Sending Data:

CPU will send data to teletype, if FGO = 0 then CPU will waitstate

   If (FGO == 0) then CPU will wait

The output flag is set when a word is printed

If(FGO == 1) then CPU transfers contents of AC to OUTR

                                  & FGO becomes 0

CPU always monitors FGI & FGO.

b) IEN use: Interrupt enable