From 8ea14c863401f19e602132192e2b8d776669ce5d Mon Sep 17 00:00:00 2001 From: kitty Date: Sat, 21 Feb 2026 01:30:51 +1100 Subject: hex dpy words, .s in forth! --- jefs.fs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'jefs.fs') diff --git a/jefs.fs b/jefs.fs index 2bfbcfb..b5d2cc2 100644 --- a/jefs.fs +++ b/jefs.fs @@ -56,7 +56,6 @@ decimal \ PNO \ mostly from pforth - 255 allot variable pad drop variable hld : <# pad hld ! ; @@ -69,9 +68,20 @@ variable hld : (u.) <# #s #> ; : u. (u.) say space ; : u.r >r (u.) r> over - spaces say ; + : (.) dup abs <# #s swap sign #> ; : . (.) say space ; : .r >r (.) r> over - spaces say ; -\ TODO something is leaking its stack (a word address i think) +: (.byte) hex <# # # #> decimal ; +: .byte (.byte) say space ; +: (.word) hex <# # # # # #> decimal ; +: .word (.word) say space ; +: (.dword) hex <# # # # # # # # # #> decimal ; +: .dword (.dword) say space ; +: (.qword) hex <# # # # # # # # # # # # # # # # # #> decimal ; +: .qword (.qword) say space ; + +: .s sp 8 + ( skip sp itself ) begin dup s0 @ >= while dup @ .qword 8 + repeat drop cr ; + bye -- cgit v1.2.3