\ load from the bashforth prompt by typing include netmask.f \ the last three lines give an example how to use the netmask calculator \ can also be entered interactively, like in \ 192 168 1 0 ip 192 168 1 255 ip netmask . decimal : ip ( n1 n2 n3 n4 -- n ) >r >r swap 8 lshift or 8 lshift r> or 8 lshift r> or ; : netmask ( ip1 ip2 -- mask ) xor 32 0 do dup 2 31 ** and if drop i leave then 2* loop ; 192 168 1 0 ip 192 168 1 255 ip netmask .