%%HP: T(3)A(R)F(.);
@ ROTATE: This program was written By Robert Craeger and Robert Thompson
@
@
@ In the hopes of being able to print GROBS that were too long to fit into 
@ the 166 dot requirement of the printer, the program below was written.  This
@ program will rotate a GROB and print it vertically on the IR printer that
@ so many of us wish we had. :-)
@
@ Unfortunately, this program is slow (Not *really* slow but slow
@ nevertheless)  A future version is planned that will be entirely in
@ m-code.  (6/21/91: sorry haven't had the time to learn M-CODE :-(  )
@
@ [Note: Owners of Jim Donnelly's "Tool Library" can use its ROTATE function,
@  written in machine language, instead of this program.  -jkh-]
@
@ Please send any remarks to:
@
@                robert at longs.LANCE.ColoState.Edu
@                               or
@                rc943406 at longs.LANCE.ColoState.Edu
@
@ REMARKS:
@               Remember to set the appropriate modes on your 48 when using
@       the old printer.  OLDPRT SHOULD NOT BE ENABLED! for the old printer
@
@ PSEUDOBENCHMARK:
@               This program takes approximatly 1.5 Minutes on a 50x63 GROB
@
@ BUGS:
@               This program needs an inane amount of memory to run!

DIR
  ROTATE
    \<< HEX STRIP
OVER 2 / FLOOR 83 -
NEG 27 CHR 4 PICK 3
PICK + CHR + SWAP 1
SWAP
      START 0 CHR +
      NEXT \-> x y
str pad
      \<< 8 STWS 0 x
8 / FLOOR 1 -
        FOR h h 2 *
1 + \-> cnst
          \<< pad y 1
- 0
            FOR i
"#" str i x * 4 /
cnst + DUP 1 + SUB
+ STR\-> RR RR RR RR
B\->R CHR + -1
            STEP PR1
          \>> DROP
        NEXT
      \>>
    \>>
  STRIP
    \<< DUP SIZE B\->R
SWAP B\->R 8 / CEIL 8
* SWAP ROT \->STR 1 3
      START DUP " "
POS 1 + OVER SIZE
SUB
      NEXT
    \>>
END
