Fix the flags to ADDSTORE, SUBSTORE and fix dot-quote so it works again with new...
authorrich <rich>
Fri, 7 Sep 2007 23:40:52 +0000 (23:40 +0000)
committerrich <rich>
Fri, 7 Sep 2007 23:40:52 +0000 (23:40 +0000)
Makefile [new file with mode: 0644]
jonesforth.S

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..9385631
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,7 @@
+# $Id: Makefile,v 1.1 2007-09-07 23:40:52 rich Exp $
+
+all:
+       gcc -m32 -nostdlib -static -Wl,-Ttext,0 -o jonesforth jonesforth.S
+
+run:
+       ./jonesforth
\ No newline at end of file
index 4277547..9a67b5d 100644 (file)
@@ -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