# HG changeset patch # User Gauvain "GovanifY" Roussel-Tarbouriech # Date 1565276502 -7200 # Node ID 6b4d2b4054421c13df6a0098db103ea8a79cd8f2 # Parent ec7e888e88f30d2d241c89d9241c3ccc4b8e36f8 More ECL stuff. diff --git a/src/th06/ecl_vm.rs b/src/th06/ecl_vm.rs --- a/src/th06/ecl_vm.rs +++ b/src/th06/ecl_vm.rs @@ -168,9 +168,58 @@ use std::rc::{Rc, Weak}; if self.comparison_reg != 0 Instruction::RelativeJump(); } + // 35 + Instruction::Call(sub, param1, param2) { + // does insane stuff with the stack, not implemented + } + + // 36 + Instruction::Ret(frame, ip) { + // does insane stuff with the stack, not implemented + } + // 37 + Instruction::CallIfSuperior(sub, param1, param2, a, b) { + if(self._getval(b) <= self._getval(a)) { + Instruction::Call(sub, param1, param2); + } + } + // 38 + Instruction::CallIfSuperiorOrEqual(sub, param1, param2, a, b) { + if(self._getval(b) <= self._getval(a)) { + Instruction::Call(sub, param1, param2); + } + } + // 39 + Instruction::CallIfEqual(sub, param1, param2, a, b) { + if(self._getval(b) == self._getval(a)) { + Instruction::Call(sub, param1, param2); + } + } + // 40 + Instruction::CallIfEqual(sub, param1, param2, a, b) { + if(self._getval(b) == self._getval(a)) { + Instruction::Call(sub, param1, param2); + } + } + //41 + Instruction::CallIfInferior(sub, param1, param2, a, b) { + if(self._getval(a) < self._getval(b)) { + Instruction::Call(sub, param1, param2); + } + } + //42 + Instruction::CallIfInferiorOrEqual(sub, param1, param2, a, b) { + if(self._getval(a) <= self._getval(b)) { + Instruction::Call(sub, param1, param2); + } + } + + + +