Skip to main content

Short note: I/O mapped and memory mapped I/O

Short answer

I/O mapped I/O uses a separate address space with IN/OUT instructions and IOR/IOW signals, typically 256 ports. Memory mapped I/O treats devices as memory locations, using all memory instructions and MEMR/MEMW signals, but reduces memory space and needs more decoding.

Write a short note on I/O mapped and memory mapped I/O.

There are two ways to assign addresses to I/O devices.

I/O mapped I/O (isolated I/O): I/O devices have a separate address space. The processor uses special instructions IN and OUT and the control signal IO/M = 1 (8085) or M/IO = 0 (8086). 8085/8086 give 8-bit port addresses (256 ports; 8086 can also use DX for 64K ports). Data transfer is only through the accumulator. Example: OUT 80H.

Memory mapped I/O: an I/O device is treated as a memory location; the device gets an address in the normal memory map, and all memory instructions (MOV, LDA, STA, ADD, etc.) can be used. The control signals are MEMR/MEMW, and the 16-bit address is fully decoded. Example: STA 8000H writes to a port at 8000H.

PointI/O mappedMemory mapped
Address spaceSeparate (256 ports in 8085)Shares memory space
Address lines8 (A0–A7)16 (A0–A15)
InstructionsIN, OUT onlyAll memory instructions
Control signalsIOR, IOWMEMR, MEMW
Data transferOnly through accumulatorAny register
Decoding hardwareSimpler (fewer lines)More complex
Memory availableFull 64 KB for memoryReduced by the I/O addresses
SpeedFaster in generalSlower (longer instructions)
Arithmetic on I/O dataNot possible directlyPossible

✓ Answer checked by Claude Opus 5.5 (high effort)

All Microprocessor chapter 4 questions →