From 21eff156a3094c82ad85f8d3658fc1ac79c63da1 Mon Sep 17 00:00:00 2001 From: mryouse Date: Sat, 27 May 2023 01:08:47 +0000 Subject: multiplication --- vm.d | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'vm.d') diff --git a/vm.d b/vm.d index ba7fc50..a865a50 100644 --- a/vm.d +++ b/vm.d @@ -500,6 +500,13 @@ class VM { double anum = asNumber(a); this.pushA(makeNumberValue(anum - bnum)); break; + case OpCode.OP_MULTIPLY: + Value b = this.popA(); + Value a = this.popA(); + double bnum = asNumber(b); + double anum = asNumber(a); + this.pushA(makeNumberValue(anum * bnum)); + break; case OpCode.OP_NOT: Value val = this.popA(); bool bval = asBoolean(val); -- cgit v1.2.3