| HC SDK for Retro Computing |
A complete cross-development toolkit for vintage microprocessors. Write B language programs, assemble, link, and run on Z80, 8080, 8085, and 8086 targets - all from your modern machine.
| Quick Facts | ||
|---|---|---|
| Version | 2.1 |
Supported Hosts macOS (ARM/x86_64) Linux x86_64 Windows 64-bit Windows 32-bit DOS (DJGPP) FreeBSD / OpenBSD |
| License | BSD 4-Clause | |
| Language | B (typeless, predecessor of C) | |
| Target CPUs | Z80, 8080, 8085, 8086 | |
| Runtime | CP/M 2.2, MSX-DOS, MS-DOS | |
| Tool | Description | Binary |
|---|---|---|
| B Compiler | Compiles B language to assembly with peephole optimization. Supports right-to-left argument passing, inline functions, and a full preprocessor. | hcbcomp-{z80,8086,8086exe,8080,8085} |
| Assembler | Multi-target assembler for Z80, 8080, 8085, and 8086. Supports macros, expressions, sections, and all standard instruction sets. | hcasm-{z80,8086,8080,8085} |
| Linker | Multi-format linker producing flat binaries (COM), MZ executables (EXE), and relocatable REX format. Dead code elimination included. | hclink-{bin,mz,rex} |
| Librarian | Object file library manager. Create, extract, list, and replace objects in .lib archives. | hclib |
| Builder | Project build system using .prj configuration files. Orchestrates compilation, assembly, and linking in one command. | hcbuild |
| Emulator | MSX-DOS / CP/M 2.2 emulator. Run Z80 and 8080/8085 CP/M binaries natively. | msxdosemu |
source.b
|
v
[Preprocessor] → #define, #ifdef, #include expansion
|
v
[B Compiler] → Generates assembly (.s)
|
v
[Peephole] → Instruction-level optimization
|
v
[Assembler] → Produces object file (.obj)
|
v
[Linker] → Links to .com / .exe / .rex
extrn putchar;
main() {
putchar('H');
putchar('e');
putchar('l');
putchar('l');
putchar('o');
putchar('!');
}
Compile and run for Z80/CP/M:
hcbcomp-z80 -o hello.s hello.b hcasm-z80 -o hello.obj hello.s hclink-bin -text 0x100 -o hello.com hello.obj libs/z80-cpm-b.lib msxdosemu hello.com
[Read the full Quick Start Guide] · [B Compiler Reference] · [Sample Programs]
| HC SDK for Retro Computing v2.1 R8 — © 2025-2026 Humberto Costa dos Santos Junior | Changelog |