From: cohen@cmu.unige.ch
Newsgroups: comp.sys.hp48
Subject: Scrn v1.1 New version
Date: 12 Aug 92 09:55:46 GMT
Organization: University of Geneva, Switzerland

BEGIN_DOC scrn.doc

************ SCRN v1.1 bug fixed *******************      
Version 1.0 was corrupted : it wasn't possible to do
LASTARG and some others commands when scrn had finished.
The bug has been fixed by reading an old mail treating about
the system Rpl command ABND. The only solution I've found
( cf the mail at the end of the DOC ) is to remove ABND from the code.
Has anyone a better way ?  Dan.
*****************************************************
		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 uses 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!!!)


	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!) 
		 ( Modify SCRN.S since I renamed RF with UNZIP ).
	
	[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 etc...

	[4] The size of PICT is set automatically: the lenght is adapted
		 to the one of the stack and the widht is by default #131 unless
		 a bigger grob is encountered.

Commands for scrolling are :
----------------------------

	[ATTN] Exits the program.

	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.
	
	[Eval] Prints a short author message.
	
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.
	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

Mail concerning ABND:
---------------------

Subject: ABND causing System Halt
From: kskalb@immd1.informatik.uni-erlangen.de (Klaus Kalb)
Date: Mon, 27 Jul 1992 15:16:57 GMT

Hello everybody,

I'm encountering strange behaviour of a pure SYSRPL-program I wrote.

It's a largish ParOuterLoop to display data. This POL is surrounded
by code creating a temporay environment with several named LAM's.
These LAMS contain the status information that is read and altered
while the POL is active. Of course there is a ABND to clean this up
at the end of the code.

And here is the problem:
While running from a program, everything works fine.
Assuming that this program is called 'POL', doing
	\<< POL \>> [EVAL]
works as expected. Or running from a key assignment -- OK.

But if the program gets started directly from the commandline by
	POL [ENTER]
it will work fine until leaving. At exit, sometimes a system
halt will occur, sometimes the calc it will hang seemingly indefinitly
until interrupted by ON-C. After that everythings seems to be ok again,
no memory gets corrupted. (I hope...)

The last command getting executed is the final ABND.

The source looks like this:
::
  CK0
  ( ... initialization code ... )
  { LAM foo LAM bar } BIND 
  ( ... pushing data for the POL ... )
  ParOuterLoop
  ( ... clean up the display ... )
  ABND
  ( ... sometimes not reached ...) 
;


If anybody out there has seen this behaviour before or has any idea
whats the reason for that, please reply.

BTW: The program is a read-only browser for databases in RLDX-format.
If you want to see it, ask for it.

Thanx in advance, -KK

---
------------------------------------------------------------------------------
	 Klaus Kalb     | mail :  IMMD1 / Martenstr. 3 / W-8520 Erlangen / Germany 
 Werch ein Illtum  | email:  kskalb@immd1.informatik.uni-erlangen.de   
------------------------------------------------------------------------------
END_DOC

BEGIN_RPL scrn.s
********************************************************
* Program Name: scrn (Screener)                        *
*      Version: 1.00                                   *
*  Description: Allows to "1 ->grob" list,string,grob, *
*               prog etc...                            *
*         Date: 09.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
:: CK1 ( Program put in library, Change it to CK1NoBlame if not in a library )
	Clr16 "  Formating Stack..." DISPROW1 SetDA1Temp
	ONEONE 131 { NULLLAM NULLLAM LAM Width } BIND   ( 2nd nulllam stands for )
	DEPTH                                        ( the # of lines to display )
	ZERO_DO (DO)
		TWO GETLAM ROLL
		DUPTYPECSTR? OVER ONE TWO SUB$ "RF" EQUAL AND IT  ( Calls Lutz Vieweg's RF prog )
			:: ID UNZIP ;   ( Replace UNZIP with your RF version )
		DUPTYPEGROB? ITE
			::
			DUP GROBDIMw 
			LAM Width #MAX
			' LAM Width STO  ( Adjusts the size of PICT with the bigger grob's one )
			2GETLAM #1+ ;
			::
			ZERO 1PUTLAM
			DUPTYPECOL? OVER TYPELIST? OR
			OVER TYPERRP? OR
			OVER TYPEARRY? OR
				IT DECOMP$           ( Allows to see a program or a list )
			DUPTYPECSTR? ?SKIP DO>STR
			BEGIN
				1GETLAM #1+ 1PUTLAM
				SEP$NL SWAPDUP NULL$?
			UNTIL
			DROP 
			1GETLAM reversym 
			2GETLAM #+ ;
		2PUTLAM            
	LOOP
	RECLAIMDISP     
	ClrDA1IsStat   
	ZEROZERO     
	2GETLAM #6* LAM Width MAKEGROB  
	XYGROBDISP    
	TURNMENUOFF   
	2GETLAM  #1-
	ZEROZERO 1PUTLAM
	DO 
		DUPTYPEGROB?  ITE
		:: 
			HARDBUFF ZERO 1GETLAM 
			3PICK 5PICK GROBDIM DROPDUP 
			1GETLAM #+ #1+ 1PUTLAM
			HEIGHTENGROB ;
		:: 
			$>grob 
			HARDBUFF ZERO 1GETLAM 
			DUP SIX #+ 1PUTLAM ;
		GROB!
	LOOP
	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 ;
			kcEval   ?CaseKeyDef
			  :: TakeOver 
				  ERRBEEP
				  " Viewer By Dan COHEN" NEWLINE$&$
				  " cohen@cmu.unige.ch" &$ FlashWarning ;
			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_RPL

BEGIN_ASC scrn.asc
%%HP: T(1)A(R)F(.);
"D9D205AA81F60E0C2A20D2000020264F627D6164796E6760235471636B6E2E2E
2B5421C20934CA36119203800047A2003D4303D43D6E20507596464786B21300
D470C41303C370300405A57052330451262C2309FF303004033750C2A2090000
256479B3064B30CB916D9D2084E205055E4A59405B2130CF1268DA16D9D20881
3040C36D6E205075964647866C42679E60D6E2050759646478672D707E316FED
30B2130D9D20FEF300E5167E1262C2306122657B302C2302C12657B302C23089
12657B30CB91631B5145126A2170880412A1706B316FED300E5167A72174726F
65508C170442306B316D7ED57E316CBD30B21300F51643370CA03113593CF146
7E31619626D6E20507596464786F85110B821FC2E47E316E0E30CF1460E5167F
370CF1268DA16D9D2053621FEF306B316EF116A3216875057A7266B316CBD30F
ED300E5161DD21B2130D9D2008F1153621FEF306B31688130B2040CBD300E516
B2130976114337011920023001192048300B05914B49408316A5141A51410CA3
047A20D6E204054879647B21300D47079E60E8E6079E60D9D209FF303D816D9D
20D5040B1FF3D9D2088704231D4B213099040B1FF3D9D2088704E61D4B2130F8
040B1FF3D9D2088704051D4B21303A040B1FF3D9D2088704C81D4B2130C1B46B
1FF3D9D208870418A3079E60D6E20405487964772D70B213058040B1FF3D9D20
887045E141C2A20D200002659656775627022497024416E60234F48454E41913
6C2A20B20000236F68656E60436D657E257E6967656E236863915062983B2130
D4140BE0262C230F714091D300B536CB916D9D204423021EF3B2130B21303004
03D816D9D20D5040B1FF3D9D2088704ADB46EC370231D443370B213099040B1F
F3D9D2088704ADB46EC370E61D443370B213030040745364423021EF3B2130D0
0403D816D9D20D5040B1FF3D9D208870409615B213099040B1FF3D9D2088704E
A615B2130F8040B1FF3D9D20887045E615B21303A040B1FF3D9D208870430715
B2130D0040745364423021EF3B21308523021EF3B2130DEBB09E5503353679E6
0D6E20405487964779E601DE4058983743E4CA03144193B2130110E"
END_ASC

BEGIN_UU scrn.uue
table
 !"#$%&'()*+,-./0123456789:;<=>?
@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_
begin 644 scrn
M2%!(4#0X+46=+5"J&&_@P*("+0   F+T)M<61I?F=@8R11<VMN;BXK)%$BR0z
M0ZQC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