The test suite validates the assembler and B compiler across all target platforms. Tests compile, assemble, link, and compare runtime output against expected results.
Running Tests
cd tests
./run_tests.sh z80 # Z80 only (assembler + B language)
./run_tests.sh 8086 # 8086 only
./run_tests.sh 8086exe # 8086 EXE only
./run_tests.sh 8080 # 8080 only
./run_tests.sh all # All platforms
Test Structure
tests/
run_tests.sh Test runner script
asm/z80/all_opcodes.s Z80 full opcode test
asm/z80/basic.s Z80 basic instruction test
asm/z80/data_labels.s Labels, sections, expressions
asm/8080/basic.s 8080 instruction test
asm/8085/basic.s 8085 instruction test
asm/8086/basic.s 8086 instruction test
asm/8086/peephole.s 8086 peephole patterns
b/01_basics.b Variables, putchar
b/02_arith.b Arithmetic operators
b/03_compare.b Comparison, logical operators
b/04_bitwise.b Bitwise, shift operators
b/05_control.b if/else, while, break
b/06_functions.b Function calls, params, return
b/07_arrays.b Global arrays
b/08_advanced.b Many args, nested calls, recursion
b/09_compound.b Compound assignment
Results (v2.1 R8)
| Platform | Assembler | B Language | Total |
| Z80 | 3/3 | 9/9 | 12/12 |
| 8080 | 1/1 | 9/9 | 10/10 |
| 8085 | 1/1 | — | 1/1 |
| 8086 | 2/2 | 9/9 | 11/11 |
| 8086exe | — | 9/9 | 9/9 |
| Total | 7/7 | 36/36 | 43/43 |