commit 1be9024

Devine Lu Linvega  ·  2023-05-02 21:51:51 +0000 UTC
parent 09681a5
Removed NIPk/POPk special cases once and for all(?)
1 files changed,  +4, -4
+4, -4
 1@@ -61,10 +61,10 @@ uxn_eval(Uxn *u, Uint16 pc)
 2 			/* ALU */
 3 			case 0x01: /* INC  */ t=T;            SET(1, 0) PUT(0, t + 1) break;
 4 			case 0x21:            t=T2;           SET(2, 0) PUT2(0, t + 1) break;
 5-			case 0x02: /* POP  */                 SET(1,-1) if(k) PUT(0, 0) break;
 6-			case 0x22:                            SET(2,-2) if(k) PUT2(0, 0) break;
 7-			case 0x03: /* NIP  */ t=T;            SET(2,-1) PUT(0, t) if(k) PUT(1, 0) break;
 8-			case 0x23:            t=T2;           SET(4,-2) PUT2(0, t) if(k) PUT2(2, 0) break;
 9+			case 0x02: /* POP  */                 SET(1,-1) break;
10+			case 0x22:                            SET(2,-2) break;
11+			case 0x03: /* NIP  */ t=T;            SET(2,-1) PUT(0, t) break;
12+			case 0x23:            t=T2;           SET(4,-2) PUT2(0, t) break;
13 			case 0x04: /* SWP  */ t=T;n=N;        SET(2, 0) PUT(0, n) PUT(1, t) break;
14 			case 0x24:            t=T2;n=N2;      SET(4, 0) PUT2(0, n) PUT2(2, t) break;
15 			case 0x05: /* ROT  */ t=T;n=N;l=L;    SET(3, 0) PUT(0, l) PUT(1, t) PUT(2, n) break;