home *** CD-ROM | disk | FTP | other *** search
- \ BOXTEXT.SEQ Some simple boxes around text. by Tom Zimmer
-
- 0 constant tx 0 constant ty
- 0 constant bx 0 constant by
-
- : box ( left top right bottom --- )
- =: by =: bx =: ty =: tx
- tx ty at
- 218 qemit
- bx tx - 1- 0 max 0
- ?do 196 qemit
- loop 191 qemit
- tx by at
- 192 qemit
- bx tx - 1- 0 max 0
- ?do 196 qemit
- loop 217 qemit
- by ty 1+
- ?do tx i at 179 qemit
- bx i at 179 qemit
- loop ;
-
- : (.box) ( x y --- )
- r> dup 2+ >r x@
- >r over r@ c@ + 3 + over 2+ box
- tx 1+ ty 1+ at bl qemit r> count type bl qemit
- bx by 1+ at ;
-
- : .box" ( x y text --- )
- compile (.box) here x, ," ; immediate
-
-
- \s
- : boxsample ( --- )
- 20 2
- do i 2* i .box" Ziping along!"
- loop
- 10 10 .box" hello this is a sample of BOXED TEXT"
- 20 15 .box" Here is even more text!!" ;
-
- boxsample
-