On Wed, Aug 26, 2020 at 11:16:48PM -0700, C K Kashyap wrote:
> About why I am trying it - it's primarily just a learning exercise for me.
> What I am trying is expanding the cell to 4 words instead of two and use
> the extra words as the meta data and not require tagged pointers. This way

I see.

> I could even build it with TCC that does not seem to align functions at 4
> byte boundary.

OK, function pointer alignment is a different issue. You can however encode the
pointer in different ways. Some versions of PicoLisp shift'ed and or'ed it.


> Sorry if I am missing something, but wouldn't x-1 result in shifting the
> pointer by 8 bytes instead of 4 (since size of cell is 8). Which is
> probably why cdr is used instead of car?

Yes. x-1 is minus 8 bytes, and the cdr adds 4 bytes. So the physical access goes
to -4.

☺/ A!ex

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to