home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / hp48 / 5777 < prev    next >
Encoding:
Internet Message Format  |  1992-11-17  |  2.8 KB

  1. From: akcs.levenson@hpcvbbs.cv.hp.com (william j. levenson)
  2. Date: Tue, 17 Nov 1992 01:40:03 GMT
  3. Subject: Re: Emulating a keypress in sys_RPL???
  4. Message-ID: <2b08485b.2181.1comp.sys.hp48.1@hpcvbbs.cv.hp.com>
  5. Path: sparky!uunet!wupost!sdd.hp.com!hp-cv!hp-pcd!hpcvra!rnews!hpcvbbs!akcs.levenson
  6. Newsgroups: comp.sys.hp48
  7. References: <1992Nov16.090229.12183@waikato.ac.nz>
  8. Lines: 55
  9.  
  10. Hi Conan!
  11.  
  12. Have you seen the entries lists that were posted by Mika Heiskenan to
  13. seq.uncwil.edu in the hp48/Uploads directory?  These lists contain many
  14. commented entry, both supported and unsupported (by hP, that is).  These
  15. "entries" lists are a valuable tool for exploring the various
  16. undocumented sys-RPL commands.  For example, entries.3+ (I think this is
  17. the latest, although I think Mika has made one in entries.a format for
  18. use with the RPL tools) has the entry at 40828 (PTR 40828) described as:
  19.  
  20. ::  TakeOverGETPORC
  21. @  get object bound to menu key (key number follows)
  22.  
  23. The (::) in the above example indicates that the entrie is an RPL
  24. program and the name (TakeOverGETPROC) was made up by whoever discovered
  25. this particular entry, I guess.  The (@) indicates that the following is
  26. a comment regarding the function of the address.  Many, many entries are
  27. covered in these lists (Thanks, Mika!) to varying degrees of
  28. thouroughness.  Some are left to you to decipher.
  29.  
  30. This can be done using the <-RPL-> library for RPL routines and MLDL for
  31. machine code routines (at least that's how I've been doing it).  To use
  32. the rpl library, let's take PTR 40828 as an example.
  33.  
  34. 1: "PTR 40828" ->RPL  --->   1: "82840"
  35.  
  36. where ->RPL is in the <-RPL-> library.  "82840" is merely the address of
  37. the pointer in a string and reversed.  So, you can type the string in
  38. directly if you like.  Next,
  39.  
  40. $->  --->  1: External External
  41.  
  42. where $-> is a command in the RPL library.  What has just happened is
  43. that the $-> routine has just put whatever is at the address in the
  44. string (backwards, that is) on the stack.  Now, you can decompile that
  45. with the RPL-> command to get
  46.  
  47. 1:  " :: TakeOver 'R GETPROC ; "
  48.  
  49. Now you may have to dig deeper to figure out GETPROC, but that's the fun.
  50.  Eventually, all the commands lead to machine language routines and
  51. that's another story.  But, usually you can figure out what is going on
  52. before you run into ML.  If not, try MLDL for some more fun!
  53.  
  54. Combining all the above tools, you can learn a lot about this machine and
  55. how HP programmers think.  Keep in mind, I am NOT an expert at this.  In
  56. fact, when I started playing with this stuff about six months ago, I
  57. didn't even know what machine language was!  I am just an ignorant
  58. aerospace engineer who didn't get enough comp sci in school.  But, I have
  59. learned plenty from this machine.  Primarily, I've learned how little I
  60. know.  But I am having fun!
  61.  
  62. I hope all this helps.  Let me know
  63.  
  64. Bill Levenson
  65.  
  66.