home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sources / hp48 / 241 < prev    next >
Encoding:
Text File  |  1992-08-12  |  9.1 KB  |  282 lines

  1. Newsgroups: comp.sources.hp48
  2. Path: sparky!uunet!seq!spell
  3. From: Daniel COHEN-LAROQUE <COHEN@cmu.unige.ch>
  4. Subject:  v06i020:  scrn_dc - Viewer utility v1.0, Part01/01
  5. Message-ID: <1992Aug13.015111.963@seq.uncwil.edu>
  6. Followup-To: comp.sys.hp48
  7. Sender: spell@seq.uncwil.edu (Chris Spell)
  8. Organization: University of Geneva, Switzerland
  9. Date: Thu, 13 Aug 1992 01:51:11 GMT
  10. Approved: spell@seq.uncwil.edu
  11. Lines: 273
  12.  
  13. Checksum: 3236579399 (verify with brik -cv)
  14. Submitted-by: Daniel COHEN-LAROQUE <COHEN@cmu.unige.ch>
  15. Posting-number: Volume 6, Issue 20
  16. Archive-name: scrn_dc/part01
  17.  
  18. BEGIN_DOC scrn.doc
  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 and restores the old stack.
  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.  
  87. END_DOC
  88.  
  89. BEGIN_RPL scrn.s
  90. ********************************************************
  91. * Program Name: scrn (Screener)                        *
  92. *      Version: 1.00                                   *
  93. *  Description: Allows to "1 ->grob" list,string,grob, *
  94. *               prog etc...                            *
  95. *         Date: 09.08.92                               *
  96. *       Author: Daniel COHEN-LAROQUE                   *
  97. *       e_mail: cohen@cmu.unige.ch                     *
  98. *      address: Les Pommeraies, 74160 ARCHAMPS, FRANCE *
  99. ********************************************************
  100.  
  101. INCLUDE KEYDEFS.H
  102. ASSEMBLE
  103.     NIBASC   /HPHP48-E/
  104. RPL
  105. :: CK1NoBlame
  106.     Clr16 "  Formating Stack..." DISPROW1 SetDA1Temp
  107.     DEPTH NDUP
  108.     ONEONE 131 { NULLLAM NULLLAM LAM Width } BIND   ( 2nd nulllam stands for )
  109.     DEPTH #2/                                       ( the # of lines to display )
  110.     ZERO_DO (DO)
  111.         TWO GETLAM ROLL
  112.         DUPTYPECSTR? OVER ONE TWO SUB$ "RF" EQUAL AND IT  ( Calls Lutz Vieweg's RF prog )
  113.             :: ID UNZIP ;   ( Replace UNZIP with your RF version )
  114.         DUPTYPEGROB? ITE
  115.             ::
  116.             DUP GROBDIMw 
  117.             LAM Width #MAX
  118.             ' LAM Width STO  ( Adjusts the size of PICT with the bigger grob's one )
  119.             2GETLAM #1+ ;
  120.             ::
  121.             ZERO 1PUTLAM
  122.             DUPTYPECOL? OVER TYPELIST? OR
  123.             OVER TYPERRP? OR
  124.             OVER TYPEARRY? OR
  125.                 IT DECOMP$           ( Allows to see a program or a list )
  126.             DUPTYPECSTR? ?SKIP DO>STR
  127.             BEGIN
  128.                 1GETLAM #1+ 1PUTLAM
  129.                 SEP$NL SWAPDUP NULL$?
  130.             UNTIL
  131.             DROP 
  132.             1GETLAM reversym 
  133.             2GETLAM #+ ;
  134.         2PUTLAM            
  135.     LOOP
  136.  
  137.     RECLAIMDISP     
  138.     ClrDA1IsStat   
  139.     ZEROZERO     
  140.     2GETLAM #6* LAM Width MAKEGROB  
  141.     XYGROBDISP    
  142.     TURNMENUOFF   
  143.     2GETLAM  #1-
  144.     ZEROZERO 1PUTLAM
  145.     DO 
  146.         DUPTYPEGROB?  ITE
  147.         :: 
  148.             HARDBUFF ZERO 1GETLAM 
  149.             3PICK 5PICK GROBDIM DROPDUP 
  150.             1GETLAM #+ #1+ 1PUTLAM
  151.             HEIGHTENGROB ;
  152.         :: 
  153.             $>grob 
  154.             HARDBUFF ZERO 1GETLAM 
  155.             DUP SIX #+ 1PUTLAM ;
  156.         GROB!
  157.     LOOP
  158.     800 900 UNCOERCE2
  159.     %.1 SWAPOVER 
  160.     DOBEEP DOBEEP
  161.     ABND
  162.   
  163.   FALSE  { LAM Exit } BIND  
  164.   ' NOP        
  165.   ' ::         
  166.      kpNoShift #=casedrop
  167.         ::
  168.             kcUpArrow    ?CaseKeyDef
  169.               :: TakeOver SCROLLUP ;
  170.             kcDownArrow  ?CaseKeyDef
  171.               :: TakeOver SCROLLDOWN ;
  172.             kcLeftArrow  ?CaseKeyDef
  173.               :: TakeOver SCROLLLEFT ;
  174.             kcRightArrow ?CaseKeyDef
  175.               :: TakeOver SCROLLRIGHT ;
  176.             kcOn        ?CaseKeyDef
  177.               :: TakeOver
  178.                   TRUE ' LAM Exit STO ;
  179.             kcEval   ?CaseKeyDef
  180.               :: TakeOver 
  181.                   ERRBEEP
  182.                   " Viewer By Dan COHEN" NEWLINE$&$
  183.                   " cohen@cmu.unige.ch" &$ FlashWarning ;
  184.             kcLeftShift OVER#= OVER kcRightShift #= ORNOT IT 
  185.             :: DROP 'DoBadKeyT ;
  186.         ;
  187.      kpLeftShift #=casedrop
  188.         ::
  189.             kcUpArrow   ?CaseKeyDef
  190.                 :: TakeOver SIXTYFOUR ONE_DO (DO) SCROLLUP LOOP ;
  191.             kcDownArrow ?CaseKeyDef
  192.                 :: TakeOver SIXTYFOUR ONE_DO (DO) SCROLLDOWN LOOP ;
  193.             kpLeftShift    #=casedrpfls
  194.             DROP 'DoBadKeyT
  195.         ;
  196.      kpRightShift #=casedrop
  197.         ::
  198.             kcUpArrow    ?CaseKeyDef
  199.               :: TakeOver JUMPTOP ;
  200.             kcDownArrow  ?CaseKeyDef
  201.               :: TakeOver JUMPBOT ;
  202.             kcLeftArrow ?CaseKeyDef
  203.               :: TakeOver JUMPLEFT ;
  204.             kcRightArrow ?CaseKeyDef
  205.               :: TakeOver JUMPRIGHT ;
  206.             kpRightShift    #=casedrpfls     
  207.             DROP 'DoBadKeyT
  208.         ;
  209.      2DROP 'DoBadKeyT
  210.   ;
  211.   TrueTrue    
  212.   NULL{}   
  213.   ONEFALSE     
  214.   ' LAM Exit      
  215.   ' ERRJMP    
  216.   ParOuterLoop  
  217.   TURNMENUON
  218.   RECLAIMDISP     
  219.   ClrDAsOK
  220. ;
  221. END_RPL
  222.  
  223.  
  224. BEGIN_ASC scrn.asc
  225. %%HP: T(1)A(R)F(.);
  226. "D9D20D2951F60E0C2A20D2000020264F627D6164796E6760235471636B6E2E2E
  227. 2B5421C2093C41309D1304CA36119203800047A2003D4303D43D6E2050759646
  228. 4786B21300D470C4130E8E303C370300405A57052330451262C2309FF3030040
  229. 33750C2A2090000256479B3064B30CB916D9D2084E205055E4A59405B2130CF1
  230. 268DA16D9D208813040C36D6E205075964647866C42679E60D6E205075964647
  231. 8672D707E316FED30B2130D9D20FEF300E5167E1262C2306122657B302C2302C
  232. 12657B302C2308912657B30CB91631B5145126A2170880412A1706B316FED300
  233. E5167A72174726F65508C170442306B316D7ED57E316CBD30B21300F51643370
  234. CA03113593CF1467E31619626D6E20507596464786F85110B821FC2E47E316E0
  235. E30CF1460E5167F370CF1268DA16D9D2053621FEF306B316EF116A3216875057
  236. A7266B316CBD30FED300E5161DD21B2130D9D2008F1153621FEF306B31688130
  237. B2040CBD300E516B2130976114337011920023001192048300B05914B4940831
  238. 6A5141A5141794700CA3047A20D6E204054879647B21300D47079E60E8E6079E
  239. 60D9D209FF303D816D9D20D5040B1FF3D9D2088704231D4B213099040B1FF3D9
  240. D2088704E61D4B2130F8040B1FF3D9D2088704051D4B21303A040B1FF3D9D208
  241. 8704C81D4B2130C1B46B1FF3D9D208870418A3079E60D6E20405487964772D70
  242. B213058040B1FF3D9D20887045E141C2A20D2000026596567756270224970244
  243. 16E60234F48454E419136C2A20B20000236F68656E60436D657E257E6967656E
  244. 236863915062983B2130D4140BE0262C230F714091D300B536CB916D9D204423
  245. 021EF3B2130B2130300403D816D9D20D5040B1FF3D9D2088704ADB46EC370231
  246. D443370B213099040B1FF3D9D2088704ADB46EC370E61D443370B21303004074
  247. 5364423021EF3B2130D00403D816D9D20D5040B1FF3D9D208870409615B21309
  248. 9040B1FF3D9D2088704EA615B2130F8040B1FF3D9D20887045E615B21303A040
  249. B1FF3D9D208870430715B2130D0040745364423021EF3B21308523021EF3B213
  250. 0DEBB09E5503353679E60D6E20405487964779E601DE4058983743E4CA031441
  251. 93B213035DE"
  252. END_ASC
  253.  
  254. BYTES: #ED53h 803.5
  255.  
  256. BEGIN_UU scrn.uue
  257. begin 644 scrn
  258. M2%!(4#0X+46=+="2%6_@P*("+0```F+T)M<61I?F=@8R11<VMN;BXK)%$BR0
  259. MPQ0#V3%`K&,1*3`(`'0J`-,T,$W3Y@(%5VED=&@K,0!-!TPQX.@#PW,P``2E
  260. M=5`R`U0A)BP#^3\P``0S5\"B`@D`(&5TN0-&.\";89TM@.0"!55.6DE0*S'`
  261. M'V+8&M;9`H@Q0,!C;2Y0<)5&1H=F3&*7;M#F`@57:61T:"=]<#YA[SVP$@.=
  262. M+?#^`^`5=AYBPC)@(6)U.R`L`\(A5K<#PC*`&6)U.\";81-;015B*G&`"!2B
  263. M<6`[8>\]`%YAIR=Q=&)O58`<!T0R8#MA?=YU/F&\/;`2`_`51C,'K#`14SG\
  264. M078^89$FUN8"!5=I9'1HCQ4!BQ+/XG0^80X^P!]DX!5V/P?\(8:M89TM4&,2
  265. M[S]@.V'^$:8C87@%=7IBMA/&VP/O/0!>8=$ML1(#G2T`^!$U)O'^`[83AA@#
  266. M*T#`VP/@%;82`WD603,'$2D`,@`1*4`X``N504M)@!.F%11:07%)!\`Z0*<"
  267. M;2Y`4(271K<2`]!T<.D&CFYPZ0:=+9#_`],8UMD"74"P\3^=+8!X0#+1M!(#
  268. MF4"P\3^=+8!X0&[1M!(#CT"P\3^=+8!X0%#1M!(#HT"P\3^=+8!X0(S1M!(#
  269. M'$NV\3^=+8!X0($Z<.D&;2Y`4(271G?2!RLQ4`@$&__3V0*(!U0>%"PJT`(`
  270. M(%9I97=E<B!">2!$86X@0T](14Z1,<:B`BL``#+VAE;F!C365N=2YY9V5N8R
  271. MAC89!2:)LQ(#34&P#F+",O`7!!D]`%MCO!G6V0)$,B#A/RLQL!(#`T`PC6&=
  272. M+=`%!!O_T]D"B`>DO63.<R`3331SL!(#F4"P\3^=+8!X0-I+YCP';M%$,P<K
  273. M,3``!$<U1B0#$OZS$@,-0#"-89TMT`4$&__3V0*(!P1I42LQD`D$&__3V0*(
  274. M!^1J42LQ\`@$&__3V0*(!U1N42LQ,`H$&__3V0*(!S1P42LQT``$1S5&)`,2
  275. M_K,2`U@R(.$_*S'0O@OI53!38Y=NT.8"!$5X:727;A#M!(6)<S1.K#!!%#DK
  276. ",0`K
  277. `
  278. end
  279. sum -r/size 15624/1143 section (from "begin" to "end")
  280. sum -r/size 32226/812 entire input file
  281. END_UU
  282.