From: plugd Date: Sun, 24 Nov 2019 11:18:52 +0000 (+0100) Subject: Fixed some mars instruction handling bugs. X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?a=commitdiff_plain;h=47ac8e0ad3cc6cf75a637c1491059aaede68f4f4;p=jars.git Fixed some mars instruction handling bugs. --- diff --git a/mars.scm b/mars.scm index 9610d10..a9ba7c5 100644 --- a/mars.scm +++ b/mars.scm @@ -262,15 +262,15 @@ ((JMP) (list (core '->addr A-ptr))) ((JMZ) - (list (core '->addr (if (instr-zero? B-ptr modifier #f name) + (list (core '->addr (if (instr-zero? core B-ptr modifier #f name) A-ptr (+ ptr 1))))) ((JMN) - (list (core '->addr (if (not (instr-zero? B-ptr modifier #f name)) + (list (core '->addr (if (not (instr-zero? core B-ptr modifier #f name)) A-ptr (+ ptr 1))))) ((DJN) - (list (core '->addr (if (not (instr-zero? B-ptr modifier #t name)) + (list (core '->addr (if (not (instr-zero? core B-ptr modifier #t name)) A-ptr (+ ptr 1))))) ((SEQ CMP)