Author Topic: Access Resident Program Variables  (Read 6855 times)

0 Members and 1 Guest are viewing this topic.

Offline gudenau

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 18
  • Rating: +0/-0
    • View Profile
Access Resident Program Variables
« on: September 26, 2013, 07:05:50 pm »
So, I have two programs, one that needs to be resident and is very small. The other is going to be larger and will unload when not needed. So, how could I access variables from the resident program from the normal one? Unfortunately I can not do this differently.

Offline Legimet

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +29/-0
    • View Profile
Re: Access Resident Program Variables
« Reply #1 on: September 26, 2013, 07:21:19 pm »
You could create a file to store necessary variables in.

Offline gudenau

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 18
  • Rating: +0/-0
    • View Profile
Re: Access Resident Program Variables
« Reply #2 on: September 26, 2013, 07:33:45 pm »
That is way to slow, as they can change many times a second, and I do not want to kill the flash.

Offline lkj

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 485
  • Rating: +58/-1
    • View Profile
Re: Access Resident Program Variables
« Reply #3 on: September 26, 2013, 07:48:38 pm »
Maybe store a pointer instead of the value in a file?

Offline gudenau

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 18
  • Rating: +0/-0
    • View Profile
Re: Access Resident Program Variables
« Reply #4 on: September 26, 2013, 08:01:41 pm »
I did consider that, but I was hoping ndless would have a function for that. Sigh.

Offline Legimet

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +29/-0
    • View Profile
Re: Access Resident Program Variables
« Reply #5 on: September 26, 2013, 08:09:21 pm »
You could get ExtendeD to add such a function to libndls.

Offline gudenau

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 18
  • Rating: +0/-0
    • View Profile
Re: Access Resident Program Variables
« Reply #6 on: September 27, 2013, 12:28:31 pm »
How should I contact him/her for this?

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: Access Resident Program Variables
« Reply #7 on: September 27, 2013, 03:02:25 pm »
I think passing your sub program a pointer is the best solution (it's actually the proper way to do it).

Offline lkj

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 485
  • Rating: +58/-1
    • View Profile
Re: Access Resident Program Variables
« Reply #8 on: September 27, 2013, 03:03:46 pm »
How should I contact him/her for this?
Just write him a PM.

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: Access Resident Program Variables
« Reply #9 on: September 27, 2013, 03:17:42 pm »
If there are shared memory facilities in Nucleus, Ndless could expose them (once they are found); otherwise, libndls would indeed be the place to implement them.

With the impending release of the next OS version, which will certainly be even [EDIT: more] closed-minded than 3.2.4, maybe it won't be done before arbitrary code execution, and the subsequent time-consuming and boring work of finding functions again in the new OS version.
« Last Edit: September 27, 2013, 04:05:19 pm by Lionel Debroux »
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline gudenau

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 18
  • Rating: +0/-0
    • View Profile
Re: Access Resident Program Variables
« Reply #10 on: September 27, 2013, 03:37:35 pm »
I think passing your sub program a pointer is the best solution (it's actually the proper way to do it).
Well, the resident application will not be launching the other application, otherwise I would just pass it, to bag I am not just making an operating system for this, would be so much better as it always runs no mater what is the same instance.

How should I contact him/her for this?
Just write him a PM.
I will try that.

If there are shared memory facilities in Nucleus, Ndless could expose them (once they are found); otherwise, libndls would indeed be the place to implement them.

With the impending release of the next OS version, which will certainly be even closed-minded than 3.2.4, maybe it won't be done before arbitrary code execution, and the subsequent time-consuming and boring work of finding functions again in the new OS version.
I am hoping that this will be a small thing to add.

Offline bsl

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 157
  • Rating: +14/-0
    • View Profile
Re: Access Resident Program Variables
« Reply #11 on: September 27, 2013, 11:02:04 pm »
Nucleus does have the mailbox form of IPC, nobody has tried to work.

Offline ExtendeD

  • Project Author
  • LV8 Addict (Next: 1000)
  • *
  • Posts: 825
  • Rating: +167/-2
    • View Profile
Re: Access Resident Program Variables
« Reply #12 on: September 28, 2013, 01:41:38 am »
Mailboxes or shared memory would indeed be a good option. I'll try to add these, but as Lionel says this is unfortunately not the priority.
gudenau, you should try the "pointer passed through a shared file" solution in the meantime.
Ndless.me with the finest TI-Nspire programs

Offline gudenau

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 18
  • Rating: +0/-0
    • View Profile
Re: Access Resident Program Variables
« Reply #13 on: September 28, 2013, 11:16:00 am »
Mailboxes or shared memory would indeed be a good option. I'll try to add these, but as Lionel says this is unfortunately not the priority.
gudenau, you should try the "pointer passed through a shared file" solution in the meantime.

Will do! Thanks for the help, and possible feature.