added some commentaries

This commit is contained in:
Rémi Rativel 2022-11-21 13:21:48 +01:00
parent 233d928b6f
commit bb46fae06b

View File

@ -37,6 +37,11 @@ impl Machine {
} }
} }
/*
execute the instructions table of a machine putted in param
@param machine which contains a table of instructions
*/
pub fn run(machine : Machine){ pub fn run(machine : Machine){
let mut m = machine; let mut m = machine;
loop{ loop{
@ -44,6 +49,10 @@ impl Machine {
} }
} }
/*
execute the current instruction
@param machine which contains a table of instructions and a pc to the actual instruction
*/
pub fn one_instruction(machine :&mut Machine) { pub fn one_instruction(machine :&mut Machine) {
let mut unsigned_reg1 : u64 = 0; let mut unsigned_reg1 : u64 = 0;