Prev: New HP 50G Owner
Next: EMU48
From: am on 29 Aug 2006 13:13 Is there any way of accessing global variables with HP-GCC? I mean the usual variables that one can save in the Home directory or in its subdirectories, like PPAR, EPS, CASINFO. I am particularly interested in the special variable PICT... is it possible to manipulate grobs with hpgcc? TIA
From: Jean-Yves Avenard on 29 Aug 2006 22:42 am wrote: > Is there any way of accessing global variables with HP-GCC? I mean the > usual variables that one can save in the Home directory or in its > subdirectories, like PPAR, EPS, CASINFO. I am particularly interested > in the special variable PICT... is it possible to manipulate grobs with > hpgcc? PICT isn't a global variable as such. You can directly work with it using the pointer stored in (=GDISP) JY
From: am on 30 Aug 2006 05:59 > PICT isn't a global variable as such. > You can directly work with it using the pointer stored in (=GDISP) Can you please give me an example of how to use it with hpgcc? Thanks
From: Claudio Lapilli on 30 Aug 2006 20:33 Hi, am wrote: > Is there any way of accessing global variables with HP-GCC? Yes, look for the sat_dir... functions. You can traverse subdirectories and read variables. However, this is read-only, you cannot write to these variables (at least for now, we'll try to add this feature in the future). > I mean the > usual variables that one can save in the Home directory or in its > subdirectories, like PPAR, EPS, CASINFO. I am particularly interested > in the special variable PICT... is it possible to manipulate grobs with > hpgcc? hpgcc doesn't have specific functions to directly manipulate grobs yet. You can write them on your own using sat_peek and sat_poke. If you do, please share them. To access PICT, you will need to get the address from GDISP like JYA explained to you. In C you would write... #define SAT_GDISP 0x806e4 .... <<your function declaration here>> ... int pict_addr=sat_peek(SAT_GDISP,5); and now pict_addr is pointing to the prolog if the grob. Your grob manipulation functions should peek/poke here at your will. You can get the grob data structure from any sysrpl book/online doc. Regards, Claudio
From: John H Meyers on 31 Aug 2006 11:35
On Wed, 30 Aug 2006 19:33:45 -0500, Claudio Lapilli wrote: >> Is there any way of accessing global variables with HP-GCC? > Yes, look for the sat_dir... functions. You can traverse subdirectories > and read variables. However, this is read-only, you cannot write to > these variables (at least for now, we'll try to add this feature > in the future). Could you implement a "server" -- i.e. an RPL program which would accept any commands to be executed in RPL mode (using a new or saved stack, say), then return to where you suspended HPGCC mode? If you had that, then you could have HPGCC programs perform any desired RPL commands, and would not need to add individual specific features to HPGCC. [r->] [OFF] |