From f55879a88b5badd2d13cbcfd6a76aaecd96e95e3 Mon Sep 17 00:00:00 2001 From: kitty Date: Fri, 20 Feb 2026 00:08:59 +1100 Subject: forth-created pad for some reason a separate PAD section wasn't working. this also fixes the 18 digit Issue. there are still issues i need to sort out though. --- jefs.fs | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'jefs.fs') diff --git a/jefs.fs b/jefs.fs index c169242..7575cbf 100644 --- a/jefs.fs +++ b/jefs.fs @@ -40,21 +40,18 @@ decimal \ PNO \ mostly from pforth -\ currently broken if unsigned number has more than 18 digits -\ unfortunately this also seems to include any negative number -\ it continues reading words but a number literal causes a crash +255 allot variable pad variable hld -: <# dap hld ! ; +: <# pad hld ! ; : hold 1 hld -! ( chr ) hld @ c! ; : sign 0< if [ char - ] literal hold then ; : # base @ /mod swap 9 over > if 7 + then [ char 0 ] literal + hold ; \ issue is in here i think? : #s begin # dup 0= until ; -: #> drop hld @ dap over - ; +: #> drop hld @ pad over - ; -: ud. <# #s #> say ; +: ud. <# #s #> say space ; : t ." testtesttesttest" cr ; -bye -\ 100000000000000000 ud. bye +10000000000000000000 ud. 5 bye \ t testing bye -- cgit v1.2.3