Re: Separated headers
- From: Alex McDonald <blog@xxxxxxxxxxx>
- Date: Mon, 21 Apr 2008 14:38:54 -0700 (PDT)
On Apr 21, 7:39 pm, "Maki" <veselic...@xxxxxxxx> wrote:
<snip>
The header structure;
[ link field ] -4 4 lfa
[ ' compile, ] +0 4 ct token -- compile,
+---- [ xt ptr field ] 4 4 xt-ptr
| [ ' comp ] 8 4 ct token -- comp field
| [ file field ] 12 4 ffa
| [ view field ] 16 2 vfa
| [ stk effects ] 18 2 ste
| [ optimize field ] 20 2 ofa
| [ count byte ] 22 1 nfa
| [ the name letters ] 23 n
| [ alignment bytes ] 0 to 3 bytes for name alignment
|
|
| [ ct-ptr ] -4 4 ptr to ct token pair
+---> [ xt field ] +0 xt code field (the xt)
The code section points back at the header (ct-ptr). To simplify
relocation, it's not a strict pointer, but an offset from the xt to
the header.
<snip>
My forth system (not relocatable) resides in embedded system so I don't like
that extra ptr (offset) back to header, but it is simple for >name.
--
Regards
Alex McDonald
Thanks,
M.
Then just search the dictionary for the XT; simple and fast enough,
given that the (marginal) overhead is compile time only.
--
Regards
Alex McDonald
.
- Follow-Ups:
- Re: Separated headers
- From: Maki
- Re: Separated headers
- References:
- Separated headers
- From: Maki
- Re: Separated headers
- From: Alex McDonald
- Re: Separated headers
- From: Maki
- Separated headers
- Prev by Date: Re: Separated headers
- Next by Date: Re: Separated headers
- Previous by thread: Re: Separated headers
- Next by thread: Re: Separated headers
- Index(es):
Relevant Pages
|