aforth

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

commit 0d4ead395e15799dffcf96515652701fd56020d6
parent 6db5e43b1d2ed679998cb3490f202a44c35af590
Author: Henry Wilson <m3henry@googlemail.com>
Date:   Thu,  3 Aug 2017 17:26:30 +0100

added ROT and ROLL

Diffstat:
Mstack.s | 19+++++++++++++++++++
1 file changed, 19 insertions(+), 0 deletions(-)

diff --git a/stack.s b/stack.s @@ -49,6 +49,25 @@ verb code OVER pop TOS jmp next +verb code ROT + minstk 3 + mov (SP), ACC + mov TOS, (SP) + mov -8(SP), TOS + mov ACC, -8(SP) + jmp next + +verb code ROLL + minstk 1 + cmp TOS, 0 + je 1f + shl TOS + shl TOS + shl TOS + add SP, TOS + mov (TOS), TOS +1: jmp next + verb code DEPTH mov $stack, ACC sub SP, ACC