8086
8086 StudioCPU emulator · debugger · virtual peripheral laboratory
Ready
0 cycles
Registers16-bit 8086 state
Fetch: 0000:0000 → 00000h
Execution listingclick address to toggle breakpoint
Memoryphysical
SS:SP / ports
Trace
VIRTUAL HARDWARE LABORATORY

8086 peripherals

Use the 8086 isolated I/O address space with IN and OUT. The controls below behave like connected laboratory hardware and are deliberately simple enough to understand at signal level.

8-bit LED bankOUT 10h, AL
D7 D6 D5 D4 D3 D2 D1 D0
Each data bit drives one LED. Port 10h.
Toggle switchesIN AL, 11h
8-BIT INPUT BANK
Persistent input switches. Click a lever, then execute an IN.
4-digit 7-segment display20h–23h
Low nibble selects hexadecimal 0–F, one port per digit.
2×16 character LCD30h / 31h
VSS VDD VO RS RW E D0 D1 D2 D3 D4 D5 D6 D7 A K
Command port 30h; ASCII data port 31h.
4×4 hexadecimal keypad40h / 41h
Write active-low rows to 40h; read active-low columns at 41h.
Buttons & buzzer50h–52h
50h buzzer on/off · 51h buttons · 52h pitch index. IRQ button can also inject vector 20h.
Serial terminal60h / 61h
60h data output / input, 61h status. A compact teaching UART for text exercises.
I/O BUS
Idle

8086 virtual hardware port map

The laboratory uses the 8086 isolated I/O space. All devices are byte-oriented; word IN/OUT operations perform a 16-bit bus transaction and the laboratory uses the low byte unless stated otherwise.

PortDirectionDevice
10hOUTLED bank, bits 7–0
11hINToggle switches, bits 7–0
20h–23hOUTFour hexadecimal 7-segment digits
30hOUTLCD command: 01h clear, 02h home, 80h–8Fh line 1, C0h–CFh line 2
31hOUTLCD ASCII character data
40hOUTKeypad active-low row select
41hINKeypad active-low columns in low nibble
50hOUTBuzzer: zero off, non-zero on
51hINFour push buttons in bits 0–3
52hOUTBuzzer pitch index
60hIN/OUTSerial data byte. OUT appends ASCII to terminal.
61hINSerial status: bit 0 = RX ready, bit 1 = TX ready

Assembly example

mov al, 0A5h out 10h, al ; alternating LEDs in al, 11h ; read toggle switches out 20h, al ; show low nibble on digit 1 mov al, 01h out 30h, al ; clear LCD mov al, '8' out 31h, al ; print a character

Interrupt laboratory: the IRQ push button requests interrupt vector 20h. Install the vector by writing an offset at physical 00080h and a segment at 00082h, enable interrupts with STI, then press IRQ.

Keyboard shortcuts

F5RunF6PauseF7StepF8Step over CALL / INTCtrl+RReset CPU and peripherals
Shortcuts are ignored while modifier combinations do not match. Browser defaults are suppressed for these keys while the emulator is active.