A complete 8085 microprocessor system with integrated BIOS/monitor ROM and interactive GUI. Perfect for learning 8085 programming, developing operating systems, or testing embedded software.
- Reset initialization with banner
- Interactive command prompt with basic commands:
- H: Help - display available commands
- D addr len: Dump memory in hex format
- M addr: Modify memory bytes interactively
- G addr: Jump to address and execute
- L: Load Intel HEX programs into memory
- Console I/O via I/O ports 0 (input) and 1 (output)
- Complete 8085 instruction set (all 246 valid opcodes)
- Interactive Terminal - Type commands directly into the BIOS
- Real-time Register Display - Watch A, B, C, D, E, H, L, SP, PC
- Flags Display - Monitor S, Z, AC, P, CY flags
- Memory Viewer - See first 256 bytes of memory
- Step/Run/Stop Controls - Debug or run programs
- Load Programs - Load binary files for testing
- GUI built with Qt5 - Modern, responsive interface
The system integrates:
- C++ 8085 Emulator (
cpu8085.cpp
) - Full instruction set with I/O callbacks - BIOS Monitor (
src/bios.asm
) - Assembled tobuild/bios.bin
, loaded at 0x0000 - Qt5 GUI (
bios_gui.cpp
) - Interactive terminal and system controls - I/O Port System - Port 0 (console in), Port 1 (console out)
This is written in C++17 with Qt5 for the GUI, and 8080/8085-compatible assembly (using Macroassembler AS asl
) for the BIOS.
By default, the monitor uses two I/O ports for console:
- IN from port 0: returns the next ASCII byte if available; returns 0 if no character. The monitor busy-waits until non-zero.
- OUT to port 1: write an ASCII byte to the console output.
You can change these ports at the top of src/bios.asm
by editing the equates CONIN_PORT
and CONOUT_PORT
.
If your emulator has different semantics (e.g., separate status ports), you can adapt the con_getc
and con_putc
routines accordingly.
src/bios.asm
— Monitor BIOS source, ORG 0x0000Makefile
— Build targets for .bin and .hextools/assemble.sh
— Helper script to assemble withasl
-
Qt5 development libraries:
sudo dnf install qt5-qtbase-devel # Fedora # or sudo apt-get install qtbase5-dev # Ubuntu/Debian
-
C++ compiler (g++ 7+ or clang++)
-
Macroassembler AS (
asl
) and itsp2bin
/p2hex
toolsOn Fedora/RHEL:
sudo dnf install asl
On Debian/Ubuntu (may need to build from source):
sudo apt-get install -y build-essential bison flex git clone https://github.com/alfako/asl.git cd asl make sudo make install
cd /home/kde/Documents/8085_bios
make quick
This builds:
build/bios.bin
— BIOS ROM (assembled fromsrc/bios.asm
)8085_bios_system
— Qt GUI emulator executable
mkdir build && cd build
cmake ..
make
./8085_bios_system
or
make run
- Launch the emulator - The GUI will open with an interactive terminal
- Click "Load BIOS" - Loads
build/bios.bin
into memory at 0x0000 - Click "Run" - The 8085 starts executing from 0x0000
- See the BIOS banner in the terminal
- Type commands at the
>
prompt (tryH
for help) - Use BIOS commands to dump memory, modify bytes, or load programs
make clean
When the BIOS monitor prompt (>
) appears, you can use these commands:
- H - Display help
- D 2000 40 - Dump 64 (0x40) bytes from address 0x2000
- M 2100 - Modify bytes at address 0x2100
- Enter hex bytes like
3E C3 00 10
- Press
.
or Enter on blank line to finish
- Enter hex bytes like
- G 1000 - Jump to address 0x1000 and execute
- L - Load Intel HEX format program
- Paste Intel HEX records into terminal
- Loader auto-detects EOF record
Notes:
- Hex numbers are case-insensitive
- Whitespace between hex digits is flexible
- HEX loader supports record types 00 (data) and 01 (EOF)
- Write your program in 8085 assembly (e.g.,
myprogram.asm
) - Assemble it with your preferred assembler (asl, as85, etc.)
- Use BIOS L command to load Intel HEX
- Use BIOS G command to execute
- Write program in assembly, assemble to
.bin
- Click "Load Program..." in the GUI
- Program loads at 0x2000 by default
- Use BIOS command
G 2000
to execute
Edit src/bios.asm
to add:
- New monitor commands
- Device drivers
- System calls for your OS
- Boot loader logic
Then rebuild and test!
The BIOS uses these I/O ports (configurable in src/bios.asm
):
- Port 0 (IN): Console input - returns ASCII character or 0 if no key pressed
- Port 1 (OUT): Console output - sends ASCII character to terminal
To add more I/O devices:
- Define new port numbers in your program
- Use
IN port
/OUT port
instructions - Extend
cpu8085.cpp
I/O callbacks if needed for special hardware simulation
custom_8085_system/
├── src/
│ ├── bios.asm # Monitor BIOS source code
│ ├── os_multitask.asm # OS with shell + multitasking (Phase A+C)
│ ├── os_shell.asm # OS shell (Phase A standalone)
│ ├── os_v03.asm # OS version 0.3
│ └── scheduler.asm # Task scheduler (Phase C standalone)
├── tools/
│ ├── assemble.py # Python assembler wrapper
│ └── assemble.sh # Shell assembler script
├── build/ # Created during build process
│ ├── bios.bin # Assembled BIOS ROM
│ └── bios.hex # Intel HEX format
├── cpu8085.h # 8085 emulator core header
├── cpu8085.cpp # 8085 emulator implementation
├── bios_gui.cpp # Qt5 GUI with interactive terminal
├── CMakeLists.txt # CMake build configuration
├── test_minimal.asm # Minimal test assembly file
└── README.md # This file
- BIOS doesn't load: Make sure
build/bios.bin
exists (runmake
first) - No terminal output: Check that BIOS is loaded and you clicked "Run"
- Keyboard not working: Terminal widget should have focus; click in the terminal area
- Assembler errors: Check
build/bios.lst
for assembly errors - Emulator won't build: Ensure Qt5 development packages are installed
This system provides everything needed to develop a simple operating system:
- BIOS provides: Console I/O, memory management primitives, program loader
- You can add: File system, process scheduling, interrupt handlers
- Extend with: More I/O devices, disk simulation, network simulation
- Test immediately: No need for real hardware!
A permissive license similar to the BSD 2-Clause License, but with a 3rd clause that prohibits others from using the name of the copyright holder or its contributors to promote derived products without written consent.