diff options
Diffstat (limited to 'opc_impl.ha')
-rw-r--r-- | opc_impl.ha | 4 |
1 files changed, 2 insertions, 2 deletions
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)); |