From 163b9cb735045668e51c044db38a98beddbe93f1 Mon Sep 17 00:00:00 2001 From: rich Date: Fri, 7 Sep 2007 23:40:52 +0000 Subject: [PATCH] Fix the flags to ADDSTORE, SUBSTORE and fix dot-quote so it works again with new defn of ADDSTORE. --- Makefile | 7 +++++++ jonesforth.S | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 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 diff --git a/jonesforth.S b/jonesforth.S index 4277547..9a67b5d 100644 --- a/jonesforth.S +++ b/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 -- 1.8.3.1