Computer Organization & Embedded System — Input-Output Organization and Multiprocessor, NEC licence examination syllabus (Nepal Engineering Council).
The CPU never talks to a printer directly — it talks to a module that talks to the printer.
An I/O module is the hardware interface sitting between the system bus and a peripheral — think of it as a personal assistant that handles all the messy back-and-forth with a specific device, so the CPU doesn't have to.
Data registerHolds data being transferred.
Status registerFlags like "device busy" or "data ready."
Control registerCommands the CPU sends to the device, like "start," "read," "write."
The chapter lists the three registers without saying how the CPU addresses them. There are two schemes, and comparing them is a standard question.
Memory-mappedDevice registers occupy addresses in the ordinary memory space. The CPU reads and writes them with the same load and store instructions it uses for memory.
Isolated (port-mapped)Devices live in a separate address space reached by dedicated IN and OUT instructions, with a control line telling the bus which space is meant.
Instruction setMemory-mapped needs no I/O instructions at all. Isolated needs extra opcodes.
Address spaceMemory-mapped consumes memory addresses — a real cost on small systems. Isolated leaves memory space untouched.
FlexibilityMemory-mapped lets the full range of addressing modes and pointer arithmetic apply to device registers. Isolated allows only what IN and OUT support.
ProtectionIsolated is easier to restrict, since I/O instructions can simply be made privileged.
The bit definitions above are used with a mask, and the pattern is worth being able to write:
if (status_register) — is true whenever any bit is set, so it would report "ready" on an error with the ready bit clear. Questions on I/O programming often hinge on exactly that mistake.Create a free account to tick topics off, take notes as you read, watch the video lessons and get a day-by-day study plan built around your exam date.
Loading…