summaryrefslogtreecommitdiff
path: root/jefs.fs
diff options
context:
space:
mode:
authorkitty <nepeta@canaglie.net>2026-02-20 00:08:59 +1100
committerkitty <nepeta@canaglie.net>2026-02-20 00:08:59 +1100
commitf55879a88b5badd2d13cbcfd6a76aaecd96e95e3 (patch)
tree5bdc1317ceb1f2f90fddde297f8342e8be6fc654 /jefs.fs
parent9a86ab4600d98040a406d7c2b704ab2d3642eeb6 (diff)
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.
Diffstat (limited to 'jefs.fs')
-rw-r--r--jefs.fs13
1 files changed, 5 insertions, 8 deletions
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