From 47f19a98300adebaf20cfc763c4cc5ad74b755d2 Mon Sep 17 00:00:00 2001 From: ubq323 Date: Thu, 2 May 2024 23:43:33 +0100 Subject: even more things --- opc_impl.ha | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'opc_impl.ha') diff --git a/opc_impl.ha b/opc_impl.ha index f85be5f..c264ab4 100644 --- a/opc_impl.ha +++ b/opc_impl.ha @@ -80,8 +80,8 @@ fn do_opr(cpu: *cpu, op: u8) void = switch (op) { const y = pop(cpu); push(cpu, x + y); case op::SUB => - const x = pop(cpu); const y = pop(cpu); + const x = pop(cpu); push(cpu, x - y); case op::MUL => // TODO: better handling mul div @@ -89,8 +89,8 @@ fn do_opr(cpu: *cpu, op: u8) void = switch (op) { const y = pop(cpu); push(cpu, x * y); case op::DIV => - const x = pop(cpu); const y = pop(cpu); + const x = pop(cpu); push(cpu, x / y); case op::NEG => push(cpu, - pop(cpu)); -- cgit v1.2.3