Article View: comp.sources.hp48
Article #40v07i020: scrn.dcl - Viewer Utility v2.1, Part01/01
From: DANIEL COHEN-LAROQUE
Date: Tue, 06 Oct 1992 18:48
Date: Tue, 06 Oct 1992 18:48
296 lines
11290 bytes
11290 bytes
Checksum: 1441182828 (verify with brik -cv)
Submitted-by: DANIEL COHEN-LAROQUE <COHEN_LA@eldi.epfl.ch>
Posting-number: Volume 7, Issue 20
Archive-name: scrn.dcl
BEGIN_DOC scrn.doc
Hi everybody!!
Here is a new verion of SCRN (Viewer Utility). It's an improved
version of an old user RPL program I wrote a few months ago to
visualize objects like strings, lists, programs with the small 3x7 font.
I often use SCRN for several purposes:
- To give a help in a program.
- To get an overview of a program or a biglist.
- To read long strings/grobs (very good for exams!!!)
- To make hardcopies of texts containing grobs with
a program like grob2eps.exe available at seq.
Although the aim of this program can appear obvious,
it performs lots of tasks which would be quite long to write
in user RPL and couldn't reach the speed of system RPL...
[1] Put a program in level 1 and execute 1 ->GROB, then try to
see the graphic object by << PICT STO {} PVIEW >>, you'll be
surprised how big will be the width of the grob!
Moreover, it won't be very pleasant to read it.
SCRN gives you the possibility to scroll a big program or
a list without this drawback.
[2] You can also put a string which contains newlines. SCRN will
decompose the string and allows you to read it without being
compelled to edit it.
Moreover, if the string begins by "RF" it will call
the RF object packer written by Lutz Vieweg (Great Program
if you don't want to use your coins for RamCards!)
Note: RFU must be in the current directory or higher.
[3] SCRN will "grob" all the stack and display it in the same order,
that means you can alternate strings, tagged-objects, grobs,
programs, lists, directories etc...
[4] The size of PICT is set automatically : it is set by default
to #131 x #63 unless a bigger grob or arry must be scrolled.
In this case, PICT is enlarged.
Commands for scrolling are :
----------------------------
[ATTN] Exits the program.( doesn't restore the old stack since
LASTSTACK does it, however check the system flag -55 ).
Unshifted Cursors Keys scroll one lines to left, right, up or down.
Leftshifted Cursors Keys scroll 1 page up, down, left or right.
Rightshifted Cursors Keys scrolls to bottom left, right, up or down.
[Enter] Prints a short author message.
[Backspace] Pushes PICT to the stack.
Changes from previous versions:
-------------------------------
[1] Long strings that exceed 60 characters are truncated. This has been
added because strings containing system rpl code caused too large grobs,
and were eating too much memory. Of course, this is not valid for strings
that include newlines.
[2] Left-shifted key provide left/right scroll.
[3] The speed has been improved, the algorithm is quite different from
the previous ones.
[4] Left and right anunciators are used providing something to see
when the job is quite long. It's amazing how time seems shorter!
NOTES:
------
**** THIS SOFTWARE IS PROVIDED WITHOUT ANY WARRANTY ****
Modify, copy and distribute it as you want as much as the name
of the author is still apparent...
Excuse for any mistakes, English isn't my native language.
Hope you'll find it usefull, if so send me a postcard.
If you have any questions or remarks (specially concerning
RPL code, shortcuts and so on...), mail me to:
--:
Daniel COHEN_LAROQUE Address : Les Pommeraies
74160 ARCHAMPS
Swiss Federal Institute of Technology FRANCE
Communication Sciences Tel (F) : (+33) 50.43.71.67
----><---- Email : cohen_la@eldi.epfl.ch
END_DOC
BEGIN_RPL scrn.s
********************************************************
* Program Name: scrn (Screener) *
* Version: 2.1 *
* Description: Allows to "1 ->grob" list,string,grob, *
* prog etc... *
* Date: 1.10.92 *
* Author: Daniel COHEN-LAROQUE *
* e_mail: cohen_la@eldi.epfl.ch *
* address: Les Pommeraies, 74160 ARCHAMPS, FRANCE *
********************************************************
INCLUDE KEYDEFS.H
ASSEMBLE
NIBASC /HPHP48-E/
RPL
:: CK1NOLASTWD (change it to CK1 if the soft is converted to a library)
Clr16 " Formating Stack" CHR_... >T$ DISPROW1 SetDA1Temp
ONEONE { NULLLAM NULLLAM } BIND
DEPTH
ZERO_DO (DO)
INDEX@ TWO #/ DROP #0=ITE SetLeftAnn SetRightAnn
1GETLAM ROLL
DUPTYPECSTR? IT
:: DUP THREE 1_#1-SUB$ "RF" EQUAL ITE
:: ID RFU ;
:: DUP NEWLINE$ ONE POS$ #0= IT
::
NULL$
BEGIN
OVER SIXTYONE 1_#1-SUB$ NEWLINE$&$ &$SWAP
SIXTYONE OVERLEN$ SUB$SWAP
OVERLEN$ SIXTY #<
UNTIL SWAP&$
;
;
;
DUPTYPEGROB? ITE
:: 1GETLAM #1+ ;
::
ZERO 2PUTLAM
DUPTYPECSTR? ?SKIP DECOMP$
BEGIN
2GETLAM#1+2PUTLAM
SEP$NL $>grob SWAPDUP NULL$?
UNTIL
DROP
2GETLAM reversym 1GETLAM #+
;
ClrRightAnn ClrLeftAnn
1PUTLAM
LOOP
RECLAIMDISP
ClrDA1IsStat
ZEROZERO
SIXTYFOUR 131 MAKEGROB
XYGROBDISP
TURNMENUOFF
ZERO 1PUTLAM
DEPTH
#1+_ONE_DO (DO)
INDEX@ TWO #/ DROP #0=ITE SetLeftAnn SetRightAnn
DUPGROBDIM DROP #0=ITE
:: DROP SIX ; ( Null string standing for newline --> grob 0x0 )
:: DUPGROBDIM DROP
ZERO 1GETLAM
4ROLL XYGROBDISP ;
1GETLAM #+ 1PUTLAM
ClrRightAnn ClrLeftAnn
LOOP ABND
800 900 UNCOERCE2 %.1 SWAPOVER DOBEEP DOBEEP
FALSE { LAM Exit } BIND
' NOP
' ::
kpNoShift #=casedrop
::
kcUpArrow ?CaseKeyDef
:: TakeOver SCROLLUP ;
kcDownArrow ?CaseKeyDef
:: TakeOver SCROLLDOWN ;
kcLeftArrow ?CaseKeyDef
:: TakeOver SCROLLLEFT ;
kcRightArrow ?CaseKeyDef
:: TakeOver SCROLLRIGHT ;
kcOn ?CaseKeyDef
:: TakeOver
TRUE ' LAM Exit STO ;
kcEnter ?CaseKeyDef
:: TakeOver ERRBEEP
"Viewer By Dan COHEN" NEWLINE$&$
"cohen_la@eldi.epfl.ch" &$ FlashWarning ;
kcBackspace ?CaseKeyDef
:: TakeOver ERRBEEP " Pict " CHR_-> >T$ " Stack" &$ FlashMsg
ABUFF TOTEMPOB ;
kcLeftShift OVER#= OVER kcRightShift #= ORNOT IT
:: DROP 'DoBadKeyT ;
;
kpLeftShift #=casedrop
::
kcUpArrow ?CaseKeyDef
:: TakeOver SIXTYFOUR ONE_DO (DO) SCROLLUP LOOP ;
kcDownArrow ?CaseKeyDef
:: TakeOver SIXTYFOUR ONE_DO (DO) SCROLLDOWN LOOP ;
kcLeftArrow ?CaseKeyDef
:: TakeOver 132 ONE_DO (DO) SCROLLLEFT LOOP ;
kcRightArrow ?CaseKeyDef
:: TakeOver 132 ONE_DO (DO) SCROLLRIGHT LOOP ;
kpLeftShift #=casedrpfls
DROP 'DoBadKeyT
;
kpRightShift #=casedrop
::
kcUpArrow ?CaseKeyDef
:: TakeOver JUMPTOP ;
kcDownArrow ?CaseKeyDef
:: TakeOver JUMPBOT ;
kcLeftArrow ?CaseKeyDef
:: TakeOver JUMPLEFT ;
kcRightArrow ?CaseKeyDef
:: TakeOver JUMPRIGHT ;
kpRightShift #=casedrpfls
DROP 'DoBadKeyT
;
2DROP 'DoBadKeyT
;
TrueTrue
NULL{}
ONEFALSE
' LAM Exit
' ERRJMP
ParOuterLoop
TURNMENUON
RECLAIMDISP
ClrDAsOK
;
END_RPL
BEGIN_ASC scrn.asc
%%HP: T(3)A(R)F(.);
"D9D202BA81F60E0C2A2072000020264F627D6164796E6760235471636B652456
EE250B5421C20934CA3647A2003D4303D43B21300D470C41303C370122703004
07FE304423098E3616311743116B3165233045126CB916D9D2088130D0040952
36C2A2090000256479B308DA16D9D2084E2030256455B2130D9D208813083256
9FF301B5466AC30CB916D9D20FD5502A1702C230CBB469523619136A6F36CBB4
622650D6D26226502BB464EC308C170FE226B2130B2130B2130CF1268DA16D9D
206B316FED30B2130D9D20FEF300F51645126A217031B512A170B7B347A72108
F1174726F65508C170442307E316D7ED56B316CBD30B213045311E63110E5164
3370CA03113593CF146ADB461192038000F85110B821FC2E4FEF300E516C4130
BD37012270300407FE304423098E361631174311E97154423098E36D9D204423
0B2040B2130D9D20E971544230FEF306B316BBF060B821B21306B316CBD300E5
1645311E6311433707947011920023001192048300B05914B49408316A5141A5
1410CA3047A20D6E204054879647B21300D47079E60E8E6079E60D9D209FF303
D816D9D20D5040B1FF3D9D2088704231D4B213099040B1FF3D9D2088704E61D4
B2130F8040B1FF3D9D2088704051D4B21303A040B1FF3D9D2088704C81D4B213
0C1B46B1FF3D9D208870418A3079E60D6E20405487964772D70B21309E040B1F
F3D9D20887045E141C2A20B2000659656775627022497024416E60234F48454E
419136C2A20F200036F68656E6F5C6160456C64696E2560766C6E23686391506
2983B213011140B1FF3D9D20887045E141C2A207100002020202059636470293
656EE250C2A20110000235471636B63915058B215562175660B2130D4140BE02
62C230F714091D300B536CB916D9D204423021EF3B2130B2130300403D816D9D
20D5040B1FF3D9D2088704ADB46EC370231D443370B213099040B1FF3D9D2088
704ADB46EC370E61D443370B2130F8040B1FF3D9D20887041192048000EC3700
51D443370B21303A040B1FF3D9D20887041192048000EC370C81D443370B2130
30040745364423021EF3B2130D00403D816D9D20D5040B1FF3D9D20887040961
5B213099040B1FF3D9D2088704EA615B2130F8040B1FF3D9D20887045E615B21
303A040B1FF3D9D208870430715B2130D0040745364423021EF3B21308523021
EF3B2130DEBB09E5503353679E60D6E20405487964779E601DE4058983743E4C
A03144193B2130CA56"
END_ASC
BYTES: #65ACh 903
BEGIN_UU scrn.uue
begin 644 scrn
M2%!(4#0X+46=+2"K&&_@P*(")P```F+T)M<61I?F=@8R11<VME9"9>Y2L$42
M+)!#K&-T*@#3-#!-LQ(#T'3`%`/#<Q`B!P-`<.\#1#*0Z&-A$W$T$;835C(#
M5"'&FV&=+8`8`PU`D"5C+"J0``!21I<[@*UAG2V`Y`(#4D95*S'0V0*(,8`C
M9?D_$%MDICS`FV&=+?!=!:)Q("P#O$N6)6.1,:;V8[Q+)F(%;2TF8@6R2T;.
M`\AQ\"YB*S&P$@,K,<`?8M@:UMD"MA/VW@,K,=#9`N\_`%]A5"&F$@<36R$:
M!WL[='H2@!]Q=&)O58`<!T0R<#YA?=YE.V&\/;`2`U03X381X!5&,P>L,!%3
M.?Q!IKUD$2DP"`"/%0&+$L_B]/X#X!7&%`/;<Q`B!P-`<.\#1#*0Z&-A$W$T
M$9X7120#B3[6V0)$,K`"!"LQT-D"GA=%)`/O/V`[8;L/!HL2*S%@.V&\/0!>
M8503X381-'-P20<1*0`R`!$I0#@`"Y5!2TF`$Z85%%I!`:P#="K0Y@($17AI
M="LQ`$T'EV[@Z`:7;M#9`OD_,(UAG2W0!00;_]/9`H@')!--*S&0"00;_]/9
M`H@'Y!9-*S'P"`0;_]/9`H@'!!5-*S$P"@0;_]/9`H@'Q!A-*S'`L60;_]/9
M`H@'%*@#EV[0Y@($17AI="=]L!(#Z4"P\3^=+8!X0.5!P:("*P!@E59V5R8'
M(I0'0A3F!C+TA%3D%!EC+"KP`@!C;VAE;E]L84!E;&1I+F5P9FPN8VB346"2
M."LQ$!$$&__3V0*(!U0>%"PJ<`$`("`@(%!I8W0@.5;F+@4L*A`!`"!3=&%C
M:Y-14+@2529Q908K,=`4!.L@)BP#?T&0T0.P-<:;89TM0"0#$OZS$@,K,3``
M!-,8UMD"74"P\3^=+8!X0-I+YCP',M%$,P<K,9`)!!O_T]D"B`>DO63.<^`6
M331SL!(#CT"P\3^=+8!X0!$I0`@`SG,`%4TT<[`2`Z-`L/$_G2V`>$`1*4`(
M`,YSP!A--'.P$@,#0'!48T0R(.$_*S'0``33&-;9`EU`L/$_G2V`>$"0%K42
M`YE`L/$_G2V`>$"N%K42`X]`L/$_G2V`>$#E%K42`Z-`L/$_G2V`>$`#%[42
M`PU`<%1C1#(@X3\K,8`E`Q+^LQ(#[;N07@4S-7;I!FTN0%"$ET9WZ0;13E"8
+.$?CQ`H31)&S$@.S
`
end
sum -r/size 32936/1279 section (from "begin" to "end")
sum -r/size 7885/911 entire input file
END_UU
Technical Details
Message-ID:
<1992Oct6.184829.13236@seq.uncwil.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!seq!spellShow Full Headers
Complete Article Headers
Newsgroups: comp.sources.hp48 Path: arc1-ca.pugleaf.net!sparky!uunet!seq!spell From: DANIEL COHEN-LAROQUE <COHEN_LA@eldi.epfl.ch> Subject: v07i020: scrn.dcl - Viewer Utility v2.1, Part01/01 Message-ID: <1992Oct6.184829.13236@seq.uncwil.edu> Followup-To: comp.sys.hp48 Sender: spell@seq.uncwil.edu (Chris Spell) Organization: Univ. of North Carolina @ Wilmington Date: Tue, 6 Oct 1992 18:48:29 GMT Approved: spell@seq.uncwil.edu Lines: 300