
use dustbox::machine::Machine;

fn exec_simple_loop(c: &mut Criterion) {
    let mut machine = Machine::deterministic();
    let code: Vec<u8> = vec![
        0xB9, 0xFF, 0xFF, // mov cx,0xffff
        0x49,             // dec cx
        0xEB, 0xFA,       // jmp short 0x100
    ];

    machine.load_executable(&code, 0x085F);

    c.bench_function("execute small jmp short loop", move |b| b.iter(|| machine.execute_instruction()));
}