home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sources / hp48 / 255 < prev    next >
Encoding:
Text File  |  1992-09-08  |  2.5 KB  |  110 lines

  1. Newsgroups: comp.sources.hp48
  2. Path: sparky!uunet!seq!spell
  3. From: Mike Morgan <m00012@KANGA.STCLOUD.MSUS.EDU>
  4. Subject:  v07INF1:  Temp variable example (sys rpl) v1.0
  5. Message-ID: <1992Sep7.234113.23513@seq.uncwil.edu>
  6. Followup-To: comp.sys.hp48
  7. Sender: spell@seq.uncwil.edu (Chris Spell)
  8. Organization: Univ. of North Carolina @ Wilmington
  9. Date: Mon, 7 Sep 1992 23:41:13 GMT
  10. Approved: spell@seq.uncwil.edu
  11. Lines: 101
  12.  
  13. Checksum:  138615446 (verify with brik -cv)
  14. Submitted-by: Mike Morgan <m00012@KANGA.STCLOUD.MSUS.EDU>
  15. Posting-number: Volume 7, Info 1
  16. Archive-name: tvrex_mm
  17.  
  18. BEGIN_DOC tvrex.doc
  19.                     ***system RPL tutorial***
  20.  
  21. TVREX:  (Named) Temporary variable example
  22.  
  23. "I DON'T CARE-WARE"
  24.  
  25. This is a simple example illustrating the use of named
  26. temporary variables in system RPL.
  27.  
  28. INSTRUCTIONS:
  29. 1.  Create text file TVREX.S
  30. 2.  execute: RPLCOMP TVREX.S TVREX.A
  31. 3.  execute: SASM TVREX.A
  32. 4.  Create loader control file TVREX.M
  33. 5.  Execute SLOAD -H TVREX.M
  34. 6.  Download the binary, TVREX to your HP 48 and try it out.
  35.  
  36. OTHERWISE, download the asc version and just use mine.
  37.  
  38. Mike Morgan
  39. M00012@KANGA.STCLOUD.MSUS.EDU
  40.  
  41. P.S.  I will answer any questions...but chances are that I won't
  42.       know the answer.
  43. END_DOC
  44.  
  45. BEGIN_SRC tvrex.s
  46. * This program reorders the first six stack levels:
  47. *
  48. *       ABCDEF>FEDCBA
  49. *
  50. * A simple named temp. variable example....
  51. *
  52. *
  53. ASSEMBLE
  54.         NIBASC   /HPHP48-E/
  55. RPL
  56. ::
  57.   DEPTH         ( ob1...obn --> ob1...obn #n )
  58.   SIX           ( #110b )
  59.   #<            ( Is the stack depth less than 6? )
  60.   caseDoBadKey  ( *If true, do bad key and exit, else continue )
  61.   {
  62.      LAM aa
  63.      LAM bb
  64.      LAM cc
  65.      LAM dd
  66.      LAM ee
  67.      LAM ff
  68.   }
  69.   BIND          ( lvl 6 to aa...lvl 1 to f )
  70.   LAM ff        ( Recall ff)
  71.   LAM ee
  72.   LAM dd
  73.   LAM cc
  74.   LAM bb
  75.   LAM aa
  76. ;
  77. END_SRC
  78.  
  79. BEGIN_SRC tvrex.m
  80. TITLE Temp. variable example
  81. OUTPUT TVREX
  82. LLIST TVREX.LR
  83. SUPPRESS XREF
  84. SEARCH c:/tools/ENTRIES.O
  85. REL TVREX.O
  86. END
  87. END_SRC
  88.  
  89. BEGIN_ASC tvrex.asc
  90. %%HP: T(1)A(R)F(.); @ tasc v2.52 file
  91. "D9D20C4130B20404EC30BEB3647A20D6E20201616D6E20202626D6E20203636D
  92. 6E20204646D6E20205656D6E20206666B21300D470D6E20206666D6E20205656
  93. D6E20204646D6E20203636D6E20202626D6E20201616B21300DBB"
  94. @ BYTES: #BBD0h 88.5
  95. END_ASC
  96.  
  97.  
  98. BYTES: #BBD0h 88.5
  99.  
  100. BEGIN_UU tvrex.uue
  101. begin 644 tvrex
  102. M2%!(4#0X+46=+<`4`RM`0,X#ZSM&IP)M+B`0%M;F`@)B8FTN(#`VUN8"`F1D
  103. M;2X@4%;6Y@("9F8K,0!-!VTN(&!FUN8"`F5E;2X@0$;6Y@("8V-M+B`@)M;F
  104. '`@)A82LQ`"LQ
  105. `
  106. end
  107. sum -r/size 42992/160 section (from "begin" to "end")
  108. sum -r/size 8220/97 entire input file
  109. END_UU
  110.