Utilities¶
Bin1.fs¶
Prints a 16 bit number with a bit position legend.
\ Program Name: bin1.fs
\ Date: 7 March 2022
\ Copyright 2022 t.porter licensed under the GPL
\ For Mecrisp-Across by Matthias Koch
\ http://mecrisp.sourceforge.net/
\
\ Example.
\ 10 bin1.
\
\ 111111
\ 5432109876543210
\ 0000000000001010 ok
: bin1tl ( -- ) \ print bin1. top legend row
6 0 do
49 emit
loop
;
: bin1bl ( -- ) \ print bin1. bottom legend row
6 0 do
53 i - emit
loop
10 0 do
57 i - emit
loop
;
: bin1. cr cr ( u -- ) \ 1 bit legend - manual use
bin1tl cr
bin1bl cr
bin.
;