robert@longs.LANCE.ColoState.Edu (Robert Thompson) (10/12/90)
%%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 uf us wish we had. :-) @ @ Unfortunately, this program is slow (Not *really* slow but slow @ nevertheless) A future version is planed that will be entirely in @ m-code. @ @ Please send any remarks to: @ @ robert@longs.LANCE.ColoState.Edu @ or @ rc943406@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
Jake-S@cup.portal.com (Jake G Schwartz) (10/13/90)
Before anybody endeavors to write the GROB rotate in machine code, one should know that a version already exists in Jim Donnelly's HP48 Programmer's Toolkit. It rotates 90 degrees either clockwise or counterclockwise, and does a full 131 by 64 in about 15 seconds. This one was optimized for space, not speed, according to Jim; he told me that it probably could have been twice as fast but might have been three times the size in order to achieve the speed. I also did a user-code GROB rotate about 6 months ago and found that a full 131 by 64 took over 9 minutes, so I set it aside as an exercise in learning the calculator <grin>.... Jake Schwartz