+INCR = defPrim("1+", () -> begin
+ ensurePSDepth(1)
+ mem[reg.PSP] += 1
+ return NEXT
+end)
+
+DECR = defPrim("1-", () -> begin
+ ensurePSDepth(1)
+ mem[reg.PSP] -= 1
+ return NEXT
+end)
+
+ADD = defPrim("+", () -> begin
+ a = popPS()
+ b = popPS()
+ pushPS(a+b)
+ return NEXT
+end)
+
+SUB = defPrim("-", () -> begin
+ a = popPS()
+ b = popPS()
+ pushPS(b-a)
+ return NEXT
+end)
+
+MUL = defPrim("*", () -> begin
+ a = popPS()
+ b = popPS()
+ pushPS(a*b)
+ return NEXT
+end)
+
+DIVMOD = defPrim("/MOD", () -> begin
+ a = popPS()
+ b = popPS()
+ q,r = divrem(b,a)
+ pushPS(r)
+ pushPS(q)
+ return NEXT
+end)
+