Pumpkin, Inc.

Pumpkin User Forums

Message Pointers and their size

If you can't make Salvo do what you want it to do, post it here.

Message Pointers and their size

Postby luben » Fri May 18, 2001 8:10 am

Hello,

In SALVO is possible to set message pointers to access both RAM and ROM (big message pointers) or to access only RAM. In the first case they consume 2 bytes for the pointer.

Well, my question is - is there any way to set some of the message pointers to access RAM&ROM and other only RAM in the same time. This will save my memory. I mean, is it possible to define some of the message to be long and some short in the same time.

Imagine that I have 6 pointers and 5 of them are defined like short (access only RAM). And the last one is long. From what I read in the manual, if I enable BIG_MESSAGES all 6 messages will become big, correct?

You have to agree that "ideal" or "perfect" SALVO, let's call it version "DREAM2001", should have settings for every message, to minimize the waist of RAM. Some way to define their size while creating them, like adding additional parameter OS_BIG/OS_SHORT - OSSignal(MESS_ID, OS_BIG, ......).

From other side I'm sure that such change will decrease the speed of the SALVO kernel - any exseption means more instruction, more time.

Regards
Luben

luben
 
Posts: 324
Joined: Sun Nov 19, 2000 12:00 am
Location: Sofia, Bulgaria

Re: Message Pointers and their size

Postby aek » Fri May 18, 2001 8:21 am

Unfortunately it's not possible to do what you're suggesting -- that's because there would have to be two entire, separate sets of code to handle the "short" and "long" pointers, and this would be much too expensive, ROM-wise.

One thing you could do is observe the behavior of "long" pointers when they are used only to point to RAM (I think this means that bit 15 never changes and bits 14-8 are unused), and then use those 7 bits of unused RAM in the pointers for other purposes ... you could do that with a (char) cast to the pointer's address, which is easily obtained. This will only work if PICC manipulates the msb bit-wise, which I'm not so sure of ... therefore "we can't recommend this technique." :-)


Regards,

------------------

-------
aek
aek
 
Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm


Return to Coding

Who is online

Users browsing this forum: No registered users and 2 guests

cron