commit de7b46c7ee932e379dd607992f559c6b06c8e69a Author: Lars Skovlund Date: Sun Sep 17 03:41:33 2023 +0200 Put the PMachine prev register in memory diff --git a/EXT/OPCODES.S b/EXT/OPCODES.S index e95361f..fc9a2cc 100644 --- a/EXT/OPCODES.S +++ b/EXT/OPCODES.S @@ -484,6 +484,7 @@ OP_bnot: Comp macro cond mov cx, acc + mov prev, cx cmp cx, [bp] if ($-True1+1) LT 127 j&cond True1 @@ -874,8 +875,8 @@ OP_self_TWO: OP_pprev: -;Push previous value of _acc on the stack. This is left in the cx after -;a comparison. +;Push previous value of _acc on the stack. + mov cx, prev ppush cx NextOpCode diff --git a/EXT/PMACHINE.I b/EXT/PMACHINE.I index 8b9e7b9..36bbab9 100644 --- a/EXT/PMACHINE.I +++ b/EXT/PMACHINE.I @@ -67,6 +67,7 @@ externdef theGame:ObjPtr externdef ip:memptr externdef pmsp:wordPtr externdef acc:word +externdef prev:word externdef pStack:wordPtr externdef pStackEnd:wordPtr externdef theVars:wordPtr diff --git a/EXT/SAVEVARS.S b/EXT/SAVEVARS.S index 667b53b..54c950b 100644 --- a/EXT/SAVEVARS.S +++ b/EXT/SAVEVARS.S @@ -45,6 +45,7 @@ theMenuBar word ? ip memptr ? pmsp wordPtr ? acc word ? +prev word ? pStack wordPtr ? pStackEnd wordPtr ? theVars label wordPtr