From aa1246ef45785dad80807af4c654bb0c49b71679 Mon Sep 17 00:00:00 2001 From: Koichi Nakamura Date: Thu, 31 Dec 2020 08:09:22 +0900 Subject: [PATCH] Add "a" and "A" --- core.fs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/core.fs b/core.fs index 8d8b11e..8f8e453 100644 --- a/core.fs +++ b/core.fs @@ -194,5 +194,16 @@ l! \ Store byte 'c' to here and increment it cB i, 'h, '@, '$, 'h, 'L, k1k0-, '+, 'h, '!, 'e, l! -kA kB B t +\ 'a' ( c-addr -- a-addr ) ALIGNED +\ Round up 'a' to a multiple of CELL +ca i, + 'L, Ck1k0--, '+, \ ( a+CELL-1 ) + 'L, Ck1k0-- k0k1- ^, \ ( a+CELL-1 ~(CELL-1) ) + '&, 'e, +l! + +\ 'A' ( -- ) ALIGN +\ Round up 'here' to a multiple of CELL +cA i, 'h, '@, 'a, 'h, '!, 'e, l! + Q