text
stringlengths
0
99.6k
Parameter Field
*ln2
Page 223
The address returned by tick and expected by EXECUTE is not the parameter field address, but the CODE FIELD address. If you want the parameter field address, you may convert the address returned by tick (the code field address) to the parameter field address using the '83 standard word >BODY . For an illustration of its use, see the example using LIMIT , given earlier.
*fp0
*lk:starting2
*lm10:rm70
*hd3:Start Blazin' Forth,page -#-
Forth Geography
Page 231
Not surprisingly, the memory maps of Forth systems tend to differ. Here is the one for Blazin' Forth:
LOW MEMORY **********************
* PARAMETER STACK *
**********************
* TERMINAL INPUT *
* BUFFER *
**********************
* RETURN STACK *
**********************
* ERROR MESSAGE *
* BUFFER *
**********************
* OPERATING SYSTEM *
* VARIABLES *
**********************
* USER VARIABLES *
**********************
* SCREEN MEMORY *
**********************
* PRE-COMPILED *
* FORTH *
**********************
* PRE-COMPILED *
* ELECTIVES *
**********************
* USER DICTIONARY *
**********************
* PAD *
**********************
* BUFFER CONTROL *
* QUEUE *
**********************
* BLOCK BUFFERS *
* (4) *
* or *
* SPRITE IMAGES *
**********************
* MEMORY MAPPED IO *
HIGH MEMORY* AND KERNAL OS *
* or *
* HIRES COLOR MEMORY *
* HIRES SCREEN *
* SPRITE IMAGES *
**********************
*fp0
User Dictionary
Page 233
The arrangement described here works the same in Blazin' Forth. The only difference is that the variable H , used by Brodie, is called DP in Blazin' Forth. (Stands for Dictionary Pointer.)
Parameter Stack
Page 235-236
'S is SP@ in '83 Forth. Just substitute SP@ for 'S in the examples given, and they will work just fine. In reference to the example showing how to copy the fifth element down, you might want to consult the system documentation for the words PICK and ROLL. (These are '83 standard words.)
S0 is SP0 in Blazin' Forth. Note that this is NOT a '83 standard word. There is also a word SP! , which copies the value stored in SP0 to the stack pointer. This effectively empties the return stack.
Input Message Buffer
Page 236
The modern name for this memory region is Terminal Input Buffer. SP0 does not reference this area. Instead, use the system constant TIB . TIB leaves the starting address of the terminal input buffer on the top of the stack.
*cn1;Chapter 10*cn0
page 255-256
Forth-83 makes a distinction between FLUSH and SAVE-BUFFERS. Both words force all updated buffers to be written to the disk. The difference is that after executing FLUSH , the buffers will be emptied (FLUSH-ed , get it?). But after SAVE-BUFFERS, the blocks will still be in memory, although they will no longer be marked as UPDATEed, since they have been written to disk.
Output Operators
Page 258
Instead of S0 (SP0 in Blazin' Forth) use TIB :
TIB 12 TYPE
Note that a word like S0 or SP0 is very system dependent, but since TIB is a '83 standard word, it can always be used to access the terminal input buffer.