From bb46fae06bc1f4bfe6b9008c643ba316b0385460 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Rativel?= Date: Mon, 21 Nov 2022 13:21:48 +0100 Subject: [PATCH] added some commentaries --- src/machine.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/machine.rs b/src/machine.rs index c71ccd2..1d6a0cb 100644 --- a/src/machine.rs +++ b/src/machine.rs @@ -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){ let mut m = machine; 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) { let mut unsigned_reg1 : u64 = 0;