Fix the flags to ADDSTORE, SUBSTORE and fix dot-quote so it works again with new...
[jonesforth.git] / jonesforth.S
index e82bd1f..9a67b5d 100644 (file)
@@ -1,4 +1,4 @@
-/* A somewhat minimal FORTH interpreter for Linux / i386 systems. -*- asm -*-
+/* A sometimes minimal FORTH interpreter for Linux / i386 systems. -*- asm -*-
  * By Richard W.M. Jones <rich@annexia.org>
  *
  * gcc -m32 -nostdlib -static -Wl,-Ttext,0 -o jonesforth jonesforth.S
@@ -317,13 +317,13 @@ var_\name :
        push %eax               // push value onto stack
        NEXT
 
-       defcode "+!",2,ADDSTORE
+       defcode "+!",2,,ADDSTORE
        pop %ebx                // address
        pop %eax                // the amount to add
        addl %eax,(%ebx)        // add it
        NEXT
 
-       defcode "-!",2,SUBSTORE
+       defcode "-!",2,,SUBSTORE
        pop %ebx                // address
        pop %eax                // the amount to subtract
        subl %eax,(%ebx)        // add it
@@ -943,7 +943,7 @@ buffer:
                        DUP '\"' <>
                WHILE
                        HERE @ !b       \\ store the character in the compiled image
-                       HERE 1 +!       \\ increment HERE pointer by 1 byte
+                       1 HERE +!       \\ increment HERE pointer by 1 byte
                REPEAT
                DROP            \\ drop the double quote character at the end
                DUP             \\ get the saved address of the length word