Re: Separated headers



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
.



Relevant Pages

  • Re: Separated headers
    ... The code section points back at the header. ... relocation, it's not a strict pointer, but an offset from the xt to ... My forth system resides in embedded system so I don't like ... that extra ptr (offset) back to header, ...
    (comp.lang.forth)
  • Re: DisAssembler... Where to start...
    ... Where can I get info on executables... ... At offset 3C (last field of MZ header), there is a pointer to the ... read in the segment data that follows the directory table. ...
    (alt.lang.asm)
  • Re: Do PC relative loads make any sense?
    ... This has nothing to do with the presence of PC-rel addressing. ... Later the linker patches in the actual offset. ... In reality there is always _some_ values that require relocation ... processors support PC-relative jumps. ...
    (comp.arch)
  • Re: On the verge of suicide:tar & gunzip problems
    ... corruption in the middle of a gzip-compressed archive. ... "tar" (which started skipping 512-byte blocks at the first bad header) ... each offset. ...
    (Debian-User)
  • Re: panic: vm_fault: fault on nofualt entry, addr: 81423000
    ... offset 1 ... thus the header is ending up in page 0x8142300 if I read that correctly. ... the reverse of the map function, but maybe theres something simply going ... the page holding the XSDT. ...
    (freebsd-stable)