aforth

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

commit 8663bab9edf56d98ecf11482185835e9b73dca72
parent c28f5c6eb87fc94c4bd607d00abb49b3e3077acd
Author: Henry Wilson <m3henry@googlemail.com>
Date:   Fri, 16 Jun 2017 19:19:19 +0100

execute

Diffstat:
Mmain.s | 16+++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/main.s b/main.s @@ -51,7 +51,8 @@ quit: forthword const 10 const 4 do flag - do greet + const greet + do execute do dottest do halt @@ -234,11 +235,6 @@ dountil: codeword sub (IP), IP jmp _drop -execute: codeword - mov TOS, IP - advanceIP - jmp _drop - # Memory management at: codeword @@ -371,13 +367,19 @@ exit: codeword pop IP jmp next +execute: codeword + mov TOS, WP + mov (SP), TOS + sub $8, SP + jmp next2 + .text _start: mov $stack, SP mov $_cold, IP next: mov (IP), WP - advanceIP +next2: advanceIP jmp *(WP) enter: