intel8080
Yet another Intel 8080 Emulator. It passes the TST8080, 8080PRE, CPUTEST and 8080EXM tests.
Example for a small loop:
use CPU;
let mut c = CPU new;
c.pc = 0x0100; // sets pc to $100
// Here we create a small machine code program for demo purpose.
// Usually you will rather load an assembled code in memory (see below).
c.bus.write_byte; // MVI A,$0F
c.bus.write_byte;
c.bus.write_byte; // DCR A
c.bus.write_byte; // JNZ $0102
c.bus.write_word;
c.bus.write_byte; // RET
loop
You can load assembled programs from disk to memory:
c.pc = 0x0100; // sets pc to $100
c.bus.load_bin.unwrap; // loads file at address $100
loop
It's easy to create an interrupt request:
c.bus.load_bin.unwrap;
c.inte = false; // we start with interrupts disabled, for the test
c.int = ; // we create an interrupt request : flag set to true
loop
Includes a "cpmloader" which loads and executes basic CP/M programs:
cargo run --release --example cpmloader -- bin/helloworld.bin
The provided source code examples can be assembled with Retro Assembler.
License: MIT