Article View: comp.sources.hp48
Article #18v06i023: scrn_dc - Viewer Utility v2.0, Part01/01
From: Daniel COHEN-LAROQUE
Date: Tue, 18 Aug 1992 07:42
Date: Tue, 18 Aug 1992 07:42
267 lines
10118 bytes
10118 bytes
Checksum: 3233292952 (verify with brik -cv)
Submitted-by: Daniel COHEN-LAROQUE <COHEN@cmu.unige.ch>
Posting-number: Volume 6, Issue 23
Archive-name: scrn_dc/part01
Supersedes: scrn_dc: Volume 6, Issue 20
BEGIN_DOC scrn.doc
************ SCRN v2.0 bug fixed *******************
Version 1.0 & 1.1 were corrupted : it wasn't possible to do
LASTSTACK when 'scrn' had finished.
The bug has been fixed and Scrn is totally safe to use now.
This version should be the last one, it is shorter & faster
and performs one more function...
*****************************************************
Hi everybody!!
This is my first project written in system RPL. 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 or
even in a library.
** [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 scrolls one lines to left, right, up or down.
Leftshifted Cursors Keys scrolls sixtyfour lines (1 page ) up or down only.
Rightshifted Cursors Keys scrolls to bottom left, right, up or down.
[Enter] Prints a short author message.
[Backspace] Pushs PICT to the stack.(New command from previous versions)
NOTES:
------
**** THIS SOFTWARE IS PROVIDED WITHOUT ANY WARRANTY ****
Modify, copy and distribute it as you want...
Excuse for any mistakes, English isn't my native language.
Hope you'll find usefull, give me comments.
If you have any questions or remarks (specially concerning
RPL code, shortcuts and so on...), mail me to:
email: cohen@cmu.unige.ch Daniel COHEN-LAROQUE
address: Les Pommeraies Swiss Federal Institute
7416 ARCHAMPS Of Technology.
FRANCE
END_DOC
BEGIN_SRC scrn.s
********************************************************
* Program Name: scrn (Screener) *
* Version: 1.2 *
* Description: Allows to "1 ->grob" list,string,grob, *
* prog etc... *
* Date: 13.08.92 *
* Author: Daniel COHEN-LAROQUE *
* e_mail: cohen@cmu.unige.ch *
* address: Les Pommeraies, 74160 ARCHAMPS, FRANCE *
********************************************************
INCLUDE KEYDEFS.H
ASSEMBLE
NIBASC /HPHP48-E/
RPL
:: CK1NOLASTWD ( Change it to CK1 if put in a library )
Clr16 " Formating Stack..." DISPROW1 SetDA1Temp
ONEONE { NULLLAM NULLLAM } BIND ( 2nd nulllam stands for )
DEPTH ( the # of lines to display )
ZERO_DO (DO)
2GETLAM ROLL
DUPTYPECSTR? IT :: DUP THREE 1_#1-SUB$ "RF" EQUAL IT :: ID RFU ; ;
( Calling RF object packer by Lutz Vieweg on Goodies Disk #5 )
DUPTYPEGROB? ITE
::
2GETLAM #1+ ;
::
ZERO 1PUTLAM
DUPTYPECOL? OVER TYPELIST? OR
OVER TYPERRP? OR
IT DECOMP$ ( Allows to see a program, a list, a directory... )
DUPTYPECSTR? ?SKIP DO>STR
BEGIN
1GETLAM #1+ 1PUTLAM
SEP$NL $>grob SWAPDUP NULL$?
UNTIL
DROP
1GETLAM reversym
2GETLAM #+ ;
2PUTLAM
LOOP
RECLAIMDISP
ClrDA1IsStat
ZEROZERO
SIXTYFOUR 131 MAKEGROB
XYGROBDISP
TURNMENUOFF
ZERO 1PUTLAM
2GETLAM
ONE_DO (DO)
DUPGROBDIM DROP #0=ITE
:: DROP SIX ; ( Null string standing for newline --> grob 0x0 )
:: DUPGROBDIM DROP
ZERO 1GETLAM
4ROLL XYGROBDISP ;
1GETLAM #+ 1PUTLAM
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@cmu.unige.ch" &$ FlashWarning ;
kcBackspace ?CaseKeyDef
:: TakeOver ERRBEEP " Pict --> 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 ;
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_SRC
BEGIN_ASC scrn.asc
%%HP: T(1)A(R)F(.);
"D9D202BA81F60E0C2A20D2000020264F627D6164796E6760235471636B6E2E2E
2B5421C20934CA3647A2003D4303D43B21300D470C41303C3707E31652330451
26CB916D9D2088130D004095236C2A2090000256479B30CB916D9D2084E20302
56455B2130B2130CF1268DA16D9D207E316FED30B2130D9D20FEF300E5167E12
62C2306122657B302C2302C12657B30CB91631B5145126A2170880412A1706B3
16FED300E5167A72108F1174726F65508C170442306B316D7ED57E316CBD30B2
1300F51643370CA03113593CF146ADB461192038000F85110B821FC2E4FEF300
E5167E316EC370E97154423098E36D9D2044230B2040B2130D9D20E971544230
FEF306B316BBF060B821B21306B316CBD300E516433707947011920023001192
048300B05914B49408316A5141A51410CA3047A20D6E204054879647B21300D4
7079E60E8E6079E60D9D209FF303D816D9D20D5040B1FF3D9D2088704231D4B2
13099040B1FF3D9D2088704E61D4B2130F8040B1FF3D9D2088704051D4B21303
A040B1FF3D9D2088704C81D4B2130C1B46B1FF3D9D208870418A3079E60D6E20
405487964772D70B21309E040B1FF3D9D20887045E141C2A20D2000026596567
75627022497024416E60234F48454E419136C2A20B20000236F68656E60436D6
57E257E6967656E236863915062983B213011140B1FF3D9D20887045E141C2A2
092000020202020596364702D2D2E30235471636B658B215562175660B2130D4
140BE0262C230F714091D300B536CB916D9D204423021EF3B2130B2130300403
D816D9D20D5040B1FF3D9D2088704ADB46EC370231D443370B213099040B1FF3
D9D2088704ADB46EC370E61D443370B213030040745364423021EF3B2130D004
03D816D9D20D5040B1FF3D9D208870409615B213099040B1FF3D9D2088704EA6
15B2130F8040B1FF3D9D20887045E615B21303A040B1FF3D9D208870430715B2
130D0040745364423021EF3B21308523021EF3B2130DEBB09E5503353679E60D
6E20405487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*S'0``1'-48D
M`Q+^LQ(#6#(@X3\K,="^"^E5,%-CEV[0Y@($17AI=)=N$.T$A8ES-$ZL,$$4
$.2LQ`"LQ
`
end
sum -r/size 30878/1085 section (from "begin" to "end")
sum -r/size 9234/769 entire input file
END_UU
Technical Details
Message-ID:
<1992Aug18.074206.19754@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@cmu.unige.ch> Subject: v06i023: scrn_dc - Viewer Utility v2.0, Part01/01 Message-ID: <1992Aug18.074206.19754@seq.uncwil.edu> Followup-To: comp.sys.hp48 Sender: spell@seq.uncwil.edu (Chris Spell) Organization: University of Geneva, Switzerland Date: Tue, 18 Aug 1992 07:42:06 GMT Approved: spell@seq.uncwil.edu Lines: 271