forked from koniifer/ableos
minor changes and a bug fix
This commit is contained in:
parent
e53a5eb835
commit
4223055c0c
BIN
hbvm/assets/inf_loop.hb
Normal file
BIN
hbvm/assets/inf_loop.hb
Normal file
Binary file not shown.
|
@ -284,8 +284,7 @@ F5-F9 {:016X} {:016X} {:016X} {:016X} {:016X}",
|
|||
panic!("Not a register.")
|
||||
}
|
||||
}
|
||||
|
||||
self.index += 4;
|
||||
self.index += 5;
|
||||
}
|
||||
(2, 2) => {
|
||||
let mut lhs_array = [0; 8];
|
||||
|
|
|
@ -5,25 +5,25 @@ use hbvm::{
|
|||
};
|
||||
|
||||
fn main() -> Result<(), RuntimeErrors> {
|
||||
// TODO: Grab program from cmdline
|
||||
#[rustfmt::skip]
|
||||
let prog: Vec<u8> = vec![
|
||||
// NOP as u8, NOP as u8,
|
||||
// 255, 10,
|
||||
ADD as u8, EightBit as u8, 100, 20, 0xA7,
|
||||
NOP as u8,
|
||||
255, 10,
|
||||
// ADD as u8, EightBit as u8, 100, 20, 0xA7,
|
||||
// ADD as u8,
|
||||
// EightBit as u8, 1, 0, 0xB0,
|
||||
// ADD as u8,
|
||||
// SixtyFourBit as u8,
|
||||
// 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
// 0, 0, 0, 0, 0, 0, 0, 2, 0xD0,
|
||||
// SUB as u8, EightBit as u8, 255, 0, 0xA7,
|
||||
// DIV as u8, EightBit as u8, 12, 5, 0xA8,
|
||||
// ADD as u8, Register8 as u8, 0xA7, 0xB0, 0xA7,
|
||||
SUB as u8, EightBit as u8, 255, 0, 0xA0,
|
||||
// This currently fails because of a lack of register to register addition
|
||||
// ADD as u8, Register8 as u8, 0xA0, 0xA0, 0xA1,
|
||||
// LOAD as u8, AddrToReg as u8,
|
||||
// 0, 0, 0, 0, 0, 0, 0, 2,
|
||||
// 0xA0,
|
||||
// JUMP as u8, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
|
||||
JUMP as u8, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
];
|
||||
|
||||
let mut eng = Engine::new(prog);
|
||||
|
|
Loading…
Reference in a new issue