From: Michael D. Lowis Date: Fri, 11 Apr 2014 00:49:55 +0000 (-0400) Subject: Implemented getting and setting of words X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=1724eedc80a2ba910e86c119c91db3fb21f0b3ed;p=proto%2Fsclpl.git Implemented getting and setting of words --- diff --git a/source/slvm/main.c b/source/slvm/main.c index 3c808e2..c47ddaf 100644 --- a/source/slvm/main.c +++ b/source/slvm/main.c @@ -494,15 +494,22 @@ defcode("bnot", bnot, 0, &bxor){ /* Memory Manipulation Words *****************************************************************************/ defcode("!", store, 0, &bnot){ + *((long*)*(ArgStackPtr)) = *(ArgStackPtr-1); + ArgStackPtr -= 2; } defcode("@", fetch, 0, &store){ + *(ArgStackPtr) = *((long*)*(ArgStackPtr)); } defcode("+!", addstore, 0, &fetch){ + *((long*)*(ArgStackPtr)) += *(ArgStackPtr-1); + ArgStackPtr -= 2; } defcode("-!", substore, 0, &addstore){ + *((long*)*(ArgStackPtr)) -= *(ArgStackPtr-1); + ArgStackPtr -= 2; } defcode("b!", bytestore, 0, &substore){