You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
alee-forth/forth/tools.fth

14 lines
479 B
Forth

: .s depth dup 0 ?do dup i - pick . loop drop ;
: ? @ . ;
: dump hex 0 do i cells over + @ s>d <# # # # # bl hold #> type loop
drop decimal ;
: words _latest @ begin
dup @ dup 31 &
2 pick cell+ \ lt l len ws
2 pick 7 >> 1023 < if \ lt l len ws
rot 7 >> else \ lt len ws adv
>r cell+ rot drop r> @ then
-rot swap type space \ lt adv
over _begin <> while - repeat 2drop ;