String Display

+first 0 +rest 0
type space $fffffff0 and unpack +first @ + emit
rest unpack if +rest @ + emit rest ; then drop drop ;

done drop drop pop drop ;
norm 0 +first ! 0 +rest ! type ;
cap 48 +first ! 0 +rest ! type ;
caps 48 +first ! 48 +rest ! type ;

select jump rest done done done done done done done done norm cap caps done done done done ;
stype 1 + dup @ dup 15 and select stype ;

Comments

String Display
type w display one 32-bit word of text
done aw drop addr and word and return from stype
select wt handle word according to tag
stype a display contiguous white text