.; Submission for DECUS Fall 1985 Symposium RSX SIG Tape .; J. I. Shultz/ USDA, Nutrient Composition Laboratory .; Beltsville, MD 20705 .; November 18, 1985 .; .; This small command procedure displays a file onto the screen of .; a VT241 (or emulator) in a form very attractive for slides .; or transparancies. .; .enable substitution .disable display .enable decimal .setn nesc 27 .sets esc "'nesc%v'" .sets clear "'esc'"+"[H"+"'esc'"+"[2J" .sets off "'esc'"+"[?25l" .sets on "'esc'"+"[?25h" .sets upper "'esc'"+"#6"+"'esc'"+"#3" .sets lower "'esc'"+"#6"+"'esc'"+"#4" .sets pad " " .sets box "" .if p1 <> "" .sets file p1 .if p1 = "" .asks file File Name to project : .testfile 'file' .if = 1 .goto cont .open ti: .enable data ERROR -- Cannot find file to project .disable data .close ti: .exit .cont: .ask mode Use double-height and double-width characters? : .ift mode .setn maxln 12 .iff mode .setn maxln 23 .ift mode .setn maxwd 38 .iff mode .setn maxwd 76 .ask hcntr Auto-center each line horizontally? : .ask boxit Draw a box around text? : .ift boxit .sets box1 "'esc'"+"Ppp[0,0]v[799,0]p[799,0]v[799,479]p[799,479]" .ift boxit .sets box2 "v[0,479]p[0,479]v[0,0]p[0,0]"+"'esc'"+"\"+"'esc'"+"[2A" .ift boxit .sets box box1+box2 .open ti: .data 'clear' .data BACKGROUND COLOR .data ================ .data .data Dark = D Blue = B Red = R Green = G .data .data Cyan = C Magenta = M Yellow = Y White = W .data .close ti: .asks back Enter Background Color: .sets back back[1:1] .if back = "" .sets back "D" .open ti: .data 'clear' .data TEXT COLOR .data ========== .data .data Dark = D Blue = B Red = R Green = G .data .data Cyan = C Magenta = M Yellow = Y White = W .data .close ti: .asks text Enter Text Color: .sets text text[1:1] .if text = "" .sets text "G" .open ti: .data 'esc'PpS(M0('back'),M1(B),M2(R),M3('TEXT'))'esc'\ .close ti: .openr #1 'file' .setn count 0 .loop: .read #1 line .iff .inc count .test line .iff .if count > maxln .goto tubig .iff .if > maxwd .goto tubig .iff .goto loop .close #1 .ift mode .setn down 11-count .iff mode .setn down (23-count)/2 .open #2 ti: .data #2 'off' .data #2 'clear' .setn downc 0 .dloop: .data #2 .inc downc .if downc < down .goto dloop .openr #1 'file' .rloop: .read #1 line .ift hcntr .test line .ift hcntr .iff mode .sets line pad[1:80-/2]+line .ift hcntr .ift mode .sets line pad[1:40-/2]+line .ift .goto prmt .iff mode .data #2 'line' .ift mode .data #2 'upper''line' .ift mode .data #2 'lower''line' .goto rloop .prmt: .close #1 .ift boxit .data #2 'box' .asks dummy .data #2 'on' .data #2 'clear' .data #2 'esc'PpS(M0(D),M1(B),M2(R),M3(G))'esc'\ .close #2 .EXIT .tubig: .close #1 ; TOO MANY LINES IN FILE OR LINES TOO LONG ; TO PROJECT ON SINGLE SCREEN. TRY AGAIN. .exit