-
Notifications
You must be signed in to change notification settings - Fork 7
/
glossary.txt
1455 lines (993 loc) · 52 KB
/
glossary.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
This glossary contains all of the word definitions in Release 1 of
fig-FORTH. The definitions are presented in the order of their ascii sort.
Dated: 1979-MAY.
Copyright: See DISTRIBUTION in figdoc.txt
OCER-ed by Albert van der Horst DFW The Netherlands 2000-MAR
The first line of each entry shows a symbolic description of the action of
the proceedure on the parameter stack. The symbols indicate the order in
which input parameters have been placed on the stack. Three dashes "---"
indicate the execution point; any parameters left on the stack are listed.
In this notation, the top of the stack is to the right.
The symbols include:
addr memory address
b 8 bit byte (i.e. hi 8 bits zero)
c 7 bit ascii character (hi 9 bits zero)
d 32 bit signed double integer} most significant portion with sign
on top of stack.
f boolean flag. 0=false, non-zero=true
ff boolean false flag=0
n 16 bit signed integer number
u 16 bit unsigned integer
tf boolean true flag=non-zero
The capital letters on the right show definition characteristics:
C May only be used within a colon definition. A digit indicates number
of memory addresses used, if other than one.
E Intended for execution only.
L0 Level Zero definition of FORTH-78
L1 Level One definition of FORTH-78
P Has precedence bit set. Will execute even when compiling.
U A user variable.
Unless otherwise noted, all references to numbers are for 16 bit signed
integers. On 8 bit data bus computers, the high byte of a number is on top
of the stack, with the sign in the leftmost bit. For 32 bit signed double
numbers, the most significant part (with the sign) is on top.
All arithmetic is implicitly 16 bit signed integer math, with error and
under-flow indication unspecified.
! n addr --- L0
Store 16 bits of n at address. Pronounced "store".
!CSP
Save the stack position in CSP. Used as part of the compiler
security.
# d1 --- d2 L0
Generate from a double number d1, the next ascii character which is
placed in an output string. Result d2 is the quotient after division
by BASE, and is maintained for further processing. Used between <#
and #>.
See #S.
#> d --- addr count L0
Terminates numeric output conversion by dropping d, leaving the text
address and character count suitable for TYPE.
#S d1 --- d2 L0
Generates ascii text in the text output buffer, by the use of #,
until a zero double number n2 results.
Used between <# and #>.
' --- addr P,L0
Used in the form: .
' nnnn
Leaves the parameter field address of dictionary word nnnn.
As a compiler directive, executes in a colon-definition to compile
the address as a literal. If the word is not found after a search of
CONTEXT and CURRENT, an appropriate error message is given.
Pronounced "tick".
( P,L0
Used in the form:
( cccc)
Ignore a comment that will be delimited by a right
parenthesis on the same line. May occur during execution or in a
colon-definition. A blank after the leading parenthesis is required.
(.") C+
The run-time proceedure, compiled by ." which transmits the
following in-line text to the selected output device. See .'"
(;CODE) C
The run-time proceedure, compiled by ;CODE, that rewrites the code
field of the most recently defined word to point to the following
machine code sequence. See ;CODE.
(+LOOP) n --- C2
The run-time proceedure compiled by +LOOP, which increments the loop
index by n and tests for loop completion. See +LOOP.
(ABORT)
Executes after an error when WARNING is -1. This word normally
executes ABORT, but may be altered (with care) to a user's
alternative proceedure.
(DO) C
The run-time proceedure compiled by DO which moves the loop control
parameters to the return stack. See DO.
(FIND) addr1 addr2 --- pfa b tf (ok)
addr1 addr2 .--- ff (bad)
Searches the dictionary starting at the name field address addr2,
matching to the text at addr1. Returns parameter field address,
length byte of name field and boolean true for a good match. If no
match is found, only a boolean false is left.
(LINE) n1 n2 --- addr count
Convert the line number n1 and the screen n2 to the disc buffer
address containing the data. A count of 64 indicates the full line
text length.
(LOOP) C2
The run-time proceedure compiled by LOOP which increments the loop
index and tests for loop completion.
See LOOP.
(NUMBER) d1 addr1 --- d2 addr2
Convert the ascii text beginning at addr1+l with regard to BASE. The
new value is accumulated into double number d1, being left as d2.
Addr2 is the address of the first unconvertable digit. Used by
NUMBER.
* n1 n2 --- prod L0
Leave the signed product of two signed numbers.
*/ n1 n2 n3 --- n4 L0
Leave the ratio n4 = n1*n2/n3 where all are signed numbers.
Retention of an intermediate 31 bit product permits greater accuracy
than would. be available with the sequence:
n1 n2 * n3 /
*/MOD n1 n2 n3 --- n4 n5 L0
Leave the quotient n5 and remainder n4 of the operation n1*n2/n3 A
31 bit intermediate product is used as for */.
+ n1 n2 --- sum L0
Leave the sum of n1+n2.
+! n addr --- L0
Add n to the value at the address.
Pronounced "plus-store".
+- n1 n2 --- n3
Apply the sign of n2 to n1, which is left as n3.
+BUF add1 --- addr2 f
Advance the disc buffer address addr1 to the address of the next
buffer addr2. Boolean f is false when addr2 is the buffer presently
pointed to by variable PREV.
+LOOP n1 --- (run) addr n2 --- (compile) P,C2,L0
Used in a colon-definition in the form:
DO ... n1 +LOOP
At run-time, +LOOP selectively controls branching
back to the corresponding DO based on n1, the loop index and the
loop limit. The signed increment n1 is added to the index and the
total compared to the limit.
The branch back to DO occurs until the new index is equal to or
greater than the limit (n1>0), or until the new index is equal to or
less than the limit (n1<0). Upon exiting the loop, the parameters
are discarded and execution continues ahead.
At compile time, +LOOP compiles the run-time word (+LOOP) and the
branch offset computed from HERE to the address left on the stack by
DO. n2 is used for compile tine error checking.
+ORIGIN n --- addr
Leave the memory address relative by n to the origin parameter area.
n is the minimum address unit, either byte or word. This definition
is used to access or modify the boot-up parameters at the origin
area.
, n --- , L0
Store n into the next available dictionary memory cell, advancing
the dictionary pointer. (comma)
- n1 n2 --- diff L0
Leave the difference of n1-n2.
--> P,L0
Continue interpretation with the next disc screen. (pronounced
next-screen).
-DUP n1 -- n1 (if zero) n1 -- n1 n1 (non-zero) L0
Reproduce n1 only if it is non-zero.
This is usually used to copy a value just before IF, to eliminate
the need for an ELSE part to drop it.
-FIND --- pfa b tf (found) --- ff (not found)
Accepts the next text word (delimited by blanks) in the input stream
to HERE, and searches the CONTEXT and then CURRENT vocabularies
for a matching entry. If found, the dictionary entry's parameter
field address, its length byte, and a boolean true is left.
Otherwise, only a boolean false is left.
-TRAILING addr n1 --- addr n2
Adjusts the character count n1 of a text string beginning address to
suppress the output of trailing blanks. i.e. the characters at
addr+n1 to addr+n2 are blanks.
. n --- L0
Print a number from a signed l6 bit two's complement value,
converted according to the numeric BASE.
A trailing blanks follows.
Pronounced "dot".
." P,L0
Used in the form:
.', cccc"
Compiles an in-line string cccc (delimited by the trailing ") with
an execution proceedure to transmit the text to the selected output
device.
If executed outside a definition, ." will immediately print the text
until the final ',. The maximum number of characters may be an
installation dependent value. See (.").
-LINE line scr --
Print on the terminal device, a line of text from the disc by its
line and screen number. Trailing blanks are suppressed.
.R n1 n2 ---
Print the number n1 right aligned in a field whose width is n2. No
following blank is printed.
/ n1 n2 --- quot L0
Leave the signed quotient of n1/n2.
/MOD n1 n2 --- rem quot L0
Leave the remainder and signed quotient of n1/n2. The remainder has
the sign of the dividend.
0 1 2 3 --- n
These small numbers are used so often that is is attractive to
define them by name in the dictionary as constants.
0< n --- f L0
Leave a true flag if the number is less than zero (negative),
otherwise leave a false flag.
0= n --- f L0
Leave a true flag is the number is equal to zero, otherwise leave a
false flag.
0BRANCH f --- C2
The run-time proceedure to conditionally branch. If f is false
(zero), the following in-line parameter is added to the interpretive
pointer to branch ahead or back. Compiled by IF, UNTIL, and WHILE.
1+ n1 --- n2 L1
Increment n1 by l.
2+ n1 --- n2
Leave n1 incremented by 2.
: P,E,L0
Used in the form called a colon-definition:
: cccc ... ;
Creates a dictionary entry defining cccc as equivalent to the
following sequence of Forth word definitions '...' until the next
';' or ';CODE'.
The compiling process is done by the text interpreter as long as
STATE is non-zero. Other details are that the CONTEXT vocabulary is
set to the CURRENT vocabulary and that words with the precedence bit
set (P) are executed rather than being compiled.
; P,C,L0
Terminate a colon-definition and stop further compilation. Compiles
the run-time ;S.
;CODE P,C,L0
Used in the form:
: cccc .... ;CODE
assembly mnemonics Stop compilation and terminate a new defining
word cccc by compiling (;CODE). Set the CONTEXT vocabulary to
ASSEMBLER, assembling to machine code the following mnemonics.
When cccc later executes in the form:
cccc nnnn
the word nnnn will be created with its execution proceedure given by
the machine code following cccc.
That is, when nnnn is executed, it does so by jumping to the code
after nnnn. An existing defining word must exist in cc prior to
;CODE
;S P,L0
Stop interpretation of a screen.
;S is also the run-time word compiled at the end of a
colon-definition which returns execution to the calling proceedure.
< n1 n2 --- f L0
Leave a true flag if n1 is less than n2; otherwise leave a false
flag.
<# L0
Setup for pictured numeric output formatting using the words:
<# # #S SIGN #>
The conversion is done on a double number producing
text at PAD.
<BUILDS C,L0
Used within a colon-definition:
: cccc <BUILDS ...
DOES> ... ;
Each time cccc is executed, <BUILDS defines a new word with a
high-level execution proceedure. Executing cccc in the form:
cccc nnnn
uses <BUILDS to create a dictionary entry for nnnn with a call to
the DOES> part for nnnn. When nnnn is later executed, it has the
address of its parameter area on the stack and executes the words
after DOES> in cccc. <BUILDS and DOES> allow runtime proceedures to
written in high-level rather than in assembler code (as required by
;CODE).
= n1 n2 --- f L0
Leave a true flag if n1=n2; otherwise leave a false flag.
> n1 n2 --- f L0
Leave a true flag if n1 is greater than n2; otherwise a false flag.
>R n --- C,L0
Remove a number from the computation stack and place as the most
accessable on the return stack. Use should be balanced with R> in
the same definition.
? addr -- L0
Print the value contained at the address in free format according to
the current base.
?COMP
Issue error message if not compiling.
?CSP
Issue error message if stack position differs from value saved in
CSP.
ERROR f n --
Issue an error message number n, if the boolean flag is true.
?EXEC
Issue an error message if not executing.
?LOADING
Issue an error message if not loading
?PAIRS n1 n2 --
Issue an error message if n1 does not equal n2. The message
indicates that compiled conditionals do not match.
?STACK
Issue an error message is the stack is out of bounds. This
definition may be installation dependent.
?TERMINAL --- f
Perform a test of the terminal keyboard for actuation of the break
key. A true flag indicates actuation.
This definition is installation dependent.
@ addr --- n L0
Leave the 16 bit contents of address.
ABORT L0
Clear the stacks and enter the execution state. Return control to
the operators terminal, printing a message appropriate to the
installation.
ABS n --- u L0
Leave the absolute value of n as u.
AGAIN addr n --- (compiling) P,C2,L0
Used in a colon-definition in the form:
BEGIN ... AGAIN
At run-time, AGAIN forces execution to return to corresponding
BEGIN.
There is no effect on the stack. Execution cannot leave this loop
(unless R> DROP is executed one level below).
At compile time, AGAIN compiles BRANCH with an offset from HERE to
addr. n is used for compile-time error checking.
ALLOT n --- L0
Add the signed number to the dictionary pointer DP. May be used to
reserve dictionary space or re-origin memory. n is with regard to
computer address type (byte or word).
AND n1 n2 --- n2 L0
Leave the bitwise logical and of n1 and n2 as n3.
B/BUF --- n
This constant leaves the number of bytes per disc buffer, the byte
count read from disc by BLOCK.
B/SCR --- n
This constant leaves the number of blocks per editing screen. By
convention, an editing screen is 1O24 bytes organized as 16 lines of
64 characters each.
BACK addr --
Calculate the backward branch offset from HERE to addr and compile
into the next available dictionary memory address.
BASE --- addr U,L0
A user variable containing the current number base used for input
and output conversion.
BEGIN --- addr n (compiling) P,L0
Occurs in a colon-definition in form:
BEGIN ... UNTIL
BEGIN ... AGAIN
BEGIN ... WHILE ... REPEAT
At run-time, BEGIN marks the start of a sequence that may be
repetitively executed. It serves as a return point from the
corresponding UNTIL, AGAIN or REPEAT. When executing UNTIL, a return
to BEGIN will occur if the top of the stack is false;
for AGAIN and REPEAT a return to BEGIN always occurs.
At compile time BEGIN leaves its return address and n for compiler
error checking.
BL --- c
A constant that leaves the ascii value for "blank".
BLANKS addr count --
Fill an area of memory beginning at addr with blanks.
BLK --- addr U,L0
A user variable containing the block number being interpreted. If
zero, input is being taken from the terminal input buffer.
BLOCK n --- addr L0
Leave the memory address of the block buffer containing block n. If
the block is not already in memory, it is transferred from disc to
which ever buffer Was least recently written. If the block occupying
that buffer has been marked as updated, it is rewritten to disc
before block n is read into the buffer. See also BUFFER, R/W UPDATE
FLUSH
BLOCK-READ
BLOCK-WRITE
These are the preferred names for the installation dependent code to
read and write one block to the disc.
BRANCH C2,L0
The run-time proceedure to unconditionally branch. An in-line offset
is added to the interpretive pointer IP to branch ahead or back.
BRANCH is compiled by ELSE, AGAIN, REPEAT.
BUFFER n --- addr
Obtain the next memory buffer, assigning it to block n. If the
contents of the buffer is marked as updated, it is written to the
disc The block is not read from the disc.
The address left is the first cell within the buffer for data
storage.
C! b addr ---
Store 8 bits at address. On word addressing computers, further
specification is necessary regarding byte addressing.
C, b ---
Store 8 bits of b into the next available dictionary byte, advancing
the dictionary pointer. This is only available on byte addressing
computers, and should be used with caution on byte addressing mini-
computers.
C@ addr --- b
Leave the 8 bit contents of memory address. On word addressing
computers, further specification is needed regarding byte
addressing.
CFA pfa --- cfa
Convert the parameter field address of a definition to its code
field address.
CMOVE from to count --
Move the specified quantity of bytes beginning at address from to
address to. The contents of address from is moved first proceeding
toward high memory. Further specification is necessary on word
addressing computers.
COLD
The cold start proceedure to adjust the dictionary pointer to
the minimum standard and restart via ABORT.
May be called from the terminal to remove application programs and
restart.
COMPILE C2
When the word containing COMPILE executes, the execution address of
the word following COMPILE is copied (compiled) into the dictionary.
This allows specific compilation situations to be handled in
addition to simply compiling an execution address (which the
interpreter already does).
CONSTANT n --- L0
A defining word used in the form:
n CONSTANT cccc
to create word cccc, with its parameter field containing n. When
cccc is later executed, it will push the value of n to the stack.
CONTEXT --- addr U,L0
A user variable containing a pointer to the vocabulary within which
dictionary searches will first begin.
COUNT addr1 --- addr2 n L0
Leave the byte address addr2 and byte count n of a message text
beginning at address addr1. It is presumed that the first byte at
addr1 contains the text byte count and the actual text starts with
the second byte.
Typically COUNT is followed by TYPE.
CR L0
Transmit a carriage return and line feed to the selected output
device.
CREATE
A defining word used in the form:
CREATE cccc
by such words as CODE and CONSTANT to create a dictionary header for
a Forth definition. The code field contains the address of the words
parameter field. The new word is created in the CURRENT vocabulary.
CSP ---- addr U
A user variable temporarily storing the stack pointer position, for
compilation error checking.
D+ d1 d2 --- dsum
Leave the double number sum of two double numbers.
D+- d1 n --- d2
Apply the sign of n to the double number d1, leaving it as d2.
D. d --- L1
Print a signed double number from a 32 bit two's complement value.
The high-order l6 bits are most accessable on the stack. Conversion
is performed according to the current BASE. A blank follows.
Pronounced D-dot.
D.R d n ---
Print a signed double number d right aligned in a field n characters
wide.
DABS d --- ud
Leave the absolute value ud of a double number.
DECIMAL L0
Set the numeric conversion BASE for decimal input-output.
DEFINITIONS L1
Used in the form:
cccc DEFINITIONS
Set the CURRENT vocabulary to the CONTEXT vocabulary. In the
example, executing vocabulary name cccc made it the CONTEXT
vocabulary and executing DEFINITIONS made both specify vocabulary
cccc.
DIGIT c n1 --- n2 tf (ok) c n1 --- ff (bad)
Converts the ascii character c (using base n1) to its binary
equivalent n2, accompanied by a true flag. If the conversion is
invalid, leaves only a false flag.
DLIST
List the names of the dictionary entries in the CONTEXT vocabulary.
DLITERAL d --- d (executing) d --- (compiling) P
If compiling, compile a stack double number into a literal. Later
execution of the definition containing the literal will push it to
the stack. If executing, the number will remain on the stack.
DMINUS d1 --- d2
Convert d1 to its double number two's complement.
DO n1 n2 --- (execute)
addr n --- (compile) P,C2,L0
Occurs in a colon-definition in form:
DO ... LOOP
DO ... +LOOP
At run time, DO begins a sequence with repetitive execution
controlled by a loop limit n1 and an index with initial value n2. DO
removes these from the stack. Upon reaching LOOP the index is
incremented by one.
Until the new index equals or exceeds the limit, execution loops
back to just after DO; otherwise the loop parameters are discarded
and execution continues ahead. Both n1 and n2 are determined at
run-time and may be the result of other operations.
Within a loop 'I' will copy the current value of the index to the
stack. See I, LOOP, +LOOP, LEAVE.
When compiling within the colon definition, DO compiles (DO), leaves
the following address addr and n for later error checking.
DOES> L0
A word which defines the run-time action within a high-level
defining word. DOES> alters the code field and first parameter of
the new word to execute the sequence of compiled word addresses
following DOES>. Used in combination with <BUILDS. When the DOES>
part executes it begins with the address of the first parameter of
the new word on the stack. This allows interpretation using this
area or its contents. Typical uses include the Forth assembler,
multidimensional arrays, and compiler generation.
DP ---- addr U,L
A user variable, the dictionary pointer, which contains the address
of the next free memory above the dictionary. The value may be read
by HERE and altered by ALLOT.
DPL ---- addr U,L0
A user variable containing the number of digits to the right of the
decimal on double integer input. It may also be used hold output
column location of a decimal point, in user generated formating. The
default value on mingle number input is -1.
DR0
DR1
Installation dependent commands to select disc drives, by presetting
OFFSET. The contents of OFFSET is added to the block number in BLOCK
to allow for this selection. Offset is suppressed for error text so
that is may always originate from drive 0.
DROP n --- L0
Drop the number from the stack.
DUMP addr n --- L0
Print the contents of n memory locations beginning at addr. Both
addresses and contents are shown in the current numeric base.
DUP n --- n n L0
Duplicate the value on the stack.
.
ELSE addr1 n1 --- addr2 n2
(compiling) P,C2,L0
Occurs within a colon-definition in the form:
IF ... ELSE ... ENDIF
At run-time, ELSE executes after the true part following IF. ELSE
forces execution to skip over the following false part and resumes
execution after the ENDIF. It has no stack effect.
At compile-time ELSE emplaces BRANCH reserving a branch offset,
leaves the address addr2 and n2 for error testing. ELSE also
resolves the pending forward branch from IF by calculating the
offset from addr1 to HERE and storing at addr1.
EMIT c --- L0
Transmit ascii character c to the selected output device. OUT is
incremented for each character output.
EMPTY-BUFFERS L0
Mark all block-buffers as empty, not necessarily affecting the
contents.
Updated blocks are not written to the disc. This is also an
initialization proceedure before first use of the disc.
ENCLOSE addr1 c -- addr1 n1 n2 n3
The text scanning primitive used by WORD. From the text address
addr1 and an ascii delimiting character c, is determined the byte
offset to the first non-delimiter character n1, the offset to the
first delimiter after the text n2, and the offset to the first
character not included.
This proceedure will not process past an ascii 'null', treating it
as an unconditional delimiter.
END P,C2,L0
This is an 'alias' or duplicate definition for UNTIL.
ENDIF addr n --- (compile) P,CO,L0
Occurs in a colon-definition in form:
IF ... ENDIF
IF ... ELSE ... ENDIF
At run-time, ENDIF serves only as the destination of a forward
branch from IF or ELSE. It marks the conclusion of the conditional
structure. THEN is another name for ENDIF. Both names are supported
in fig-FORTH. See also IF and ELSE.
At compile-time, ENDIF computes the forward branch offset from addr
to HERE and stores it at addr. n is used for error tests.
ERASE addr n --
Clear a region of memory to zero from addr over n addresses.
ERROR line --- in blk
Execute error notification and restart of system. WARNING is first
examined. If 1, the text of line n, relative to screen 4 of drive O
is printed. This line number may be positive or negative, and beyond
just screen 4. If WARNING=O, n is just printed as a message number
(non disc installation). If WARNING is -l, the definition (ABORT) is
executed, which executes the system ABORT. The user may cautiously
modify this execution by altering (ABORT).
fig-FORTH saves the contents of IN and BLK to assist in determining
the location of the error. Final action is execution of QUIT.
EXECUTE addr -
Execute the definition whose code field address is on the stack. The
code field address is also called the compilation address.
EXPECT addr count --- L0
Transfer characters from the terminal to address, until a "return"
or the count of characters have been received. One or more nulls are
added at the end of the text.
FENCE --- addr U
A user variable containing an address below which FORGETting is
trapped. To forget below this point the user must alter the contents
of FENCE.
FILL addr quan b --
Fill memory at the address with the specified quantity of bytes b.
FIRST --- n
A constant that leaves the address of the first (lowest) block
buffer.
FLD --- addr U
A user variable for control of number output field width. Presently
unused in fig-FORTH.
FORGET E,L0
Executed in the form:
FORGET cccc
Deletes definition named cccc from the dictionary with all entries
physically following it. In fig-FORTH, an error message will occur
if the CURRENT and CONTEXT vocabularies are not currently the same.
FORTH P,L1
The name of the primary vocabulary.
Execution makes FORTH the CONTEXT vocabulary. Until additional user
vocabularies are defined, new user definitions become a part of
FORTH. FORTH is immediate, so it will execute during the creation of
a colon-definition, to select this vocabulary at compile time.
HERE --- addr L0
Leave the address of the next available dictionary location.
HEX L0
Set the numeric conversion base to sixteen (hexadecimal).
HLD --- addr L0
A user variable that holds the address of the latest character of
text during numeric output conversion.
HOLD c --- L0
Used between <# and #> to insert an ascii character into a pictured
numeric output string.
e.g. 2E HOLD will place a decimal point.
I --- n C,L0
Used within a DO-LOOP to copy the loop index to the stack. Other use
is implementation dependent.
See R.
ID. addr --
Print a definition's name from its name field address.
IF f --- (run-time) -- addr n
(compile) P,C2,L0
Occurs is a colon-definition in form:
IF (tp) ... ENDIF .
IF (tp) ... ELSE (fp) ... ENDIF
At run-time, IF selects execution based on a boolean flag. If f is
true (non-zero), execution continues ahead thru the true part. If f
is false (zero), execution skips till just after ELSE to execute
the false part. After either part, execution resumes after ENDIF.
ELSE and its false part are optional.; if missing, false execution
skips to just after ENDIF..
At compile-time IF compiles 0BRANCH and reserves space for an offset
at addr. addr and n are used later for resolution of the offset and
error testing.
IMMEDIATE
Mark the most recently made definition so that when encountered at
compile time, it will be executed rather than being compiled. i.e.
the precedence bit in its header is set.
This method allows definitions to handle unusual compiling
situations, rather. than build them into the fundamental compiler.
The user may force compilation of an immediate definition by
preceeding it with [COMPILE],
IN --- addr L0
A user variable containing the byte offset within the current input
text buffer (terminal or disc) from which the next text will be
accepted. WORD uses and moves the value of IN.
INDEX from to --
Print the first line of each screen over the range from, to. This is
used to view the comment lines of an area of text on disc screens.
INTERPRET
The outer text interpreter which sequentially executes or compiles
text from the input stream (terminal or disc) depending on STATE. If
the word name cannot be found after a search of CONTEXT and then
CURRENT it is converted to a number according to the current base.
That also failing, an error message echoing the name with a " ?"
will be given.
Text input will be taken according to the convention for WORD. If a
decimal point is found as part of a number, a double number value
will be left. The decimal point has no other purpose than to force
this action.
See NUMBER.
KEY --- c L0
Leave the ascii value of the next terminal key struck.
LATEST --- addr
Leave the name field address of the topmost word in the CURRENT
vocabulary.
LEAVE C,L0
Force termination of a DO-LOOP at the next opportunity by setting
the loop limit equal to the current value of the index. The index
itself remains unchanged, and execution proceeds normally until LOOP
or +LOOP is encountered.
LFA pfa --- lfa
Convert the parameter field address of a dictionary definition to
its link field address.
LIMIT ---- n
A constant leaving the address just above the highest memory
available for a disc buffer. Usually this is the highest system
memory.
LIST n --- L0
Display the ascii text of screen n on the selected output device.
SCR contains the screen number during and after this process.
LIT --- n C2,L0
Within a colon-definition, LIT is automatically compiled before each
16 bit literal number encountered in input text. Later execution of
LIT causes the contents of the next dictionary address to be pushed
to the stack.
LITERAL n --- (compiling) P,C2,L0
If compiling, then compile the stack value n as a 16 bit literal.
This definition is immediate so that it will execute during a colon
definition. The intended use is:
: xxx [ calculate ] LITERAL ;
Compilation is suspended for the compile time calculation of m
value.
Compilation is resumed and LITERAL compiles this value.
LOAD n --- L0
Begin interpretation of screen n.
Loading will terminate at the end of the screen or at ;S. See ;S and
-->.