]> git.mdlowis.com Git - proto/sclpl.git/commitdiff
Implemented getting and setting of words
authorMichael D. Lowis <mike@mdlowis.com>
Fri, 11 Apr 2014 00:49:55 +0000 (20:49 -0400)
committerMichael D. Lowis <mike@mdlowis.com>
Fri, 11 Apr 2014 00:49:55 +0000 (20:49 -0400)
source/slvm/main.c

index 3c808e2844a8cab7f34df522155afc83d1665226..c47ddaf50ff100a2263f3c0da72c34f30b49380a 100644 (file)
@@ -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){