aforth

FORTH for Linux x86-64, written in assembly.
git clone git://henryandlizzy.uk/aforth
Log | Files | Refs | README

commit 1c3aedcd0980b4d648669b0bad36e037152ab76c
parent 04eab09660c6b7418822a8d9573194a6c870f6c7
Author: Henry Wilson <m3henry@googlemail.com>
Date:   Mon, 31 Jul 2017 14:44:36 +0100

moved HERE to LAST and added HERE

Diffstat:
Mmain.s | 25+++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/main.s b/main.s @@ -46,7 +46,8 @@ enter: .quad 0 COLD: forthword _cold: do RESETDATA - set HEREVAR dictionaryhead + set LAST dictionaryhead + set HERE dictionaryend escape 0 escape 96 saycr "aFORTH alpha" @@ -209,8 +210,12 @@ verb forth WORD do PAD endword +verb forth LAST + variable + endword + verb forth DICTIONARY - do HERE + get LAST 2: do DUP do fetch const 0 @@ -226,16 +231,8 @@ verb forth DICTIONARY 1: do DROP endword -verb forth HEREVAR - variable - endword - -verb forth HERE - get HEREVAR - endword - verb forth FIND - do HERE + get LAST 2: do dup2 const 8 do plus @@ -257,6 +254,10 @@ verb forth FIND # Compiler +verb forth HERE + variable + endword + verb forth modeI "[" immediate set MODE 0 endword @@ -775,7 +776,7 @@ verb code EXECUTE mov (SP), TOS advance SP jmp *(WP) - +dictionaryend: # "STACK"