Re: Separated headers



On Apr 21, 3:48 am, "Maki" <veselic...@xxxxxxxx> wrote:
I have recently cross-compiled my first forth system (subroutine threads),
and now I want to separate headers from code. Current header arrangement
looks like this:
[link][flags][count][name] code
I guess I need one more pointer in the header like this:
[link][flags][count][name][code_ptr] which will connect header to
definition.

Questions:

1. What is the best way to handle allocation in name dictionary? My current
thought is to revector dp with words like:
PROGRAM HERE ( returns dp from program code dictionary)
NAMES HERE ( returns dp from name dictionary)

2. Implementation of word >name is trickier. It appears that >name now
should use FIND to go back to name field.

Are there any other pitfalls that I should pay attention to when doing this?
Any advices an comments appreciated.
Best regards,
M.

--
M.Veselic
Sigma Lab.

you dont need to use find to locate a word header when you separate
headers from code space, isforth does this and >name is basically
defined as : >name 4- @ ; because i store an NFA pointer at CFA -4.
the trick is when you do headerless words this pointer has to be
cleared or it will point to bogus data!
.



Relevant Pages

  • Re: Header Files and Interfaces Yet Again
    ... I get a foo.h user's header file ... Java's assignments are pointer assignments. ... If for some reason I'm forced to violate ...
    (comp.lang.cpp)
  • Re: Separated headers
    ... and now I want to separate headers from code. ... I guess I need one more pointer in the header like this: ... \>XXXX and XXXX> move to and from a specific data area, ...
    (comp.lang.forth)
  • Re: komplexes Problem mit Funktionszeigern
    ... Es sind Header vorhanden, ... Pointer aufgerufen wird. ... So unterschiedlich sind diese Konventionen offensichtlich nicht. ... Schnittstelle besitzen, und für diese Schnittstelle passende Header ...
    (de.comp.lang.c)
  • Re: error 12115 and how to delete a smart blob
    ... An internal error probably occurred and corrupted the LO header. ... i found the line of my table where the corrupted blob is (the ... fail, same error. ... binary vi and/or whatever else to zero out the pointer completely. ...
    (comp.databases.informix)
  • Re: vwait doesnt return after setting TCL_SetVar from a thread
    ... data (TCL_interp pointer) this is your code: ... } EventData; ... The 'header' should not be a pointer. ...
    (comp.lang.tcl)