text
stringlengths 0
99.6k
|
|---|
: RECEIVE 8 GET# (?DISC) IF .DERR ABORT THEN ;
|
This word will print the disk error message, and halt execution if there is an error.
|
*fp0
|
.DERR ( -- )
|
Prints the disk error message stored in the error message buffer. Note that this is only valid after (?DISC) or (R/W).
|
STATUS ( -- status )
|
Pushes the serial bus status byte on the stack. Same as ST in BASIC.
|
*cn1;2: System DEFERed words.*cn0
|
The system contains several DEFERed words for your convenience. These allow changes to be made in the actual Forth system itself:
|
PRINTER NOPRINTER
|
These words are described in the section on I/O.
|
PUNCT? ( char -- flag)
|
This word controls the characters accepted by NUMBER. In order to conform to the 83 standard, Blazin' Forth will only accept a period when entering double numbers. All other characters will result in an error. In order to change this behaviour, code a new word, which accepts the characters you wish, and then execute:
|
' NEW.PUNCT IS PUNCT?
|
Of course, NEW.PUNCT must accept the same inputs, and provide the same outputs, as the older version.
|
R/W ( addr blk# flag -- )
|
This word is the virtual memory interface primitive. It may be altered to add new disk handling operations to FORTH, such as a file system.
|
*cn1;3: Vocabulary Structure*cn0
|
Blazin' Forth uses the same tree structured vocabulary linkages as FIG forth. Some of the newer dynamic vocabulary structures were examined, but found unsatisfactory. Most people seem to prefer FIG to forth-79, but all reports are not in as far as the newer efforts are concerned. Comments on these newer vocabulary structures are welcomed.
|
In Blazin' Forth, a new vocabulary is chained to the vocabulary within which it is created. For example:
|
FORTH DEFINITIONS ( Put all definitions in FORTH vocabulary)
|
VOCABULARY CARTON ( chain CARTON to FORTH )
|
CARTON DEFINITIONS ( Put all definitions in CARTON vocabulary)
|
VOCABULARY EGGS ( Chain EGGS to CARTON, which chains to FORTH )
|
FORTH DEFINITIONS ( restore Forth )
|
*fp0
|
*cn1;4: Misc. Information*cn0
|
You may change the screen color defaults of Blazin' Forth to ones more suitable to your monitor or tv. Example:
|
0 0 +ORIGIN C! ( border color)
|
4 1 +ORIGIN C! ( Screen color)
|
6 2 +ORIGIN C! ( character color)
|
Once this is done, RESTART, or RUN/STOP RESTORE will default to the new colors, as will NODRAW etc. Once you find an acceptable combination, you can save the system using SAVE-FORTH. Note that some early model 64's have a screen editing bug which appears when trying to delete across a screen boundary. The words LOAD RUN will appear, and although the cursor will continue to flash, the computer will not respond to any input. The only solution, (aside from obtaining a ROM upgrade from CBM) is to select a color with a low number, such as 0 or 1. Note that if this problem occurs, it is NOT a Blazin' Forth bug.
|
You may desire to convert the present editor to a fullscreen editor. This is easily accomplished. Probably the easiest way is to define 16 words, for example, 0: 1: 2: etc., or P1 P2 or whatever you like. These words should accept 64 characters from the input stream, and then move them to the appropriate postion in the buffer for that screen. (In other words, they combine the functions of T , in selecting the line, and P in placing the line in the buffer.) You can then modify LIST so that instead of line numbers, it lists out with your words 0: 1: 2: or whatever you used. Once this has been done, you may use the resident features of the 64's screen editor to their full extent. I didn't provide such an editor with the system since it was desired to make this system as compatible with the book Starting Forth as possible.
|
You may define additional USER variables. User offsets from 58 to 198 are available to you for new user variables. Offsets less than 58 are used by the system. Blazin' Forth will initialize the entire user area to zero's on a RESTART or on POWERUP. Note that this is not a Standard Feature.
|
The system is configured for use with one 4040 compatible dual drive. Single drives are usable with Blazin' Forth, but the highest screen accessable is 166. Note that it is be possible to interface additional drives, or non-standard drives to Blazin' Forth by vectoring R/W. (see: DEFERed words.) Note that users of single disk drives will not receive an ILLEGAL SCREEN error if they attempt to access screens greater than 166. (R/W) may bepatched, or modified to do this if so desired. (See: Defered words)
|
Membership in the Forth Interest Group (FIG) is encouraged. They provide a magazine, FORTH DIMENSIONS, which presents a variaty of interesting articles and applications. They also supply books, reprints, and sponsor Forth seminars. Of particular interest to those using Blazin' Forth is that they supply copies of the FORTH-83 standard ( $15.00 at this writing). Membership at this writing is $15.00 per year, which includes a free subscription to Forth Dimensions, and may obtained by writing to:
|
The Forth Interest Group
|
P.O. Box 8231
|
San Jose
|
CA 95155
|
USA
|
The Forth Standards Team is responsible for the development of new Forth standards. The welcome comments and proposals. The may reached at:
|
Forth Standards Team
|
P.O. BOX 4545
|
Mountain View
|
CA 94040
|
USA
|
*lm10:rm70
|
*hd3:,Start Blazin' Forth,page -#-
|
*ln2
|
*cn1;FORWARD*cn0
|
*ln2
|
By far the most read (and best) instructional book on Forth is STARTING FORTH, by Leo Brodie. It is very clear, amusing, and covers the territory. Unfortunately, since Starting Forth was written, Forth itself has undergone considerable evolution, so not everything in Starting Forth is applicable today. Additionally, Starting Forth is based on a particular dialect of Forth (POLY-FORTH), which is a Forth implementation by Forth Inc., the company Mr. Brodie worked for when he wrote his excellent book. As a result, even for the time it was written, certain passages and examples would not work on anything but a Forth Inc. system. ( .S is a classic example of this, but there are others. )
|
Blazin' Forth is written to support the Forth-83 standard. This is the most recent available standard, and the one which in my opinion, and from all I can tell, the opinion of most other Forth users, the most significant standard so far. As a result, it is not completely compatible with Starting Forth. ( Mr. Brodies latest book THINKING FORTH , uses Forth-83, by the way.)
|
Perhaps surprisingly, most of the examples Brodie gives work without a single change in Blazin' Forth. This document is intended to help you when the examples don't work as described, speeding up the learning process, easing the pain, and generally helping to prevent you from damaging yourself or your computer through frustation. Differences between the earlier Forth's and the present standard are described, and alternate definitions are provided.
|
Not all the comments are about differences - there are many more words in Blazin' Forth than are included in the Standard. I couldn't resist telling you about a few of them.
|
Good luck! And may the Forth be with you.
|
*ln2
|
SDB
|
NY NY 1985
|
*fp0
|
*cn1;Chapter 1*cn0
|
Page 11
|
The definition STAR will work as supplied. Blazin' Forth contains a word called ASCII that can make words like STAR more readable (and save you a lot of time looking up characters in ASCII tables). Using ASCII , the definition of STAR would be:
|
: STAR ASCII * EMIT ;
|
Try it - you'll like it.
|
By the way, if you change the definition of MARGIN on the next page to
|
: MARGIN CR 15 SPACES ;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.