|
|
@@ -19,6 +19,37 @@ |
|
|
|
by the full interpreter. |
|
|
|
) |
|
|
|
|
|
|
|
( When referencing words from native defs or this very unit, |
|
|
|
use this compiling word, which subtract the proper offset |
|
|
|
from the compiled word. That proper offset is: |
|
|
|
1. Take ROT-header addr, the first native def. |
|
|
|
2. Subtract _bend, boot's last word. |
|
|
|
3. That will give us the offset to subtract to get the addr |
|
|
|
of our word at runtime. |
|
|
|
|
|
|
|
This means, of course, that any word compiling a _c word |
|
|
|
can't be executed immediately. |
|
|
|
) |
|
|
|
|
|
|
|
: _c |
|
|
|
['] ROT |
|
|
|
6 - ( header ) |
|
|
|
['] _bend |
|
|
|
- ( our offset ) |
|
|
|
' ( get word ) |
|
|
|
-^ ( apply offset ) |
|
|
|
, ( write! ) |
|
|
|
; IMMEDIATE |
|
|
|
|
|
|
|
: X ( can't have its real name now ) |
|
|
|
['] EXIT , |
|
|
|
R> DROP ( exit COMPILE ) |
|
|
|
R> DROP ( exit : ) |
|
|
|
; IMMEDIATE |
|
|
|
|
|
|
|
( Give ";" its real name ) |
|
|
|
';' CURRENT @ 4 - C! |
|
|
|
|
|
|
|
: INTERPRET |
|
|
|
BEGIN |
|
|
|
WORD |
|
|
|