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

  1. Newsgroups: comp.sources.hp48
  2. Path: sparky!uunet!seq!spell
  3. From: Daniel COHEN-LAROQUE <COHEN@cmu.unige.ch>
  4. Subject:  v06i023:  scrn_dc - Viewer Utility v2.0, Part01/01
  5. Message-ID: <1992Aug18.074206.19754@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: Tue, 18 Aug 1992 07:42:06 GMT
  10. Approved: spell@seq.uncwil.edu
  11. Lines: 271
  12.  
  13. Checksum: 3233292952 (verify with brik -cv)
  14. Submitted-by: Daniel COHEN-LAROQUE <COHEN@cmu.unige.ch>
  15. Posting-number: Volume 6, Issue 23
  16. Archive-name: scrn_dc/part01
  17. Supersedes: scrn_dc: Volume 6, Issue 20
  18.  
  19. BEGIN_DOC scrn.doc
  20.  
  21. ************ SCRN v2.0 bug fixed *******************      
  22. Version 1.0 & 1.1 were corrupted : it wasn't possible to do
  23. LASTSTACK when 'scrn' had finished.
  24. The bug has been fixed and Scrn is totally safe to use now.
  25. This version should be the last one, it is shorter & faster
  26. and performs one more function...
  27. *****************************************************
  28.         
  29.         Hi everybody!!
  30.     
  31.     This is my first project written in system RPL. It's an improved
  32. version of an old user RPL program I wrote a few months ago to
  33. visualize objects like strings, lists, programs with the small 3x7 font.
  34.  
  35. I often use SCRN for several purposes:
  36.     - To give a help in a program.
  37.     - To get an overview of a program or a biglist.
  38.     - To read long strings/grobs (very good for exams!!!)
  39.     - To make hardcopies of texts containing grobs with
  40.       a program like grob2eps.exe available at seq.
  41.  
  42.     Although the aim of this program can appear obvious,
  43. it performs lots of tasks which would be quite long to write
  44. in user RPL and couldn't reach the speed of system RPL...
  45.  
  46.     [1] Put a program in level 1 and execute 1 ->GROB, then try to
  47.          see the graphic object by << PICT STO {} PVIEW >>, you'll be 
  48.          surprised how big will be the width of the grob! 
  49.          Moreover, it won't be very pleasant to read it. 
  50.          
  51.          SCRN gives you the possibility to scroll a big program or 
  52.          a list without this drawback.
  53.  
  54.     [2] You can also put a string which contains newlines. SCRN will
  55.          decompose the string and allows you to read it without being
  56.          compelled to edit it.
  57.          Moreover, if the string begins by "RF" it will call 
  58.          the RF object packer written by Lutz Vieweg (Great Program
  59.          if you don't want to use your coins for RamCards!) 
  60.          Note: RFU must be in the current directory or higher or
  61.                  even in a library.
  62.     
  63. ** [3] SCRN will "grob" all the stack and display it in the same order, 
  64.          that means you can alternate strings, tagged-objects, grobs, 
  65.          programs, lists, directories etc...
  66.  
  67.     [4] The size of PICT is set automatically : it is set by default
  68.          to #131 x #63 unless a bigger grob or arry must be scrolled.
  69.          In this case, PICT is enlarged.
  70.  
  71. Commands for scrolling are :
  72. ----------------------------
  73.  
  74.     [ATTN] Exits the program.( doesn't restore the old stack since
  75.     LASTSTACK does it, however check the system flag 55 ).
  76.  
  77.     Unshifted Cursors Keys scrolls one lines to left, right, up or down.
  78.     Leftshifted Cursors Keys scrolls sixtyfour lines (1 page ) up or down only.
  79.     Rightshifted Cursors Keys scrolls to bottom left, right, up or down.
  80.     
  81.     [Enter] Prints a short author message.
  82.     [Backspace] Pushs PICT to the stack.(New command from previous versions)
  83.     
  84. NOTES:
  85. ------
  86.     **** THIS SOFTWARE IS PROVIDED WITHOUT ANY WARRANTY ****
  87.     Modify, copy and distribute it as you want...
  88.  
  89.     Excuse for any mistakes, English isn't my native language.
  90.     Hope you'll find usefull, give me comments.
  91.     If you have any questions or remarks (specially concerning
  92.     RPL code, shortcuts and so on...), mail me to:
  93.  
  94.     email: cohen@cmu.unige.ch        Daniel COHEN-LAROQUE
  95.     address: Les Pommeraies          Swiss Federal Institute
  96.                 7416 ARCHAMPS           Of Technology.
  97.                 FRANCE
  98.  
  99. END_DOC
  100.  
  101. BEGIN_SRC scrn.s
  102. ********************************************************
  103. * Program Name: scrn (Screener)                        *
  104. *      Version: 1.2                                    *
  105. *  Description: Allows to "1 ->grob" list,string,grob, *
  106. *               prog etc...                            *
  107. *         Date: 13.08.92                               *
  108. *       Author: Daniel COHEN-LAROQUE                   *
  109. *       e_mail: cohen@cmu.unige.ch                     *
  110. *      address: Les Pommeraies, 74160 ARCHAMPS, FRANCE *
  111. ********************************************************
  112.  
  113. INCLUDE KEYDEFS.H
  114. ASSEMBLE
  115.     NIBASC   /HPHP48-E/
  116. RPL
  117. :: CK1NOLASTWD ( Change it to CK1 if put in a library )
  118.     Clr16 "  Formating Stack..." DISPROW1 SetDA1Temp
  119.     ONEONE { NULLLAM NULLLAM } BIND   ( 2nd nulllam stands for )
  120.     DEPTH                             ( the # of lines to display )
  121.     ZERO_DO (DO)
  122.         2GETLAM ROLL
  123.         DUPTYPECSTR? IT :: DUP THREE 1_#1-SUB$ "RF" EQUAL IT :: ID RFU ; ; 
  124.                 ( Calling RF object packer by Lutz Vieweg on Goodies Disk #5 )
  125.         DUPTYPEGROB? ITE
  126.             ::
  127.             2GETLAM #1+ ;
  128.             ::
  129.             ZERO 1PUTLAM
  130.             DUPTYPECOL? OVER TYPELIST? OR
  131.             OVER TYPERRP? OR 
  132.                 IT DECOMP$    ( Allows to see a program, a list, a directory... )
  133.             DUPTYPECSTR? ?SKIP DO>STR
  134.             BEGIN
  135.                 1GETLAM #1+ 1PUTLAM
  136.                 SEP$NL $>grob SWAPDUP NULL$?
  137.             UNTIL
  138.             DROP 
  139.             1GETLAM reversym 
  140.             2GETLAM #+ ;
  141.         2PUTLAM
  142.     LOOP
  143.     RECLAIMDISP     
  144.     ClrDA1IsStat   
  145.     ZEROZERO     
  146.     SIXTYFOUR 131 MAKEGROB  
  147.     XYGROBDISP    
  148.     TURNMENUOFF   
  149.     ZERO 1PUTLAM
  150.     2GETLAM 
  151.     ONE_DO (DO)
  152.         DUPGROBDIM DROP #0=ITE 
  153.         :: DROP SIX ;  ( Null string standing for newline --> grob 0x0 )
  154.         :: DUPGROBDIM DROP
  155.             ZERO 1GETLAM 
  156.             4ROLL XYGROBDISP ;
  157.         1GETLAM #+ 1PUTLAM
  158.     LOOP ABND 
  159.     800 900 UNCOERCE2
  160.     %.1 SWAPOVER 
  161.     DOBEEP DOBEEP
  162.   FALSE { LAM Exit } BIND  
  163.   ' NOP        
  164.   ' ::         
  165.      kpNoShift #=casedrop
  166.         ::
  167.             kcUpArrow    ?CaseKeyDef
  168.               :: TakeOver SCROLLUP ;
  169.             kcDownArrow  ?CaseKeyDef
  170.               :: TakeOver SCROLLDOWN ;
  171.             kcLeftArrow  ?CaseKeyDef
  172.               :: TakeOver SCROLLLEFT ;
  173.             kcRightArrow ?CaseKeyDef
  174.               :: TakeOver SCROLLRIGHT ;
  175.             kcOn        ?CaseKeyDef
  176.               :: TakeOver
  177.                   TRUE ' LAM Exit STO ;
  178.             kcEnter   ?CaseKeyDef
  179.               :: TakeOver ERRBEEP
  180.                   " Viewer By Dan COHEN" NEWLINE$&$
  181.                   " cohen@cmu.unige.ch" &$ FlashWarning ;
  182.             kcBackspace  ?CaseKeyDef
  183.               :: TakeOver ERRBEEP "    Pict --> Stack" FlashMsg 
  184.                   ABUFF TOTEMPOB ;
  185.             kcLeftShift OVER#= OVER kcRightShift #= ORNOT IT 
  186.             :: DROP 'DoBadKeyT ;
  187.         ;
  188.      kpLeftShift #=casedrop
  189.         ::
  190.             kcUpArrow   ?CaseKeyDef
  191.                 :: TakeOver SIXTYFOUR ONE_DO (DO) SCROLLUP LOOP ;
  192.             kcDownArrow ?CaseKeyDef
  193.                 :: TakeOver SIXTYFOUR ONE_DO (DO) SCROLLDOWN LOOP ;
  194.             kpLeftShift    #=casedrpfls
  195.             DROP 'DoBadKeyT
  196.         ;
  197.      kpRightShift #=casedrop
  198.         ::
  199.             kcUpArrow    ?CaseKeyDef
  200.               :: TakeOver JUMPTOP ;
  201.             kcDownArrow  ?CaseKeyDef
  202.               :: TakeOver JUMPBOT ;
  203.             kcLeftArrow ?CaseKeyDef
  204.               :: TakeOver JUMPLEFT ;
  205.             kcRightArrow ?CaseKeyDef
  206.               :: TakeOver JUMPRIGHT ;
  207.             kpRightShift    #=casedrpfls     
  208.             DROP 'DoBadKeyT
  209.         ;
  210.      2DROP 'DoBadKeyT
  211.   ;
  212.   TrueTrue    
  213.   NULL{}   
  214.   ONEFALSE     
  215.   ' LAM Exit      
  216.   ' ERRJMP    
  217.   ParOuterLoop  
  218.   TURNMENUON
  219.   RECLAIMDISP
  220.   ClrDAsOK
  221. ;
  222. END_SRC
  223.  
  224. BEGIN_ASC scrn.asc
  225. %%HP: T(1)A(R)F(.);
  226. "D9D202BA81F60E0C2A20D2000020264F627D6164796E6760235471636B6E2E2E
  227. 2B5421C20934CA3647A2003D4303D43B21300D470C41303C3707E31652330451
  228. 26CB916D9D2088130D004095236C2A2090000256479B30CB916D9D2084E20302
  229. 56455B2130B2130CF1268DA16D9D207E316FED30B2130D9D20FEF300E5167E12
  230. 62C2306122657B302C2302C12657B30CB91631B5145126A2170880412A1706B3
  231. 16FED300E5167A72108F1174726F65508C170442306B316D7ED57E316CBD30B2
  232. 1300F51643370CA03113593CF146ADB461192038000F85110B821FC2E4FEF300
  233. E5167E316EC370E97154423098E36D9D2044230B2040B2130D9D20E971544230
  234. FEF306B316BBF060B821B21306B316CBD300E516433707947011920023001192
  235. 048300B05914B49408316A5141A51410CA3047A20D6E204054879647B21300D4
  236. 7079E60E8E6079E60D9D209FF303D816D9D20D5040B1FF3D9D2088704231D4B2
  237. 13099040B1FF3D9D2088704E61D4B2130F8040B1FF3D9D2088704051D4B21303
  238. A040B1FF3D9D2088704C81D4B2130C1B46B1FF3D9D208870418A3079E60D6E20
  239. 405487964772D70B21309E040B1FF3D9D20887045E141C2A20D2000026596567
  240. 75627022497024416E60234F48454E419136C2A20B20000236F68656E60436D6
  241. 57E257E6967656E236863915062983B213011140B1FF3D9D20887045E141C2A2
  242. 092000020202020596364702D2D2E30235471636B658B215562175660B2130D4
  243. 140BE0262C230F714091D300B536CB916D9D204423021EF3B2130B2130300403
  244. D816D9D20D5040B1FF3D9D2088704ADB46EC370231D443370B213099040B1FF3
  245. D9D2088704ADB46EC370E61D443370B213030040745364423021EF3B2130D004
  246. 03D816D9D20D5040B1FF3D9D208870409615B213099040B1FF3D9D2088704EA6
  247. 15B2130F8040B1FF3D9D20887045E615B21303A040B1FF3D9D208870430715B2
  248. 130D0040745364423021EF3B21308523021EF3B2130DEBB09E5503353679E60D
  249. 6E20405487964779E601DE4058983743E4CA03144193B21304BC7"
  250. END_ASC
  251.  
  252.  
  253. BYTES: #7CB4h 760.5
  254.  
  255. BEGIN_UU scrn.uue
  256. begin 644 scrn
  257. M2%!(4#0X+46=+2"K&&_@P*("+0```F+T)M<61I?F=@8R11<VMN;BXK)%$BR0
  258. M0ZQC="H`TS0P3;,2`]!TP!0#PW-P/F$E,T`58KP9UMD"B#'0``19,L:B`@D`
  259. M(&5TN0.\&=;9`D@N,"!E5+42`RLQP!]BV!K6V0+G$_;>`RLQT-D"[S\`7F'G
  260. M(28L`Q8B5K<#PC(@'&)U.\";81-;015B*G&`"!2B<6`[8>\]`%YAIR<!^!%'
  261. M)_96!<AQ0"0#MA/6YUWG$\;;`RLQ`%]A-'/`"A,QE<,?9-I+%I$"@P#P6!&P
  262. M*/$L3N\_`%YAYQ/F/`>>%T4D`XD^UMD"1#*P`@0K,=#9`IX7120#[S]@.V&[
  263. M#P:+$BLQ8#MAO#T`7F$T<W!)!Q$I`#(`$2E`.``+E4%+28`3IA446D$!K`-T
  264. M*M#F`@1%>&ET*S$`30>7;N#H!I=NT-D"^3\PC6&=+=`%!!O_T]D"B`<D$TTK
  265. M,9`)!!O_T]D"B`?D%DTK,?`(!!O_T]D"B`<$%4TK,3`*!!O_T]D"B`?$&$TK
  266. M,<"Q9!O_T]D"B`<4J`.7;M#F`@1%>&ET)WVP$@/I0+#Q/YTM@'A`Y4'!H@(M
  267. M``!BE59V5R8'(I0'0A3F!C+TA%3D%!EC+"JP`@`@8V]H96Y`8VUU+G5N:6=E
  268. M+F-HDU%@DC@K,1`1!!O_T]D"B`=4'A0L*I`"`"`@("!0:6-T("TM/B!3=&%C
  269. M:X4K46425V:P$@--0;`.8L(R\!<$&3T`6V.\&=;9`D0R(.$_*S&P$@,#0#"-
  270. M89TMT`4$&__3V0*(!Z2]9,YS(!---'.P$@.90+#Q/YTM@'A`VDOF/`=NT40S
  271. M!RLQ,``$1S5&)`,2_K,2`PU`,(UAG2W0!00;_]/9`H@'!&E1*S&0"00;_]/9
  272. M`H@'Y&I1*S'P"`0;_]/9`H@'5&Y1*S$P"@0;_]/9`H@'-'!1*S'0``1'-48D
  273. M`Q+^LQ(#6#(@X3\K,="^"^E5,%-CEV[0Y@($17AI=)=N$.T$A8ES-$ZL,$$4
  274. $.2LQ`"LQ
  275. `
  276. end
  277. sum -r/size 30878/1085 section (from "begin" to "end")
  278. sum -r/size 9234/769 entire input file
  279. END_UU
  280.