Re: Global variables and HP-GCC




John H Meyers wrote:
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?


That would be:
1) difficult to implement
2) against the whole idea of hpgcc (running native code).

Let me explain a little more the second point: If you want to run
saturn-emulated-interpreted commands, then don't use hpgcc. The whole
idea of hpgcc is to write native ARM code, therefore it seems more
logical to write native routines to manipulate objects in ARM rather
than going back to the emulated saturn.

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.

As it is now, hpgcc can manipulate saturn objects pretty well (provided
you have the knowledge needed to do it, of course). What hpgcc can't do
is to use the CAS, but if you need the CAS, then use it from the
calculator, you don't really need hpgcc for that.
Storing objects in userob is an interesting feature that may be added
in a future release, but don't expect any major improvement in the
interaction RPL <-> C.

Claudio

.



Relevant Pages

  • Re: Global variables and HP-GCC
    ... saturn-emulated-interpreted commands, then don't use hpgcc. ... hpgcc can manipulate saturn objects pretty well (provided ... is to use the CAS, but if you need the CAS, then use it from the ... RPL functions and commands, there might be some which are ...
    (comp.sys.hp48)
  • Re: Global variables and HP-GCC
    ... saturn-emulated-interpreted commands, then don't use hpgcc. ... idea of hpgcc is to write native ARM code, ... hpgcc can manipulate saturn objects pretty well (provided ... RPL functions and commands, there might be some which are ...
    (comp.sys.hp48)
  • Re: Global variables and HP-GCC
    ... these variables (at least for now, we'll try to add this feature ... then return to where you suspended HPGCC mode? ... then you could have HPGCC programs ... perform any desired RPL commands, ...
    (comp.sys.hp48)
  • Re: Looking for advice/suggestions/opinions
    ... powerful but also HPGCC seems, from what my limited knowledge tells ... all the interface will be done in rpl. ... software, geodetic calculations, database operations and huge point ...
    (comp.sys.hp48)
  • Choose question
    ... i try to use win_choose in hpgcc and i don't know what is really ... It is a box like the choose box in RPL? ... It is a like a label and i must draw a box and put few of "label" to ... thx to reply. ...
    (comp.sys.hp48)