aforth

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

commit e2d4168719834992a24f81e4ff5769c7c105eb9a
parent dfc4515c66494c95b7fbc574c530d0fc6ca8fe6d
Author: Henry Wilson <m3henry@googlemail.com>
Date:   Thu, 15 Jun 2017 23:38:43 +0100

even better string macro

Diffstat:
Mmain.s | 11++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/main.s b/main.s @@ -11,10 +11,11 @@ .quad \val .endm -.macro string length data +.macro string data .quad dostr - .quad \length - .ascii "\data\()" + .quad 2f - 1f +1: .ascii "\data\()" +2: .endm .macro while label @@ -35,7 +36,7 @@ quit: forthword const 4 .quad flag .quad cr - string 13 "Hello, World!" + string "Hello, World!" .quad print .quad cr .quad halt @@ -65,7 +66,7 @@ star: forthword endword cr: forthword - string 2 "\n\r" + string "\n\r" .quad print endword