diff options
| author | kitty <nepeta@canaglie.net> | 2026-02-20 00:08:59 +1100 |
|---|---|---|
| committer | kitty <nepeta@canaglie.net> | 2026-02-20 00:08:59 +1100 |
| commit | f55879a88b5badd2d13cbcfd6a76aaecd96e95e3 (patch) | |
| tree | 5bdc1317ceb1f2f90fddde297f8342e8be6fc654 /jefs.fs | |
| parent | 9a86ab4600d98040a406d7c2b704ab2d3642eeb6 (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.fs | 13 |
1 files changed, 5 insertions, 8 deletions
@@ -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 |
