home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / hp48 / 4242 < prev    next >
Encoding:
Internet Message Format  |  1992-08-12  |  11.1 KB

  1. Path: sparky!uunet!sun-barr!cs.utexas.edu!swrinde!mips!darwin.sura.net!Sirius.dfn.de!chx400!ugun2b!ugcmu!cohen
  2. From: cohen@cmu.unige.ch
  3. Newsgroups: comp.sys.hp48
  4. Subject: Scrn v1.1 New version
  5. Message-ID: <1992Aug12.115546.200@cmu.unige.ch>
  6. Date: 12 Aug 92 09:55:46 GMT
  7. Organization: University of Geneva, Switzerland
  8. Lines: 322
  9.  
  10. BEGIN_DOC scrn.doc
  11.  
  12. ************ SCRN v1.1 bug fixed *******************      
  13. Version 1.0 was corrupted : it wasn't possible to do
  14. LASTARG and some others commands when scrn had finished.
  15. The bug has been fixed by reading an old mail treating about
  16. the system Rpl command ABND. The only solution I've found
  17. ( cf the mail at the end of the DOC ) is to remove ABND from the code.
  18. Has anyone a better way ?  Dan.
  19. *****************************************************
  20.         Hi everybody!!
  21.     
  22.     This is my first project written in system RPL. It's an improved
  23. version of an old user RPL program I wrote a few months ago to
  24. visualize objects like strings, lists, programs with the small 3x7 font.
  25.  
  26.     
  27. I often uses SCRN for several purposes:
  28.     - To give a help in a program.
  29.     - To get an overview of a program or a biglist.
  30.     - To read long strings/grobs (very good for exams!!!)
  31.  
  32.  
  33.     Although the aim of this program can appear obvious,
  34. it performs lots of tasks which would be quite long to write
  35. in user RPL and couldn't reach the speed of system RPL...
  36.  
  37.     [1] Put a program in level 1 and execute 1 ->GROB, then try to
  38.          see the graphic object by << PICT STO {} PVIEW >>, you'll be 
  39.          surprised how big will be the width of the grob! 
  40.          Moreover, it won't be very pleasant to read it. 
  41.          
  42.          SCRN gives you the possibility to scroll a big program or 
  43.          a list without this drawback.
  44.  
  45.     [2] You can also put a string which contains newlines. SCRN will
  46.          decompose the string and allows you to read it without being
  47.          compelled to edit it.
  48.          Moreover, if the string begins by "RF" it will call 
  49.          the RF object packer written by Lutz Vieweg (Great Program
  50.          if you don't want to use your coins for RamCards!) 
  51.          ( Modify SCRN.S since I renamed RF with UNZIP ).
  52.     
  53.     [3] SCRN will "grob" all the stack and display it in the same order, 
  54.          that means you can alternate strings, tagged-objects, grobs, 
  55.          programs, lists etc...
  56.  
  57.     [4] The size of PICT is set automatically: the lenght is adapted
  58.          to the one of the stack and the widht is by default #131 unless
  59.          a bigger grob is encountered.
  60.  
  61. Commands for scrolling are :
  62. ----------------------------
  63.  
  64.     [ATTN] Exits the program.
  65.  
  66.     Unshifted Cursors Keys scrolls one lines to left, right, up or down.
  67.     Leftshifted Cursors Keys scrolls sixtyfour lines (1 page ) up or down only.
  68.     Rightshifted Cursors Keys scrolls to bottom left, right, up or down.
  69.     
  70.     [Eval] Prints a short author message.
  71.     
  72. NOTES:
  73. ------
  74.     **** THIS SOFTWARE IS PROVIDED WITHOUT ANY WARRANTY ****
  75.     Modify, copy and distribute it as you want...
  76.  
  77.     Excuse for any mistakes, English isn't my native language.
  78.     If you have any questions or remarks (specially concerning
  79.     RPL code, shortcuts and so on...), mail me to:
  80.  
  81.     email: cohen@cmu.unige.ch        Daniel COHEN-LAROQUE
  82.     address: Les Pommeraies          Swiss Federal Institute
  83.                 7416 ARCHAMPS           Of Technology.
  84.                 FRANCE
  85.  
  86. Mail concerning ABND:
  87. ---------------------
  88.  
  89. Subject: ABND causing System Halt
  90. From: kskalb@immd1.informatik.uni-erlangen.de (Klaus Kalb)
  91. Date: Mon, 27 Jul 1992 15:16:57 GMT
  92.  
  93. Hello everybody,
  94.  
  95. I'm encountering strange behaviour of a pure SYSRPL-program I wrote.
  96.  
  97. It's a largish ParOuterLoop to display data. This POL is surrounded
  98. by code creating a temporay environment with several named LAM's.
  99. These LAMS contain the status information that is read and altered
  100. while the POL is active. Of course there is a ABND to clean this up
  101. at the end of the code.
  102.  
  103. And here is the problem:
  104. While running from a program, everything works fine.
  105. Assuming that this program is called 'POL', doing
  106.     \<< POL \>> [EVAL]
  107. works as expected. Or running from a key assignment -- OK.
  108.  
  109. But if the program gets started directly from the commandline by
  110.     POL [ENTER]
  111. it will work fine until leaving. At exit, sometimes a system
  112. halt will occur, sometimes the calc it will hang seemingly indefinitly
  113. until interrupted by ON-C. After that everythings seems to be ok again,
  114. no memory gets corrupted. (I hope...)
  115.  
  116. The last command getting executed is the final ABND.
  117.  
  118. The source looks like this:
  119. ::
  120.   CK0
  121.   ( ... initialization code ... )
  122.   { LAM foo LAM bar } BIND 
  123.   ( ... pushing data for the POL ... )
  124.   ParOuterLoop
  125.   ( ... clean up the display ... )
  126.   ABND
  127.   ( ... sometimes not reached ...) 
  128. ;
  129.  
  130.  
  131. If anybody out there has seen this behaviour before or has any idea
  132. whats the reason for that, please reply.
  133.  
  134. BTW: The program is a read-only browser for databases in RLDX-format.
  135. If you want to see it, ask for it.
  136.  
  137. Thanx in advance, -KK
  138.  
  139. ---
  140. ------------------------------------------------------------------------------
  141.      Klaus Kalb     | mail :  IMMD1 / Martenstr. 3 / W-8520 Erlangen / Germany 
  142.  Werch ein Illtum  | email:  kskalb@immd1.informatik.uni-erlangen.de   
  143. ------------------------------------------------------------------------------
  144. END_DOC
  145.  
  146. BEGIN_RPL scrn.s
  147. ********************************************************
  148. * Program Name: scrn (Screener)                        *
  149. *      Version: 1.00                                   *
  150. *  Description: Allows to "1 ->grob" list,string,grob, *
  151. *               prog etc...                            *
  152. *         Date: 09.08.92                               *
  153. *       Author: Daniel COHEN-LAROQUE                   *
  154. *       e_mail: cohen@cmu.unige.ch                     *
  155. *      address: Les Pommeraies, 74160 ARCHAMPS, FRANCE *
  156. ********************************************************
  157.  
  158. INCLUDE KEYDEFS.H
  159. ASSEMBLE
  160.     NIBASC   /HPHP48-E/
  161. RPL
  162. :: CK1 ( Program put in library, Change it to CK1NoBlame if not in a library )
  163.     Clr16 "  Formating Stack..." DISPROW1 SetDA1Temp
  164.     ONEONE 131 { NULLLAM NULLLAM LAM Width } BIND   ( 2nd nulllam stands for )
  165.     DEPTH                                        ( the # of lines to display )
  166.     ZERO_DO (DO)
  167.         TWO GETLAM ROLL
  168.         DUPTYPECSTR? OVER ONE TWO SUB$ "RF" EQUAL AND IT  ( Calls Lutz Vieweg's RF prog )
  169.             :: ID UNZIP ;   ( Replace UNZIP with your RF version )
  170.         DUPTYPEGROB? ITE
  171.             ::
  172.             DUP GROBDIMw 
  173.             LAM Width #MAX
  174.             ' LAM Width STO  ( Adjusts the size of PICT with the bigger grob's one )
  175.             2GETLAM #1+ ;
  176.             ::
  177.             ZERO 1PUTLAM
  178.             DUPTYPECOL? OVER TYPELIST? OR
  179.             OVER TYPERRP? OR
  180.             OVER TYPEARRY? OR
  181.                 IT DECOMP$           ( Allows to see a program or a list )
  182.             DUPTYPECSTR? ?SKIP DO>STR
  183.             BEGIN
  184.                 1GETLAM #1+ 1PUTLAM
  185.                 SEP$NL SWAPDUP NULL$?
  186.             UNTIL
  187.             DROP 
  188.             1GETLAM reversym 
  189.             2GETLAM #+ ;
  190.         2PUTLAM            
  191.     LOOP
  192.     RECLAIMDISP     
  193.     ClrDA1IsStat   
  194.     ZEROZERO     
  195.     2GETLAM #6* LAM Width MAKEGROB  
  196.     XYGROBDISP    
  197.     TURNMENUOFF   
  198.     2GETLAM  #1-
  199.     ZEROZERO 1PUTLAM
  200.     DO 
  201.         DUPTYPEGROB?  ITE
  202.         :: 
  203.             HARDBUFF ZERO 1GETLAM 
  204.             3PICK 5PICK GROBDIM DROPDUP 
  205.             1GETLAM #+ #1+ 1PUTLAM
  206.             HEIGHTENGROB ;
  207.         :: 
  208.             $>grob 
  209.             HARDBUFF ZERO 1GETLAM 
  210.             DUP SIX #+ 1PUTLAM ;
  211.         GROB!
  212.     LOOP
  213.     800 900 UNCOERCE2
  214.     %.1 SWAPOVER 
  215.     DOBEEP DOBEEP
  216.   
  217.   FALSE  { LAM Exit } BIND  
  218.   ' NOP        
  219.   ' ::         
  220.      kpNoShift #=casedrop
  221.         ::
  222.             kcUpArrow    ?CaseKeyDef
  223.               :: TakeOver SCROLLUP ;
  224.             kcDownArrow  ?CaseKeyDef
  225.               :: TakeOver SCROLLDOWN ;
  226.             kcLeftArrow  ?CaseKeyDef
  227.               :: TakeOver SCROLLLEFT ;
  228.             kcRightArrow ?CaseKeyDef
  229.               :: TakeOver SCROLLRIGHT ;
  230.             kcOn        ?CaseKeyDef
  231.               :: TakeOver
  232.                   TRUE ' LAM Exit STO ;
  233.             kcEval   ?CaseKeyDef
  234.               :: TakeOver 
  235.                   ERRBEEP
  236.                   " Viewer By Dan COHEN" NEWLINE$&$
  237.                   " cohen@cmu.unige.ch" &$ FlashWarning ;
  238.             kcLeftShift OVER#= OVER kcRightShift #= ORNOT IT 
  239.             :: DROP 'DoBadKeyT ;
  240.         ;
  241.      kpLeftShift #=casedrop
  242.         ::
  243.             kcUpArrow   ?CaseKeyDef
  244.                 :: TakeOver SIXTYFOUR ONE_DO (DO) SCROLLUP LOOP ;
  245.             kcDownArrow ?CaseKeyDef
  246.                 :: TakeOver SIXTYFOUR ONE_DO (DO) SCROLLDOWN LOOP ;
  247.             kpLeftShift    #=casedrpfls
  248.             DROP 'DoBadKeyT
  249.         ;
  250.      kpRightShift #=casedrop
  251.         ::
  252.             kcUpArrow    ?CaseKeyDef
  253.               :: TakeOver JUMPTOP ;
  254.             kcDownArrow  ?CaseKeyDef
  255.               :: TakeOver JUMPBOT ;
  256.             kcLeftArrow ?CaseKeyDef
  257.               :: TakeOver JUMPLEFT ;
  258.             kcRightArrow ?CaseKeyDef
  259.               :: TakeOver JUMPRIGHT ;
  260.             kpRightShift    #=casedrpfls     
  261.             DROP 'DoBadKeyT
  262.         ;
  263.      2DROP 'DoBadKeyT
  264.   ;
  265.   TrueTrue    
  266.   NULL{}   
  267.   ONEFALSE     
  268.   ' LAM Exit      
  269.   ' ERRJMP    
  270.   ParOuterLoop  
  271.   TURNMENUON
  272.   RECLAIMDISP
  273.   ClrDAsOK
  274. ;
  275. END_RPL
  276.  
  277. BEGIN_ASC scrn.asc
  278. %%HP: T(1)A(R)F(.);
  279. "D9D205AA81F60E0C2A20D2000020264F627D6164796E6760235471636B6E2E2E
  280. 2B5421C20934CA36119203800047A2003D4303D43D6E20507596464786B21300
  281. D470C41303C370300405A57052330451262C2309FF303004033750C2A2090000
  282. 256479B3064B30CB916D9D2084E205055E4A59405B2130CF1268DA16D9D20881
  283. 3040C36D6E205075964647866C42679E60D6E2050759646478672D707E316FED
  284. 30B2130D9D20FEF300E5167E1262C2306122657B302C2302C12657B302C23089
  285. 12657B30CB91631B5145126A2170880412A1706B316FED300E5167A72174726F
  286. 65508C170442306B316D7ED57E316CBD30B21300F51643370CA03113593CF146
  287. 7E31619626D6E20507596464786F85110B821FC2E47E316E0E30CF1460E5167F
  288. 370CF1268DA16D9D2053621FEF306B316EF116A3216875057A7266B316CBD30F
  289. ED300E5161DD21B2130D9D2008F1153621FEF306B31688130B2040CBD300E516
  290. B2130976114337011920023001192048300B05914B49408316A5141A51410CA3
  291. 047A20D6E204054879647B21300D47079E60E8E6079E60D9D209FF303D816D9D
  292. 20D5040B1FF3D9D2088704231D4B213099040B1FF3D9D2088704E61D4B2130F8
  293. 040B1FF3D9D2088704051D4B21303A040B1FF3D9D2088704C81D4B2130C1B46B
  294. 1FF3D9D208870418A3079E60D6E20405487964772D70B213058040B1FF3D9D20
  295. 887045E141C2A20D200002659656775627022497024416E60234F48454E41913
  296. 6C2A20B20000236F68656E60436D657E257E6967656E236863915062983B2130
  297. D4140BE0262C230F714091D300B536CB916D9D204423021EF3B2130B21303004
  298. 03D816D9D20D5040B1FF3D9D2088704ADB46EC370231D443370B213099040B1F
  299. F3D9D2088704ADB46EC370E61D443370B213030040745364423021EF3B2130D0
  300. 0403D816D9D20D5040B1FF3D9D208870409615B213099040B1FF3D9D2088704E
  301. A615B2130F8040B1FF3D9D20887045E615B21303A040B1FF3D9D208870430715
  302. B2130D0040745364423021EF3B21308523021EF3B2130DEBB09E5503353679E6
  303. 0D6E20405487964779E601DE4058983743E4CA03144193B2130110E"
  304. END_ASC
  305.  
  306. BEGIN_UU scrn.uue
  307. table
  308.  !"#$%&'()*+,-./0123456789:;<=>?
  309. @ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_
  310. begin 644 scrn
  311. M2%!(4#0X+46=+5"J&&_@P*("+0   F+T)M<61I?F=@8R11<VMN;BXK)%$BR0z
  312. M0ZQC$2DP" !T*@#3-#!-T^8"!5=I9'1H*S$ 30=,,3 \!P- 4%H')3- %6+"y
  313. M,I#_ P- ,',%+"J0  !21I<[8+0#O!G6V0)(+E!0Y:25!+42 _PAAJUAG2V x
  314. M& ,$/-;F @57:61T:,8D=ND&;2Y0<)5&1H=VT@?G$_;> RLQT-D"[S\ 7F'Gw
  315. M(28L Q8B5K<#PC(@'&)U.R L Y@A5K<#O!DVL154(:82!XA (1H'MA/VW@/@v
  316. M%79Z$D<G]E8%R'% ) .V$];G7><3QML#*S$ 7V$T<\ *$S&5PQ]DYQ,6:6)Mu
  317. M+E!PE49&A_98$; H\2Q.YQ/FX /\009>8?=SP!]BV!K6V0(U)O'^ [83YA]At
  318. M.A*&5U"G)V8[8;P]\-X#X!46W1(K,=#9 H ?46,2[S]@.V&(,; "!+P] %YAs
  319. M*S&09Q$T<Q"1 B #$)$"A .P4!FTE 0X85I!H144P#I IP)M+D!0A)=&MQ(#r
  320. MT'1PZ0:.;G#I!ITMD/\#TQC6V0)=0+#Q/YTM@'A ,M&T$@.90+#Q/YTM@'A q
  321. M;M&T$@./0+#Q/YTM@'A 4-&T$@.C0+#Q/YTM@'A C-&T$@,<2[;Q/YTM@'A p
  322. M@3IPZ09M+D!0A)=&=]('*S%0" 0;_]/9 H@'5!X4+"K0 @ @5FEE=V5R($)Yo
  323. M($1A;B!#3TA%3I$QQJ("*P  ,O:&5N8&--96YU+GEG96YC*&-AD%)HFS$@--n
  324. M0; .8L(R\!<$&3T 6V.\&=;9 D0R(.$_*S&P$@,#0#"-89TMT 4$&__3V0*(m
  325. M!Z2]9,YS(!---'.P$@.90+#Q/YTM@'A VDOF/ =NT40S!RLQ,  $1S5&) ,2l
  326. M_K,2 PU ,(UAG2W0!00;_]/9 H@'!&E1*S&0"00;_]/9 H@'Y&I1*S'P" 0;k
  327. M_]/9 H@'5&Y1*S$P"@0;_]/9 H@'-'!1*S'0  1'-48D Q+^LQ(#6#(@X3\Kj
  328. E,="^"^E5,%-CEV[0Y@($17AI=)=N$.T$A8ES-$ZL,$$4.2LQ !(#i
  329.  h
  330. end
  331. END_UU
  332.