V4N4 - Complang
V4N4 - Complang
V4N4 - Complang
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
discussion will consider only the more<br />
familiar indirect threaded code. Figure<br />
3(a) shows the proFORTH'" defini-<br />
tion structure for a system constant -<br />
that is, a constant which is not refer-<br />
enced in high-level target code. Except<br />
for the location of the LFA, it is essen-<br />
tially identical to the traditional struc-<br />
ture, in that the entire definition is<br />
compiled into the active dictionary<br />
(in this case, dictionary 0). The header<br />
begins at the link field address or LFA,<br />
and consists of the link and the defini-<br />
tion's name. The body immediately<br />
follows the header in memory and<br />
consists in this case of a pointer to a<br />
common support procedure named<br />
(CONST) located at the CFA or code<br />
HEADER -1 I<br />
I<br />
I_<br />
I I LENGTH<br />
NFA I<br />
field address, followed by the parame-<br />
ter field at the parameter field address<br />
of PFA. In the example the parameter<br />
field contains the constant's value,<br />
which the procedure (CONST) will put<br />
on the stack when it executes. In pro-<br />
FORTH'" the procedure (CONST)<br />
resides in target ROM so that it is also<br />
available for supporting target con-<br />
stants.<br />
Consider now the structure for a<br />
target constant shown in Figure 3@).<br />
Notice that the definition body is now<br />
located in target ROM. In order to be<br />
able to access the body, a pointer is<br />
added to the header at the definition<br />
field address DFA, and the CFA of the<br />
definition is stored there.<br />
Continued on next page<br />
I I I<br />
I I I ACTIVE<br />
I NAME I I - DICTIONARY<br />
I<br />
I<br />
I- DFA/CFA I I I<br />
SUPPORT - 1 I I I- ACTIVE<br />
PROCEDURE I I I I ROM SEGMENT<br />
I I I I<br />
1- I I - I<br />
FIGURE 3(a) - proFORTH DICTIONARY STRUCTURE FOR SYSTEM CONSTANT<br />
I- LFA I LINK I -1<br />
I<br />
I I<br />
I I LENGTH ' I<br />
I NFA ! 1 I I<br />
I<br />
I ACTIVE<br />
HEADER -1 I I<br />
1- DICTIONARY<br />
I<br />
I NAME I I<br />
I I I I<br />
I I I I<br />
I DFA I I I<br />
1- I<br />
1 --- I<br />
I -<br />
i<br />
I