Word Glossary of the F-PC Forth Vocabulary by Tom Zimmer Forward This glossary contains entries for all of the words in F-PC's FORTH vocabulary, broken into two major sections. The first section contains lists of words broken into catagories. The second section contains the same words grouped in a single alphabetized list. The alphabetized list includes a stack picuture, the filename where the words source can be found, and descriptive text explaining the function of each word in the list. The catagory section contains only a list of words in a catagory, and a stack picture for each word. Glossary Format The format of this glossary uses abreviated character sequences to describe a series of words, this is done primarily for brevity. Here is a list of the abreviations used in this glossary. Symbol definitions used in this Glossary n1 16 bit signed number d1 32 bit signed number u1 16 bit unsigned number ud1 32 bit unsigned number f1 boolean flag c1 8 bit character nfa Name field address cfa code field address lfa link field address seg 16 bit absolute segment number offset 16 bit offset into a segment A character from the input stream. A Forth word, comes from the input stream. A sequence of ascii characters, comes from the input stream. Standard DOS file specification | seperator for stack parameters and input stream parameters. Glossary entries in the alphabetized section are in the following format: Example: WORD ( c1 | --- a1 ) FILE_WHERE_FOUND DESCRIPTIVE_TEXT: The character c1 is passed into WORD on the data stack, is passed to WORD from the input stream, and a1 is returned by WORD on the data stack. ---------------------- Operators by Catagory ------------------------- This section contains the list of available word separated into catagory or use. This section is most useful when you know what you want to do but don't know what the word name is that does the function you want. the words of F-PC have been broken into catagories, here is a list of those catagories: Catagory Titles Compiling and Allocation words Conditional Test & Compilation words Defining and Related Words Dictionary Field Manipulation words DOS Interface words File Manipulation words Math words Memory words for VARIABLES and ARRAYS in CODE space Memory words for VALUES Memory Manipulation words for External memory and Ports Menu Building words Mode Control and Associated words Number Conversion & Output words Printing Related words Stack Manipulation words Status Testing and Error Condition Handling words String Manipulation and Output words System words Terminal Input & Output words Timing Related words Utility words VIEW Manipulation words Window Control words Here then is the words contained in each catagory along with their stack picture. For detailed information on a particular function examine its entry in the alphabetized section. Compiling and Allocation words ALIGN ( --- ) ALLOT ( n1 --- ) ASCII ( | --- c1 ) C, ( c1 --- ) DEFERS ( --- ) DLITERAL ( d# -- ) DP ( --- a1 ) LITERAL ( n1 -- ) NEWINFO ( --- ) X, ( n1 --- ) X," ( | " --- ) X>"BUF ( --- "BUF ) XC, ( n1 --- ) XDP ( --- a1 ) XDPSEG ( --- a1 ) XHERE ( --- seg n1 ) Y! ( n1 a1 --- ) Y, ( n1 --- ) Y@ ( a1 --- n1 ) YC! ( n1 a1 --- ) YC@ ( a1 --- n1 ) YCOUNT ( a1 --- a2 n1 ) YCSET ( byte a1 --- ) YDP ( --- a1 ) YHASH ( yname vocaddr --- thread ) YHERE ( --- a1 ) YS: ( a1 --- yseg a1 ) YSEG ( -- a1 ) YSTART ( --- a1 ) [ ( -- ) ['] ( | -- ) [COMPILE] ( | -- ) \ ( -- ) \S ( n1 --- ) \UNLESS ( | --- ) ] ( -- ) ` ( command --- ) Conditional Test & Compilation words #ELSE ( --- ) #ENDIF ( --- ) #THEN ( --- ) #IF ( f1 --- ) +LOOP ( n1 --- ) 0< ( n1 --- f1 ) 0<= ( n1 --- f1 ) 0<> ( n1 --- f1 ) 0= ( n1 --- f1 ) 0> ( n1 --- f1 ) 0>= ( n1 --- f1 ) < ( n1 n2 --- f1 ) <= ( n1 n2 --- f1 ) <> ( n1 n2 --- f1 ) = ( n1 n2 --- f1 ) > ( n1 n2 --- f1 ) >= ( n1 n2 --- f1 ) >MARK ( --- a1 ) >RESOLVE ( a1 --- ) ?MARK ( --- f1 a1 ) ?>RESOLVE ( f1 a1 --- ) ?BRANCH ( f1 --- ) ?DO ( limit start --- ) ?EXIT ( f1 --- ) ?LEAVE ( f1 --- ) ?UNTIL ( f1 --- ) ?WHILE ( f1 --- ) AGAIN ( --- ) AND ( n1 n2 --- n3 ) BEGIN ( --- ) BETWEEN ( n1 n2 n3 --- f1 ) BOUNDS ( a1 n1 --- a2 a3 ) BRANCH ( --- ) CASE ( -- ) D0= ( d1 --- f1 ) D< ( d1 d2 --- f1 ) D= ( d1 d2 --- f1 ) D> ( d1 d2 --- f1 ) DMAX ( d1 d2 --- d3 ) DMIN ( d1 d2 --- d3 ) DNEGATE ( d1 d2 --- d3 ) DO ( limit start -- ) DU< ( d1 d2 --- f1 ) ELSE ( --- ) ENDCASE ( -- ) ENDOF ( -- ) EXIT ( --- ) FALSE ( --- f1 ) I ( --- n1 ) IF ( f1 -- ) J ( --- n1 ) LEAVE ( -- ) LOOP ( -- ) NOT ( n1 --- n2 ) NRESOLVE ( 0 n1 n2 ... n -- ) OF ( n1 n2 -- n1 ) ( n1 n1 -- ) OR ( n1 n2 --- n3 ) RECURSE ( -- ) RECURSIVE ( -- ) immediate REPEAT ( -- ) THEN ( -- ) TRUE ( --- f1 ) U< ( n1 n2 --- f1 ) U<= ( un1 un2 --- f1 ) U> ( n1 n2 --- f1 ) U>= ( n1 n2 --- f1 ) UNDO ( --- ) UNNEST ( --- ) UNTIL ( f1 -- ) WHILE ( f1 -- ) WITHIN ( n1 n2 --- f1 ) XOR ( n1 n2 --- n3 ) Defining and Related Words 2CONSTANT ( d1 | --- ) 2VARIABLE ( | --- ) : ( | ... ; --- ) ; ( --- ) ;CODE ( --- ) ;USES ( --- ) ALIAS ( a1 | --- ) ANEW ( | --- ) CODE ( | --- ) CONSTANT ( n1 | -- ) CREATE ( | -- ) DEFER ( | -- ) DEFINED ( -- here 0 | a1 true ) DEFINITIONS ( -- ) DOES> ( -- ) EXEC: ( n1 -- ) EXECUTE ( a1 --- ) HEADER ( | -- ) HIDE ( -- ) IMMEDIATE ( -- ) IS ( cfa -- ) LABEL ( --- a1 ) PERFORM ( a1 --- ) REVEAL ( -- ) VALUE ( n1 | --- ) VARIABLE ( | -- ) WIDTH ( --- a1 ) Dictionary Field Manipulation words .ID ( nfa --- ) >BODY ( cfa --- pfa ) >LINK ( cfa --- lfa ) >NAME ( cfa --- nfa ) >VIEW ( cfa --- vfa ) BODY> ( cfa --- cfa ) L>NAME ( lfa -- nfa ) LINK> ( lfa -- cfa ) N>LINK ( nfa -- lfa) NAME> ( nfa -- cfa ) NAME>PAD ( A1 --- PAD ) TRAVERSE ( a1 direction -- addr' ) VIEW> ( vfa -- cfa ) DOS Interface words A: ( --- ) B: ( --- ) C: ( --- ) ALLOC ( n1 --- n2 n3 n4 ) CD ( | --- ) CHDIR ( | --- ) COMSPEC$ ( --- a1 ) COMSPEC@ ( --- ) COPY ( --- ) D: ( --- ) DEALLOC ( n1 --- f1 ) DEL ( --- ) DIR ( --- ) DOS-LINE ( --- a1 ) DOS>TIB ( --- ) DOSVER ( --- n1 ) DRIVE? ( --- n1 ) ENVSIZE ( --- n1 ) EVSEG ( --- n1 ) FINDFIRST ( string --- f1 ) FINDNEXT ( --- f1 ) ME$ ( --- a1 ) ME@ ( --- ) PATH$ ( --- a1 ) PATH@ ( --- ) PATHHNDL ( --- a1 ) PATHSET ( handle --- f1 ) REN ( --- ) RENAME ( | --- ) SELECT ( n1 --- ) SET-DTA ( a1 --- ) SETBLOCK ( seg size --- f1 ) SYS ( | command --- ) File Manipulation words !HCB ( a1 | --- ) $>HANDLE ( a1 handle --- ) $HOPEN ( a1 --- f1 ) $PFILE ( a1 --- f1 ) $FLOAD ( a1 --- f1 ) .CURFILE ( --- ) .FILE ( --- ) .FILES ( --- ) .LOADED ( --- ) .SEQHANDLE ( --- ) >ATTRIB ( handle --- attrib-a1 ) >LINE ( n1 --- ) >NAM ( handle --- name-string-a1 ) >HNDLE ( handle --- handle-a1 ) ?DRIVE.EXTRACT ( handle --- drive-n1 ) ?DRIVE.PREPEND ( drive-n1 handle --- ) ?FILEOPEN ( --- ) ?PREPEND.VPATH ( a1 --- a1 ) B/HCB ( --- n1 ) CHARREAD ( --- c1 ) CLOSE ( --- ) CLR-HCB ( a1 --- ) CURPOINTER ( handle --- d1-current ) DEFEXT ( --- a1 ) ENDFILE ( handle --- double-end ) EXHREAD ( a1 n1 hndl seg1 --- n2 ) EXHWRITE ( a1 n1 hndl seg1 --- ) FCB>HANDLE ( a1 a2 --- ) FILE ( | --- ) FILE>TIB ( a1 --- ) FILEPOINTER ( --- a1 ) FILES ( --- ) FILLBUFF ( --- ) FILLTIB ( --- ) FL ( | --- ) FLHNDL ( --- a1 ) FLOAD ( | --- ) GET_ALINE ( --- ) GFL ( | --- ) HANDLE ( | --- ) HANDLE>EXT ( a1 --- a2 ) HCLOSE ( handle --- f1 ) HCREATE ( handle --- error-code ) HDELETE ( handle --- f1 ) HNDLS ( --- a1 ) HOPEN ( handle --- error-code ) HREAD ( a1 n1 handle --- n2 ) HRENAME ( handle1 handle2 --- return-code ) HWRITE ( a1 n1 handle --- n2 ) IBLEN ( --- n1 ) IBRESET ( --- ) INCLUDE ( | --- ) LINEREAD ( --- a1 ) LOAD ( n1 --- ) LOADED, ( --- ) LOADER ( --- ) LOADING ( --- a1 ) LOADSTAT ( --- ) MOVEPOINTER ( d1-offset handle --- ) NEEDS ( | --- ) NEWFILE ( | --- ) OBLEN ( --- n1 ) OK ( --- ) OPEN ( | --- ) OUTBUF ( --- a1 ) PREPEND.PATH( handle --- f1 ) RWERR ( --- a1 ) RWMODE ( --- a1 ) SAVEPOINTER ( --- ) SEEK ( d1 --- ) SEQDOWN ( --- ) SEQHANDLE+ ( --- a1 ) SEQHANDLE ( --- a1 ) SEQUP ( --- ) Math words * ( n1 n2 --- n3 ) */ ( n1 n2 n3 --- quotient ) */MOD ( n1 n2 n3 --- n4 n5 ) *D ( n1 n2 --- d1 ) + ( n1 n2 --- n3 ) / ( n1 n2 --- n3 ) /MOD ( n1 n2 --- n3 n4 ) 1+ ( n1 --- n2 ) 1- ( n1 --- n2 ) 2* ( n1 --- n2 ) 2+ ( n1 --- n2 ) 2- ( n1 --- n2 ) 2/ ( n1 --- n2 ) 8* ( n1 --- n2 ) D+ ( d1 d2 --- d3 ) D- ( d1 d2 --- d3 ) D2* ( d1 --- d2 ) D2/ ( d1 --- d2 ) DABS ( d1 --- d2 ) M/MOD ( d1 n1 --- rem quot ) MAX ( n1 n2 --- n3 ) MIN ( n1 n2 --- n3 ) MOD ( num den -- modulus ) MU/MOD ( d1 n1 --- rem dquot ) NEGATE ( n1 --- n2 ) U16/ ( n1 --- n2 ) U2/ ( n1 --- n2 ) UM* ( un1 un2 -- ud ) UM/MOD ( ud un --- urem uquot ) Memory words for VARIABLES and ARRAYS in CODE space ! ( n1 a1 --- ) +! ( n1 a1 --- ) , ( n1 --- ) - ( n1 n2 --- n3 ) -1! ( a1 --- ) 0! ( a1 --- ) 2! ( d1 a1 --- ) 2+! ( d1 a1 --- ) 2@ ( a1 --- d1 ) @ ( a1 --- n1 ) @L ( seg a1 --- n1 ) @REL>ABS ( cfa --- a1 ) BLANK ( a1 n1 --- ) C! ( c1 a1 --- ) C+! ( c1 a1 --- ) C@ ( a1 --- c1 ) CAPS-COMP ( a1 a2 n1 --- f1 ) CMOVE ( a1 a2 n1 --- ) CMOVE> ( a1 a2 n1 --- ) COMP ( a1 a2 n1 --- f1 ) COMPARE ( a1 a2 n1 --- f1 ) COUNT ( a1 --- a2 n1 ) CRESET ( n1 a1 --- ) CSET ( n1 a1 --- ) CTOGGLE ( a1 n1 --- ) DECR ( a1 -- ) ERASE ( a1 n1 --- ) EVEN ( -- ) FILL ( a1 n1 c1 --- ) INCR ( a1 -- ) LARGEST ( a1 n1 --- a2 n2 ) LENGTH ( a1 --- a2 n1 ) MOVE ( a1 a2 n1 --- ) OFF ( a1 --- ) ON ( a1 --- ) SCAN ( a1 n1 c1 --- ) SCANW ( a1 w1 w2 --- a2 w3 ) SEARCH ( sadr slen badr blen -- n1 f1 ) SKIP ( a1 n1 c1 --- ) SSEG ( --- a1 ) UPC ( char --- char' ) UPPER ( a1 length --- ) Memory words for VALUES !> ( n1 | --- ) +!> ( n1 | --- ) =: ( n1 | --- ) IS ( cfa --- data-address ) @> ( | --- n1 ) DECR> ( | -- ) INCR> ( | -- ) OFF> ( | --- ) ON> ( | --- ) Memory Manipulation words for External memory and Ports !L ( n1 seg a1 --- ) C!L ( c1 seg a1 --- ) CMOVEL ( sseg sptr dseg dptr cnt -- ) CMOVEL> ( from-seg from-offset to-seg to-offset length --- ) LFILL ( a1 len value --- ) LFILLW ( seg offset byte-len WORD --- ) P! ( n1 port# --- ) P@ ( port# -- n1 ) PARAGRAPH ( offset --- paragraph-in ) PC! ( n1 port# --- ) PC@ ( port# -- n1 ) XALIGN ( --- ) XEVEN ( a1 --- a2 ) Menu Building words ENDMENU ( a1 n1 --- ) MENU ( --- a1 n1 ) MENULINE" ( n1 | --- n1+1 ) NEWMENU ( | --- ) NEWMENUBAR ( | --- ) Mode Control and Associated words AUTOEDITOFF ( --- ) AUTOEDITON ( --- ) AUTOSAVEOFF ( --- ) AUTOSAVEON ( --- ) BACKUPOFF ( --- ) BACKUPON ( --- ) BLANKOFF ( --- ) BLANKON ( --- ) HELPOFF ( --- ) HELPON ( --- ) HIDELINES ( --- ) INITCOLOR ( --- ) INITMONO ( --- ) NOBACKUP ( --- ) RESTORESTATE( --- ) RESTORE_VECTORS ( -- ) SAVESTATE ( --- ) SET_VECTORS ( -- ) SHOWLINES ( --- ) SRCOFF ( --- ) SRCON ( --- ) STATOFF ( --- ) STATON ( --- ) WITHPATH ( --- f1 ) Number Conversion & Output words # ( d1 --- d2 ) #> ( d1 --- a1 n1 ) #S ( d1 --- d2=0 ) (D.) ( d1 --- a1 n1 ) (U.) ( n1 --- a1 n2 ) (UD.) ( d1 --- a1 n1 ) . ( n1 --- ) .R ( n1 n2 --- ) <# ( d1 --- d1 ) ? ( a1 --- ) BASE ( --- a1 ) CONVERT ( +d1 a1 --- +d2 a2 ) D. ( d1 --- ) D.M.Y ( --- ) D.R ( d1 n1 --- ) DECIMAL ( --- ) DIGIT ( char base --- n1 f1 ) DOUBLE? ( --- f1 ) DPL ( --- a1 ) H. ( u -- ) HEX ( --- ) HLD ( --- a1 ) HOLD ( c1 --- ) M/D/Y ( --- ) NUMBER ( a1 --- d1 ) NUMBER? ( a1 --- d1 f1 ) OCTAL ( --- ) S>D ( n1 --- d1 ) SIGN ( n1 --- ) U*D ( n1 n2 --- d1 ) U. ( n1 --- ) U.R ( n1 n2 --- ) UD. ( d1 --- ) UD.R ( d1 n1 --- ) Y-M-D ( --- ) Printing Related words FILEPRINT ( | --- ) FPRINT ( file_specs --- ) IBM-PROPRINT ( --- ) PCLOSE ( --- ) PDOS ( a1 drive# --- f1 ) PEMIT ( c1 --- ) PFILE ( | --- ) PR-STATUS ( n1 --- n2 ) PRINT ( | -- ) PRINTING ( --- a1 ) PRNHNDL ( --- a1 ) TELETYPE ( --- ) TOPRINTER ( --- ) Stack Manipulation words -ROT ( n1 n2 n3 --- n3 n1 n2 ) .S ( --- ) 2>R ( n1 n2 --- ) 2DROP ( d1 --- ) 2DUP ( d1 --- d1 d1 ) 2OVER ( d1 d2 --- d1 d2 d1 ) 2R> ( --- n1 n2 ) 2R@ ( --- n1 n2 ) 2ROT ( d1 d2 d3 --- d2 d3 d1 ) 2SWAP ( d1 d2 --- d2 d1 ) 3DROP ( n1 n2 n3 --- ) 3DUP ( n1 n2 n3 --- n1 n2 n3 n1 n2 n3 ) 4DUP ( d1 d2 --- d1 d2 d1 d2 ) >R ( n1 --- ) ?DNEGATE ( d1 d2 --- d3 ) ?DUP ( n1 --- n1 n1<>0 | n1=0) ?NEGATE ( n1 n2 --- n3 ) ABS ( n1 --- n2 ) DEPTH ( -- n1 ) DROP ( n1 --- ) DUP ( n1 --- n1 n1 ) DUP>R ( n1 --- n1 ) FLIP ( n1 --- n2 ) NIP ( n1 n2 --- n2 ) OVER ( n1 n2 --- n1 n2 n1 ) PICK ( n1 --- n2 ) R> ( --- n1 ) R>DROP ( --- ) R@ ( --- n1 ) RESTORE> ( --- ) ROLL ( n1 --- n2 ) ROT ( n1 n2 n3 --- n2 n3 n1 ) RP! ( a1 --- ) RP0 ( --- a1 ) RP@ ( --- a1 ) SAVE!> ( n1 --- ) SAVE> ( --- ) SP! ( a1 --- ) SP0 ( --- a1 ) SP@ ( --- a1 ) SPLIT ( n1 --- n2 n3 ) SWAP ( n1 n2 --- n2 n1 ) TUCK ( n1 n2 --- n2 n1 n2 ) Status Testing and Error Condition Handling words ?COMP ( --- ) ?CONDITION ( f1 --- ) ?CSP ( --- ) ?DOINGMAC ( --- f1 ) ?DOSIO ( --- f1 ) ?ENOUGH ( n1 --- ) ?ERROR ( a1 n1 f1 --- ) ?EXEC ( --- ) ?LOADED ( | --- ) ?MISSING ( f1 --- ) ?STACK ( --- ) ABORT ( --- ) ABORT" ( f1 | " --- ) CSP ( --- a1 ) STATUS ( -- ) String Manipulation and Output words " ( | " --- ) "" ( | " --- ) ">$ ( a1 n1 --- a2 ) "BUF ( --- a1 ) "ENVFIND ( a1 n1 --- n2 f1 ) "HEADER ( a1 --- ) $>EXT ( a1 n1 a2 --- ) $>HANDLE ( a1 handle --- ) $>TIB ( a1 --- ) ," ( | --- ) -TRAILING ( a1 n1 --- a2 n2 ) ." ( | " --- ) .( ( | ) --- ) .BOX" ( | " --- ) .COMMENT: ( | ....COMMENT; --- ) /STRING ( a1 len n1 --- addr' len' ) ?CR ( --- ) ?LINE ( n1 --- ) ?PAGE ( --- ) ?UPPERCASE ( a1 --- a1 ) COMMENT: ( --- ) PAD ( --- a1 ) PAGE ( --- ) PARSE ( a1 --- a2 n1 ) PLACE ( from count to --- ) System words !CSP ( --- ) !USED ( --- ) #CODESEGS ( --- n1 ) #HEADSEGS ( --- n1 ) #LISTSEGS ( --- n1 ) #THREADS ( --- n1 ) #TIB ( --- a1 ) #USER ( --- a1 ) #VOCS ( --- a1 ) ' ( | --- cfa ) 'DOCOL ( --- a1 ) 'TIB ( --- a1 ) 'WORD ( --- a1 ) ( ( --- ) (FIND) ( here lfa --- cfa flag | here flase ) (FRGET) ( code-addr relative-link-addr --- ) ,CALL ( --- ) ,JUMP ( --- ) ,VIEW ( --- ) .COMPSTAT ( --- ) .COMSPEC ( --- ) .DATE ( --- ) .ELAPSED ( --- ) .ENV ( --- ) .FREE ( --- ) .HELLO ( --- ) .ME ( --- ) .PATH ( --- ) .STATUS ( --- ) .TIME ( --- ) .USED ( --- ) .VOCWORDS ( --- ) /* ( | ... */ --- ) 0COMPILER ( --- ) >NEST ( --- a1 ) >NEXT ( --- a1 ) >PRE ( --- ) ?CS: ( --- seg ) ?ES: ( --- seg ) ?FILLBUFF ( --- ) ?VMODE ( --- ) A; ( --- ) ADEBUG ( a1 --- ) ASSEMBLER ( --- ) ATBL ( --- a1 ) AUTOSAVE-MINUTES ( --- n1 ) BDOS ( n1 func# --- a1 ) BGSTUFF ( --- ) BOOT ( --- ) BUG ( --- ) BYE ( --- ) BYTFUNC ( --- ) CNHASH ( cfa -- ya ) CNSRCH ( cfa ya maxya -- nfa failf ) CNT ( --- a1 ) COLD ( -- ) COMPILE ( | -- ) CONHNDL ( --- a1 ) CONTEXT ( --- a1 ) CONTROL ( -- n1 ) CRASH ( -- ) CURRENT ( --- a1 ) DBG ( | --- ) DEFAULT ( --- ) DEFAULTSTATE( --- ) DIV0FUNC ( -- ) DIV0STRT ( -- ) DIVIDE0 ( status_reg CS IP AX BX CX DX SI BP -- ) DLN ( a1 --- ) DONE? ( n1 -- f1 ) EDITOR ( --- ) EMIT. ( char -- ) END? ( --- a1 ) ENTRY ( --- a1 ) ES0 ( --- a1 ) EXEHCB ( --- a1 ) FIRST ( --- a1 ) FORTH ( --- ) FUDGE ( --- a1 ) GO ( a1 --- ) HASH ( str-addr voc-ptr -- thread ) HDEFAULT ( -- ) HDOS1 ( cx dx fun -- ax cf | err-code 1 ) HERE ( --- a1 ) HIDDEN ( --- ) INITSTUFF ( --- ) INSTALLSTUFF( --- ) INTERPRET ( -- ) LAST ( --- a1 ) LIMIT ( --- a1 ) LINK ( --- a1 ) MAKEDUMMY ( | -- ) MAX.S ( --- a1 ) MAXNEST ( --- n1 ) MEMCHK ( f1 --- ) NO-NAME ( --- ) NOOP ( --- ) OSF ( --- a1 ) OUTPAUSE ( --- ) PAUSE ( --- ) PAUSE-FUNC ( --- ) PRE> ( --- ) PRIOR ( --- a1 ) ROOT ( --- ) RUN ( --- ) SEGSET ( --- ) SEQINIT ( --- ) SETTIB ( a1 --- ) SETYSEG ( --- ) SOURCE ( --- a1 n1 ) SOURCE-PARSE-WRD ( C1 --- A1 N1 ) START ( --- ) STATE ( --- a1 ) SVINIT ( --- ) SVSEG ( --- seg1 ) TOS ( --- a1 ) TOTALWORDS ( --- a1 ) TRIM ( faddr voc-addr -- ) UNBUG ( -- ) UNINSTALLSTUFF ( --- ) UP ( --- a1 ) USER ( --- ) VMODE-VAR ( --- a1 ) VMODE.SET ( --- ) VOC-LINK ( --- a1 ) VOCABULARY ( | -- ) W.NAME ( NFA --- ) WARM ( -- ) WARNING ( --- a1 ) WORD ( C1 --- A1 ) XSEG ( --- a1 ) Terminal Input & Output words #LINE ( --- a1 ) #OUT ( --- a1 ) #PAGE ( --- a1 ) (EMIT) ( c1 --- ) (EXPECT) ( a1 n1 --- ) (KEY) ( --- c1 ) (KEY?) ( --- f1 ) -LINE ( --- ) -TAB ( --- ) >ATTRIB1-8 ( --- ) >BG ( n1 --- ) >BOLD ( --- ) >BOLDBLNK ( --- ) >BOLDUL ( --- ) >BUGN ( --- ) >BUWT ( --- ) >COLOR ( --- ) >FG ( n1 --- ) >IBM ( --- ) >IN ( --- a1 ) >LCD ( --- ) >MONO ( --- ) >NONE ( --- ) >NORM ( --- ) >RDWT ( --- ) >REV ( --- ) >REVBLNK ( --- ) >TYPE ( a1 n1 --- ) >UL ( --- ) ?DARK ( --- ) ?KEYPAUSE ( --- ) ?PRINTER.READY ( --- f1 ) AT ( col row --- ) ATTRIB ( --- a1 ) BACKSPACES ( n1 --- ) BEEP ( --- ) BELL ( --- c1 ) BIG-CURSOR ( --- ) BIOSCHAR ( --- a1 ) BIOSKEY ( --- n1 ) BIOSKEY? ( --- f1 ) BIOSKEYVAL ( --- a1 ) BL ( --- c1 ) BLACK ( --- n1 ) BLACK-ON-WHITE ( --- ) BLUE ( --- n1 ) BROWN ( --- n1 ) BS ( --- c1 ) CLS ( --- ) COLS ( --- n1 ) CONSOLE ( c1 --- ) CR ( --- ) CRLF ( --- ) CROWS ( --- n1 ) CRTAB ( --- ) CURSOR-ON ( --- ) CURSOR-OFF ( --- ) CYAN ( --- n1 ) DARK ( --- ) DKGRAY ( --- n1 ) DTBUF ( --- a1 ) EEOL ( --- ) EMIT ( c1 -- ) EXPECT ( a1 n1 --- ) EXTYPE ( seg a1 n1 --- ) FEMIT ( c1 --- ) FORM-FEED ( --- ) GET-CURSOR ( --- SHAPE ) GREEN ( --- n1 ) IBM--LINE ( -- ) IBM-AT ( col row -- ) IBM-AT? ( --- col row ) KEY ( --- c1 ) KEY? ( --- f1 ) LDUMP ( seg offset len --- ) LMARGIN ( -- a1 ) LTBLUE ( --- n1 ) LTCYAN ( --- n1 ) LTGRAY ( --- n1 ) LTGREEN ( --- n1 ) LTMAGENTA ( --- n1 ) LTRED ( --- n1 ) MAGENTA ( --- n1 ) MED-CURSOR ( --- ) NORM-CURSOR ( --- ) QTYPE ( A1 N1 --- ) QUERY ( --- ) RED ( --- n1 ) RMARGIN ( -- a1 ) ROWS ( --- n1 ) SET-CURSOR ( N1 --- ) SLOW ( --- ) SPACE ( --- ) SPACES ( n1 --- ) SPAN ( --- a1 ) SPCS ( --- a1 ) TAB ( -- ) TABSIZE ( --- a1 ) TIB ( --- a1 ) TILLKEY ( n1 --- ) TYPE ( a1 n1 --- ) TYPESEG ( --- a1 ) VIDEO-SEG ( --- a1 ) VIDEO-TYPE ( a1 n1 --- ) WHITE ( --- n1 ) WHITE-ON-BLACK ( --- ) YELLOW ( --- n1 ) Timing Related words 10TH-ELAPSED ( --- n1 ) B>SEC ( d1 --- n1 ) B>T ( d1 --- d2 ) FORM-DATE ( d1 --- a1 ) FORM-TIME ( d1 --- a1 ) GETDATE ( --- Y MD ) GETTIME ( --- HM Sh ) HOURS ( N1 --- ) MINUTES ( N1 --- ) MS ( n1 --- ) SEC-ELAPSED ( --- N1 ) SECONDS ( N1 --- ) SETDATE ( NM Y --- ) SETTIME ( HM Sh --- ) STIME ( --- a1 ) T>B ( d1 --- d2 ) TENTHS ( N1 --- ) TIME-ELAPSED( --- d1 ) TIME-RESET ( --- ) TIMER ( | forth_commands --- ) TTIME ( --- a1 ) Utility words DEBUG ( | --- ) DEBUGABLE ( --- ) DLN ( a1 --- ) DONE ( --- ) DU ( a1 -- addr+64 ) DUMP ( a1 len -- ) ED ( --- ) EDIT ( n1 --- ) EMPTY ( --- ) FALLOF ( func | fl_specs --- ) FAST ( --- ) FENCE ( --- a1 ) FIND ( a1 -- cfa flag | a1 false ) FLOOK ( | --- ) FORGET ( | -- ) FSAVE ( | --- ) INDEX ( file_spec --- ) INLINE ( --- ) INSTALL ( --- ) LINEEDITOR ( x y a1 n1 --- f1 ) LISTING ( --- ) MANY ( -- ) MARK ( | -- ) POSTFIX ( --- ) PREFIX ( --- ) QUIT ( -- ) REF ( | --- ) REPAIR ( | --- ) SAVE-EXE ( | --- ) SED ( | filename --- ) SEE ( --- ) THESE ( --- ) TIMES ( N1 -- ) TOTALLINES ( --- a1 ) TURNKEY ( | --- ) UNDEFER ( | -- ) UNEDIT ( --- ) UNINSTALL ( --- ) USED ( | --- ) USEDIN ( | --- ) WORDS ( | -- ) XDUMP ( a1 n1 --- ) XREF ( | --- ) YDUMP ( A1 N1 --- ) VIEW Manipulation words +LINES ( n1 --- ) -1LINE ( --- ) -LINES ( n1 --- ) >VIEWFILE ( cfa --- offset a1 ) >VIEWLINE ( n1 --- ) B ( --- ) HELLO ( --- ) HELP ( | --- ) HELPVIEW ( | --- ) L ( --- ) LIST ( n1 --- ) LL ( | --- ) N ( --- ) SETVIEW ( | --- ) VIEW ( | --- ) VIEWLINES ( n1 n2 --- ) VIEWPATH ( --- a1 ) Window Control words BCR ( --- ) BOX ( left top right bottom --- ) BOX&FILL ( left top right bottom --- ) RECOVERLINE ( n1 --- ) RECOVERSCR ( --- ) RESTSCR ( --- ) SAVESCR ( --- ) -------------------- Function Glossary Aplphabetic ------------------- ! ( n1 a1 --- ) KERNEL1 Store a 16 bit value N1 into the address a1 in the CODE segment. !> ( n1 | -- ) EQUCOLON Store the value n1 on the stack into the body field of . Typically used to modify a VALUE or VARIABLE. May be used on the command line. Used in the form: 10 !> XX where XX is a VALUE or VARIABLE. !CSP ( -- ) KERNEL3 Save the current stack level for later error checking by ?CSP. !HCB ( a1 | --- ) HANDLES Get from the input stream and move it into the handle a1. !L ( n1 seg a1 -- ) KERNEL2 Store the 16 bit value N1 into the FAR address specified by SEG and ADDR. !USED ( --- ) UTILS Stores away the current values of the various segments in F-PC for later comparison with the same values after a compile. Used to determine dictionary space usage. " ( | " -- ) compile time KERNEL3 ( --- a1 n1 ) runtime Compile terminated by a ", into CODE space. Return the address and length of the string at runtime. "" ( | " -- ) compile time KERNEL3 ( --- a1 n1 ) runtime Compile terminated by a ", into LIST space. The string is moved into a CODE space buffer at runtime, the address and length of the buffer are subsequently returned. Only a single buffer is used for these strings, so each "" string must be used before the next "" string is executed. ">$ ( a1 len -- a2 ) KERNEL3 Convert address a1 and length len of a string created with " into a counted string address a2. This word relys on the fact that " really creates counted strings, but converts them to address and length on execution. "BUF ( --- a1 ) KERNEL3 The buffer that is used when returning a "" string at runtime. See also the "" definition above. "ENVFIND ( a1 n1 --- n2 f1 ) ENVIRON Search the environment for the string specified by a1, n1 where A1 is the address of the first character to find, and N1 is the length of the string being searched for. Return a boolean flag TRUE if found, and N2 the offset into the environment where the match occured. "HEADER ( a1 --- ) KERNEL3 Use the string specified by a1 to make a header, and initialize the code field. First we check for duplicates. Then we make entry in >NAME hash table if appropriate. Next lay down the view field. Then we hook in to the correct thread an make the link field. We set up LAST so that it points to our name field. Then we copy the name to YSEG and delimit the name field bits. Then we make the pointer in the YSEG to the CFA. Then we add a stopper entry to >NAME hash table in case of a large ALLOT or end of dictionary. All of the work is done in HEAD space, "HEADER has no effect on CODE space whatsoever. # ( d1 --- d2 ) KERNEL2 Convert a single digit of D1 into the number conversion buffer below PAD in the current base. Return D2 the remainder for further conversion. #> ( d1 --- a1 len ) KERNEL2 Complete the numeric conversion of D1, discarding the double ZERO and returning the address and count of the converted string located below PAD. #CODESEGS ( --- n1 ) KERNEL2 A VALUE which returns the number of 16 byte segments assigned to be used for CODE (assembly language), CONSTANTS and VARIABLES. Limited to 64k, which is the value 4096 decimal. #ELSE ( --- ) COMMENT The optional ELSE portion of an interpreted conditional structure started with #IF, and completed with #THEN. See also #IF. #ENDIF #THEN ( --- ) COMMENT Ends a multi-line Compiler directive. See #IF. #HEADSEGS ( --- n1 ) KERNEL2 A VALUE which returns the number of 16 byte segments assigned to be used for Forth HEADERS. Limited to 64k, which is the value 4096 decimal. #IF ( f1 --- ) COMMENT Starts a multi-line compiler directive. If the boolean passed to #IF is true, then the lines following #IF will be executed. If the boolean is false, then the lines following #IF up to the #ENDIF or #THEN, will be ignored. An optional #ELSE may be inserted after #IF, and before #THEN. Used in the following form: #IF TRUE portion to perform #ELSE optional else portion #THEN operation continues here. #LINE ( --- a1 ) KERNEL2 A variable that holds the line number of the current line on which text is being typed. Incremented by CR. #LISTSEGS ( --- n1 ) KERNEL2 A VALUE which returns the number of 16 byte segments assigned to be used for bodys of Forth colon definitions. Limited by the memory of your computer. #OUT ( --- a1 ) KERNEL2 A variable that holds the column number of the most recent type or emit to the display. Incremented by EMIT or TYPE. #PAGE ( --- a1 ) UTILS A VARIABLE that contains the number of the current page. #PAGE is incremented by PAGE, but must be reset manually. #S ( d1 --- d2=0 ) KERNEL2 Convert the double number D1 into ascii characters stored below PAD until D1 is reduced to a double ZERO. #THREADS ( -- n1 ) KERNEL1 Return the CONSTANT number of vocabulary threads used in the dictionary. In F-PC this number can vary in binary multiples from 2 to 128, it is normally set to 64. #TIB ( --- a1 ) KERNEL2 Used by WORD to hold the number of characters in the terminal input buffer when interpreting from the keyboard. #USER ( --- a1 ) KERNEL4 A VARIABLE that holds the count of how many user variables are allocated. #VOCS ( --- n1 ) KERNEL2 The maximum number of vocabularies that can be active at one time in the vocabulary search order array. $>EXT ( a1 n1 a2 --- ) HANDLES Move the specified string a1,n1 to the extension field of the handle a2. $FLOAD ( a1 --- f1 ) SEQREAD the file specified by counted string a1, return f1 true if the file did not exist. Will abort if a compile error occurs while compiling the file. $>HANDLE ( a1 a2 --- ) HANDLES Move a counted filename string a1 into handle a2 for use by the following words. $>TIB ( a1 --- ) UTILS Move the counted string A1 into the Terminal Input Buffer for immediate interpretation or access with WORD. Any contents of TIB is overwritten. $HOPEN ( a1 --- f1 ) SEQREAD Open the file specified by the counted string a1. Return boolean f1 false if the open was succesful. $PFILE ( a1 --- f1 ) PRINT Select a print file as specified by the counted string a1. Return F1 a boolean error flag true if the print file could not be created. ' ( | -- cfa ) pronounced "tick" KERNEL3 Return the CFA (code field address) of the next word in the input stream, . 'DOCOL ( --- a1 ) UTILS A CONSTANT that returns the execution address of NEST, or DOCOLON at it is sometimes known. 'TIB ( --- a1 ) KERNEL2 A VARIABLE that contains an address that points to the location in memory where characters are entered by user. 'WORD ( --- A1 ) KERNEL2 Leaves the same address as WORD. In this system, 'WORD is the same as HERE. ( ( -- ) KERNEL3 The Forth comment character. The input stream of the current line is skipped until a ) is encountered. Terminates at line end. (") ( | -- a1 len )KERNEL3 Return the address and length of the inline string, and continue execution after the string. (+LOOP) ( n1 --- ) KERNEL1 Increment the loop counter by the value on the stack and decide whether or not to loop again. Due to the wierdness of the 8080, you have to stand on your head to determine the conditions under which you loop or exit. (.") ( --- ) KERNEL3 Type the inline string, and continue execution after the string. Compiled by ." , not used from the keyboard. (.) ( n1 --- a1 n2 ) KERNEL2 Convert a signed 16 bit number to a string. (?DO) ( n1 n2 --- ) KERNEL1 The runtime code compiled by ?DO. The difference between ?DO and DO is that ?DO will not perform any iterations if the initial index is equal to the final index. (?ERROR) ( a1 n1 f1 --- ) KERNEL3 Default for ?ERROR. If boolean f1 is true then type the message specified by a1,n1 and QUIT. Else discard the message a1,n1. (?LEAVE) ( f1 --- ) KERNEL1 Compiled function emplaced by ?LEAVE. Leaves if the flag on the stack is true. Continues if not. (?SERROR) ( a1 n1 f1 --- ) SEQREAD If boolean is true, then print message addr1,n1 and show the line in the current file where the error occured. (ABORT") ( f1 -- ) KERNEL3 The Runtime code compiled by ABORT". Uses ERROR, and updates return stack. (D.) ( d1 --- a1 n1 ) KERNEL2 Convert a signed double number to a string. (DO) ( n1 n2 --- ) KERNEL1 The runtime code compiled by DO. Pushes the inline address onto the return stack along with values needed by (LOOP). (EMIT) ( c1 --- ) KERNEL2 Sends a character to both the console and optionally to the printer. (EXPECT) ( a1 n1 --- ) KERNEL2 Wait for n1 characters to be typed at the keyboard, and place those characters in the buffer starting at a1. (FIND) ( here lfa --- cfa flag | here false ) KERNEL3 Does a search of the dictionary based on a pointer to a vocabulary thread and a string. If it finds the string in the chain, it returns a pointer to the CFA field inside the header. This field contains the code field address of the body. If it was an immediate word the flag returned is a 1. If it is non-immediate the flag returned is a -1. If the name was not found, the string address is returned along with a flag of zero. Note that links point to links, and are absolute addresses. (FRGET) ( code-addr relative-link-addr ) KERNEL3 Forgets part of the dictionary. Both the code address and the header address are specified, and may be independent. (FRGET) resets all of the links and releases the space. (IS) ( cfa -- ) KERNEL4 The code compiled by IS. Sets the following DEFERred word to the address on the parameter stack. (KEY) ( --- c1 ) KERNEL2 Pauses until a key is ready, and returns it on the stack. (KEY?) ( --- f1 ) KERNEL2 Returns true if the user has already pressed a key, otherwise false. (LEAVE) ( --- ) KERNEL1 Compiled function emplace by LEAVE. Does an immediate exit of a DO ... LOOP structure. Unlike FIG Forth which waits until the next LOOP is executed. (LIT) ( --- n1 ) KERNEL1 The runtime code for literals. Pushes the following two bytes onto the parameter stack and moves the IP over them. It is compiled by the word LITERAL. (LOOP) ( --- ) KERNEL1 the runtime procedure for LOOP. Branches back to the beginning of the loop if there are more iterations to do. Otherwise it exits. The loop counter is incremented. (NUMBER) ( a1 --- d1 f1 ) KERNEL2 Convert the count delimited string at a1 to a double number. (NUMBER) takes into account a leading minus sign, and stores a pointer to the last period in DPL. Note the string must end with a blank or an error message is issued. (NUMBER?) ( a1 --- d1 f1 ) KERNEL2 Given a string containing at least one digit, convert it to a number. (OF) ( n1 n2 -- n1 ) ( or ) ( n1 n1 -- ) KERNEL1 The run-time code compiled of OF . If the top two stack elements are the same, the two items will be dropped from the stack and the code following OF will be executed. Otherwise, only the top item is dropped from the stack, and a branch is taken from the literal following the in-line (OF) . (U.) ( n1 --- a1 n2 ) KERNEL2 Convert an unsigned 16 bit number to a string. (UD.) ( d1 --- a1 n1 ) KERNEL2 Convert an unsigned double number to a string. * ( n1 n2 -- n3 ) KERNEL1 Returns a product of two numbers. The numbers may be either signed or unsigned. The product will be correct as long as it may be properly represented in 16 bits! */ ( n1 n2 n3 -- quot ) KERNEL1 is a particularly useful operator, as it allows you to do accurate arithmetic on fractional quantities. Think of it as multiplying n1 by the fraction n2/n3. The intermediate result is kept to full accuracy. Notice that this is not the same as * followed by /. See Starting Forth for more examples. */MOD ( n1 n2 n3 -- mod quot )KERNEL1 This returns the floored quotient and modulus of a 32 bit numerator and a 16 bit denominator n3 . The numerator is an intermediate 32 bit product of the 16 bit quantities n1 and n2 . Note that the sign of the modulus is the same as the sign of the denominator. *D ( n1 n2 --- d1 ) KERNEL1 multiplys two singles and leaves a double. + ( n1 n2 --- n3 ) KERNEL1 Add the top two numbers on the stack and return the result. +! ( n1 a1 --- ) KERNEL1 Increment the value at a1 by n1. This is equivalent to the following: DUP @ ROT + SWAP ! but much faster. +!> ( n1 | -- ) EQUCOLON Increment the body field of by value n1 on the stack. Typically used to modify a VALUE or VARIABLE. +LINES ( n1 --- ) VIEW move forward n1 lines in the current file. +LOOP ( n1 -- ) KERNEL3 Terminate a loop structure. Increment loop index by n1 and repeat until loop index crosses the boundary between limit and limit - 1. Used in the following form: DO LOOP. +TAB ( --- ) DECOM Bump the left margin up by 8 characters. used by the decompiler to display nested conditional structures. , ( n1 -- ) pronounced "comma" KERNEL3 Set the contents of the dictionary to the arbitrary 16-bit value on the stack. ," ( | -- ) KERNEL3 Add the following text string till a " to the dictionary in CODE space. ,CALL ( -- ) KERNEL3 Compiles a CALL to address ZERO, the actual branch address is set later by ;USES or ;CODE. See CREATE, VARIABLE, CONSTANT & : ,JUMP ( --- ) KERNEL3 Compiles a JMP to address ZERO, the actual jump address is set later by ;USES or ;CODE. See CREATE, VARIABLE, CONSTANT & : ,VIEW ( -- ) KERNEL3 Calculate and compile the VIEW field into the header. - ( n1 n2 --- n3 ) KERNEL1 Subtracts n2 from n1 leaving the result on the stack. -1! ( a1 -- ) KERNEL1 Set the contents of the 16 bit quantity at a1 to -1 (all bits set). -1LINE ( --- ) VIEW backup 1 line from current loadline -LINE ( --- ) UTILS A DEFERed word that deletes one line on the display at the cursor line. Lines below the cursor line are scrolled up one line. -LINES ( n1 --- ) VIEW backup n1 lines in the current file. -ROT ( n1 n2 n3 --- n3 n1 n2 ) KERNEL1 The inverse of ROT. Rotates the top element to third place. -TAB ( --- ) DECOM Decrement the left margin up by 8 characters. Used by the decompiler to display nested conditional structures. -TRAILING ( a1 n1 --- a2 n2 ) KERNEL2 Return the address and length of the given string ignoring trailing blanks. . ( n1 --- ) KERNEL2 Display n1 as a signed 16 bit number with a trailing space. ." ( | -- ) KERNEL3 Compile the string till a " to be typed out later. These strings are compiled into LIST space to conserve CODE room. .( ( -- ) KERNEL3 Type the following string on the terminal. .BOX" ( X Y | --- ) BOXTEXT Used while compiling, followed by which is compiled into the current definition. Displays inside a box on the screen whose upper left corner is at X, Y. Used in a COLON definitions as Follows: : TEXT 10 10 .BOX" This is a test" ; .COMMENT: ( --- ) COMMENT Starts a multi-line print statment. All lines following the ".comment:" line will be printed to the display until a "comment;" is encountered. .COMPSTAT ( --- ) TIMESTUF Display the compiler status since the most recent 0COMPILER was performed. Used to keep track of the performance of the compiler on various hardware. See also 0COMPILER .COMSPEC ( --- ) ENVIRON Print the current command specification including the drive and path. .CURFILE ( --- ) HELLO Display the full file path and size of the currently open file. .DATE ( --- ) TIMER Get and display the DOS date. .ELAPSED ( --- ) TIMER Display the elapsed time in Houres, minutes, seconds, and hundredths since the last TIME-RESET was performed. Overflows at 18 hours. .ENV ( --- ) ENVIRON Display the current contents of the environment string. .FILE ( --- ) HELLO Display the name of the currently open file. .FILES ( --- ) FILSTAT Print the contents of the file system handle stack. .FREE ( --- ) UTILS Display the amount of dictionary space available at the current time. .HELLO ( --- ) HELLO Defered word, that displays the startup message when F-PC begins execution. Performs . by default. .ID ( nfa -- ) KERNEL4 Display the variable length name whose name field address is on the stack. If it is shorter than its count, it is padded with underscores. Only valid Ascii is typed. .LOADED ( --- ) FILSTAT Print a list of all files that have been loaded. .ME ( --- ) ENVIRON Print the name of the program currently executing. This only works on DOS 3.0 and higher. If it is used on DOS 2.x no name will be printed. See also ME@. .PATH ( --- ) ENVIRON Print the current directory search PATH. .R ( n1 n2 --- ) KERNEL2 Display n1 as a signed 16 bit number right justified in a field of n2 spaces. .S ( -- ) KERNEL4 Displays the contents of the parameter stack non destructively. Very useful when debugging. .SEQHANDLE ( --- ) SEQREAD Display the filename in the current sequential file handle. .STATUS ( -- ) STATUS Test STATV, if it is on, then display the status line at the top of the screen. .TIME ( --- ) TIMER Get the time from DOS, and display it. .USED ( --- ) UTILS Display the amount of dictionary space used since the last !USED was executed. .VOCWORDS ( A1 --- ) WORDS Display the words matching, from a vocabulary. See the source for WORDS for usage information. / ( num den -- quot ) KERNEL1 Divide two signed single precision numbers and return the floored quotient. Note that -5 2 / returns a value of -3 . /* ( | --- ) COMMENT Start a group of comments until a terminating */ is encountered. /MOD ( num den -- rem quot ) KERNEL1 Divide two signed single precision numbers and return the floored quotient and modulus (remainder). Note that this function is designed to return a modulus which has the same sign as the denominator (usually positive), independent of the sign of the denominator. /STRING ( a1 len n1 --- addr' len' ) KERNEL2 Index into the string addr, len, by n1. Returns addr+n and len-n. 0! ( a1 -- ) KERNEL1 Clear all 16 bits at the specified address. 0< ( n1 --- f1 ) KERNEL1 Returns true if top is negative, ie sign bit is on. 0<= ( n1 --- f1 ) UTILS Return a boolean flag true if n1 is less than or equal to zero. 0<> ( n1 --- f1 ) KERNEL1 Returns true if the top is non-zero, False otherwise. 0= ( n1 --- f1 ) KERNEL1 Returns True if top is zero, False otherwise. 0> ( n1 --- f1 ) KERNEL1 Returns true if top is positive. 0>= ( n1 --- f1 ) UTILS Return a boolean flag true if n1 is greater than or equal to zero. 0COMPILER ( --- ) TIMESTUF Initialize the compiler performance monitoring tool, in preperation for loading a quantity of source code. The word .COMPSTAT when later executed will inform you of the number of lines compiled, and the rate at which linew were compiled. See also .COMPSTAT. 1+ ( n1 --- n2 ) KERNEL1 Increment the top of the stack by one. 1- ( n1 --- n2 ) KERNEL1 Decrement the top of the stack by one. 10TH-ELAPSED ( --- N1 ) TIMESTUF Return n1 the tenths of a second that have elapsed since the last TIME-RESET was performed. 2! ( d1 a1 --- ) KERNEL1 Store a 32 bit value at addr. 2* ( n1 --- n2 ) KERNEL1 Double the number on the Stack. 2+ ( n1 --- n2 ) KERNEL1 Increment the top of the stack by two. 2+! ( d1 a1 -- ) KERNEL1 Add the double number to the contents of the double word at the specified address. 2- ( n1 --- n2 ) KERNEL1 Decrement the top of the stack by two. 2/ ( n1 --- n2 ) KERNEL1 Shift the number on the stack right one bit. Equivalent to division by 2 for positive numbers. 2>R ( n1 n2 --- ) KERNEL1 Pops two values off of the parameter stack and pushes them onto the return stack. It is dangerous to use this randomly! This word is equivalent to: "SWAP >R >R" that is the order of the operator on the parameter stack is maintained when they are placed on the return stack. 2@ ( a1 --- d1 ) KERNEL1 Fetch a 32 bit value from addr. 2CONSTANT ( d1 | -- ) compile time KERNEL3 ( --- d1 ) run time Create a double number constant. 2DROP ( n1 n2 --- ) KERNEL1 ( d1 --- ) Drop the top two elements of the data stack. 2DUP ( n1 n2 --- n1 n2 n1 n2 ) KERNEL1 ( d1 --- d1 d1 ) Duplicate the top two elements of the data stack. 2OVER ( n1 n2 n3 n4 --- n1 n2 n3 n4 1n 2n ) KERNEL1 ( d1 d2 --- d1 d2 d1 ) Copy the second pair of numbers over the top pair. Behaves like 2SWAP for 32 bit integers. 2R> ( --- n1 n2 ) KERNEL1 Pops two values off of the return stack and pushes them onto the parameter stack. It is dangerous to use this randomly! This word is equivalent to: R> R> SWAP that is the order of the operator on the return stack is maintained when they are placed on the parameter stack. 2R@ ( --- n1 n2 ) KERNEL1 Copies the two top values from the return stack to the parameter stack. Same as "R> R> 2DUP >R >R SWAP" that is the order of the operator on the return stack is maintained when they are placed on the parameter stack. 2ROT ( n1 n2 n3 n4 n5 n6 --- n3 n4 n5 n6 n1 n2 ) KERNEL1 ( d1 d2 d3 --- d2 d3 d1 ) Rotates top three double numbers. 2SWAP ( n1 n2 n3 n4 --- n3 n4 1n 2n ) KERNEL1 ( d1 d2 --- d2 d1 ) Swap the top two pairs of numbers on the stack. You can use this operator to swap two 32 bit integers and preserve their meaning as double numbers. 2VARIABLE ( | -- ) compile time KERNEL3 ( --- a1 ) runtime Create a double length variable. 3DROP ( n1 n2 n3 --- ) KERNEL1 Drop the top three elements of the data stack. 3DUP ( n1 n2 n3 --- n1 n2 n3 n1 n2 n3 ) KERNEL1 Duplicate the top three elements of the data stack. 4DUP ( n1 n2 n3 n4 --- n1 n2 n3 n4 n1 n2 n3 n4 ) KERNEL1 ( d1 d2 --- d1 d2 d1 d2 ) Duplicate the top four 16 bit elements of the stack. 8* ( n1 --- n2 ) KERNEL1 Multiply the top of the stack by 8. : ( -- ) KERNEL3 Defines a colon definition. The definition is hidden until it is completed, or the user desires recursion. The runtime for : adds a nesting level. ; ( -- ) KERNEL3 Terminates a colon definition. Compiles the runtime code to remove a nesting level, and changes STATE so that compilation will terminate. ;CODE ( -- ) KERNEL3 Used for defining the run time portion of a defining word in low level code. ;USES ( -- ) KERNEL3 Similar to the traditional ;CODE except used when run time code has been previously defined. < ( n1 n2 --- f1 ) KERNEL1 Compare the top two elements on the stack as signed integers and return true if n1 < n2. <# ( d1 --- d1 ) KERNEL2 Start numeric conversion. Sets the variable HLD to PAD. <= ( n1 n2 --- f1 ) UTILS Less than or equal. <> ( n1 n2 --- f1 ) KERNEL1 Returns true if the two element are not equal, else false. ( --- ) TOPEDIT Re-Enter the editor on the current file at the most recent edit line. Reads the file into memory if needed. ( --- ) SEQREAD Primitive word that loads the file just opened. ( --- hm sh ) TIMER Get the system time in DOS format, HM=hours,minutes and SH=seconds,hundreths. See also .TIME, .DATE ( a1 --- f1 ) VIEW Show the HELP for a word specified by a1 ( handle1 handle2 --- return-code ) HANDLES Code primitive for the HRENAME. See also HRENAME. ( --- ) SEQREAD Load the current file starting at the current file offset. ( a1 --- f1 ) VIEW VIEW the name specified by a1 the cfa ( n1 n2 --- ) VIEW A primitive used by VIEW and HELP. See also VIEW and HELP. = ( n1 n2 --- f1 ) KERNEL1 Returns true if the two elements on the stack are equal, False otherwise. =: ( n1 | -- ) EQUCOLON Used to assign values into the body of , like VARIABLEs or VALUEs. May be used on the command line. Typical usage is as follows: 34 VALUE MYVAL \ create a VALUE : CHANGE_MYVAL ( --- ) \ define a word to 23 =: MYVAL ; \ change MYVAL > ( n1 n2 --- f1 ) KERNEL1 Compare the top two elements on the stack as signed integers and return true if n1 > n2. >= ( n1 n2 --- f1 ) UTILS Compare n1 and n2, return a true if n1 is greater than or equal to n2. >ATTRIB ( handle --- attrib-a1 )HANDLES Step to the attribute field of the handle >ATTRIB8 >ATTRIB7 >ATTRIB6 >ATTRIB5 >ATTRIB4 >ATTRIB3 >ATTRIB2 >ATTRIB1 ( --- ) UTILS Select a display attribute for the display you are using. These are DEFERed words that are setup at COLD start time to perform the proper function for the display card you are using. >BG ( N1 --- ) COLOR Set the Background color to value n1. >BODY ( cfa -- pfa ) KERNEL3 Go from code field address cfa to body address pfa. >BOLD ( --- ) MONOCROM Set the display attribute to bold. >BOLDBLNK ( --- ) MONOCROM Set the display attribute to bold blink. >BOLDUL ( --- ) MONOCROM Set the display attribute to bold underline. >BUGN ( --- ) COLOR Set the Backgound to BLUE, and Forground to Green. >BUWT ( --- ) COLOR Set the Background to Green, and Forground to WHITE. >COLOR ( --- ) COLOR Select hilighting for color monitor. >FG ( N1 --- ) COLOR Set the Forground color to value n1. >HNDLE ( handle --- handle-a1 )HANDLES Step to the handel storage field of the handle array. >IBM ( -- ) IBMCURSR Select the IBM display as the default display. >IN ( --- a1 ) KERNEL2 Number of characters interpreted so far. >IS ( cfa -- data-address ) KERNEL4 Maps a code field into a data field. If the word is in the USER class of words, then the data address must be calculated relative to the current user pointer. Otherwise it is just the parameter field. >LCD ( --- ) COLOR Select the LCD display mode, that is only minimal display attributes are used, REVERSE only. >LINE ( n1 --- ) SEQREAD Step to line n1 in the current file. >LINK ( cfa -- lfa ) KERNEL3 Go from code field address cfa to link field address lfa. >MARK ( -- a1 ) KERNEL3 Set up for a Forward Branch. >MONO ( --- ) MONOCROM Set the ATTRIB words to select various monochrome attributes. >NAM ( handle --- name-string-a1 ) HANDLES Step to the null terminated name field of the handle >NAME ( cfa -- nfa ) KERNEL3 Go from code field address cfa to name field address nfa. >NEST ( --- a1 ) KERNEL1 The address of the NEST routine. >NEXT ( --- a1 ) KERNEL1 Label of the NEXT sequence. This is the location we jump to when we are NOT using in-line NEXT. >NONE >NORM ( --- ) MONOCROM Set display attributes to none, or normal. >PRE ( --- ) PASM Select the PREFIX assembler mode, and saves the previous prefix flag on the return stack for later restoral by PRE>. >R ( n1 --- ) KERNEL1 Pops a value off of the parameter stack and pushes it onto return stack. It is dangerous to use this randomly! >RDWT ( --- ) COLOR Set the Background to RED, and Forground to WHITE. >RESOLVE ( a1 -- ) KERNEL3 Resolve a Forward Branch. >REV ( --- ) UTILS Set the display attribute to reverse. >REVBLNK ( --- ) MONOCROM Set the display attribute to reverse blink. >TYPE ( a1 len -- ) KERNEL3 TYPE for multitasking systems. >UL ( --- ) MONOCROM Set the display attribute to underline. >VIEW ( cfa -- vfa ) KERNEL3 Go from code field address cfa to view field address vfa. >VIEWFILE ( cfa --- offset a1 ) VIEW Locate the file which was used to compile word CFA, and return its string in PAD as A1 a counted string, and OFFSET the offset into the file where the word definition starts. >VIEWLINE ( n1 --- ) VIEW Move to line n1 of currently open file. ? ( a1 --- ) UTILS Display the contents of the 16 bit memory location a1 as a signed value. ?MARK ( -- f1 a1 ) KERNEL3 Set up a forward Branch with Error Checking. ?>RESOLVE ( f1 a1 -- ) KERNEL3 Resolve a forward Branch with Error Checking. ?BRANCH ( f1 --- ) KERNEL1 Performs a conditional branch. If the top of the parameter stack in True, take the branch. If not, skip over the branch address which is inline. ?COMP ( --- ) SAVEREST Verify F-PC is in COMPILE state. Issue an error message if Forth is not in COMPILE state. ?CONDITION ( f1 -- ) KERNEL3 Simple compile time error checking. Usually adequate. ?CR ( -- ) KERNEL4 Break the line at the cursor, if we have reached the right margin as specified by RMARGIN. ?CS: ( --- seg ) KERNEL2 leave Forths Code Segment on the stack. ?CSP ( -- ) KERNEL3 Issue error message if stack has changed since the most recent !CSP. ?DARK ( --- ) UTILS Conditionally perform a DARK if no key is waiting at the keyboard. ?DEF.EXT ( --- ) HANDLES If the specified file name has no "." indicating the extension, then supply one from the default. ?DNEGATE ( d1 d2 --- d3 ) KERNEL1 Negate the double number if the top is negative. ?DO ( limit start -- ) KERNEL3 Same as DO except that the loop will not be executed if start = limit. ?DOINGMAC ( --- f1 ) UTILS Return a boolean flag TRUE if a macro is in the process of being executed, else return FALSE. ?DOSIO ( --- f1 ) UTILS Return a boolean flag TRUE if we are currently using DOS for all I/O, rather than direct screen output. ?DRIVE.EXTRACT ( handle --- drive-value ) PATHSET Given handle, return drive-value, the drive specified in handle, or return the current drive if no drive was specified in handle. ?DRIVE.PREPEND ( drive-value handle --- ) PATHSET Given drive-value and handle, prepend the drive-value into handle, as letter followed by ":". ?DUP ( n1 --- n1 n1<>0 | n1=0 ) KERNEL1 Duplicate the top of the stack if it is non-zero. ?ENOUGH ( n1 --- ) UTILS Test the number of items on the data stack, if there are more than n1 items then continue. If there are less than n1 items, abort with an error. ?ERROR ( a1 n1 f1 --- ) KERNEL3 Maybe indicate an error. If f1 is true then display the error message a1,n1, else discard a1,n1. Change this to alter ABORT". ?ES: ( --- ) KERNEL2 Return the current value of the ES register on the stack. ?EXEC ( --- ) COMMENT ABORT if Forth is not currently in EXECUTION STATE with an error message. ?EXIT ( f1 --- ) KERNEL1 If boolean f1 is true then perform EXIT above else continue executing the current definition. ?FILEOPEN ( --- ) VIEW Verify a file is open, give an error message if no file is open. ?FILLBUFF ( --- ) SEQREAD Re-fill the input buffer if it needs it. ?KEYPAUSE ( --- ) UTILS Wait for a key to be pressed at the keyboard. If the key is an ESC, abort. If the key is any other key, wait for an additional key. If the additional key is anything but an ESC, continue execution. If the second key is an ESC, then abort. ?LEAVE ( f1 -- ) KERNEL3 Immediately exit a DO-LOOP if the flag is true; else continue looping. ?LINE ( n1 -- ) KERNEL4 Break the line at the cursor if there are less than n1 characters till RMARGIN is encountered. ?LOADED ( | --- f1 ) NEEDS Have we already loaded the file specified by NAME? Return a boolean F1 true if we have. ?MISSING ( f1 -- ) KERNEL3 Tell user the word does not exist. ?NEGATE ( n1 n2 --- n3 ) KERNEL1 Negate the second element if the top is negative. ?PAGE ( --- ) UTILS Output a page command if we are not already on the top of a new page. ?PREPEND.VPATH ( a1 --- a1 ) PATHSET Given a handle a1, prepend to the name in the handle, the current VIEW directory path. ?PRINTER.READY ( --- f1 ) KERNEL2 A DEFERed word that returns a boolean flag true if the system printer is online and ready for printing. This word gets defered to TRUE if we are printing to a disk file. ?STACK ( -- ) KERNEL3 Check for parameter stack underflow or overflow and issue appropriate error message if detected. ?TOTAL.* ?UDEFER.* ?DEFER.* ?CONSTANT.* ?UVARIABLE.* ?VARIABLE.* ?VALUE.* ?:.* ?CODE.* ?*.* ( --- ) WORDS Test words used by WORDS to recognize a group of words to display. These are not used by you the user, they are only available to show you the classes of words you can look at with WORDS. ?UNTIL ( f1 --- ) KERNEL1 A special version of ?BRANCH that is used to mark a return point for the decompiler. ?UPPERCASE ( a1 --- a1 ) KERNEL2 Convert the counted string at a1 to uppercase if CAPS is TRUE. ?VMODE ( --- n1 ) VIDEO Read the current video mode from the BIOS. A value of 7 is normal for monochrome, and a value of 2 is a CGA board. Also sets the number of columns in the COLS VALUE and the number of rows in the ROWS VALUE. ?WHILE ( f1 --- ) KERNEL1 A special version of ?BRANCH that is used to mark a return point for the decompiler. @ ( a1 --- n1 ) KERNEL1 Fetch a 16 bit value from addr. @> ( | -- n1) EQUCOLON Fetch the value n1 from the body field of to the stack. Typically used to modify a VALUE or VARIABLE. May be used on the command line. @L ( seg adr - n1 ) KERNEL2 load word long from seg and adr. @REL>ABS ( CFA --- a1 ) KERNEL4 Given CFA the CODE FILED ADDRESS of an F-PC definition, return the address a1 of the code function used to perform the definition. This word is normally NOT used on CODE words, it is instead used on COLON definitions, VARIABLES, CONSTANTS, VALUES, etc. to locate the actual code function used to perform the selected class of words. This word assumes the first byte of the cfa is a JMP or CALL instrunction and is followed immediately by two bytes of RELATIVE address which @REL>ABS converts to an absolute address. A: B: C: D: ( --- ) KERNEL4 Select drive A:, B:, C:, or D: as the default drive. A; ( ---- ) PASM Complete the compiling of the current line of assembly instructions. This word is normally executed automatically at the end of a line of assembly language. The user need only use this word when creating MACROS. See PASM for an example of a macro for NEXT. ABORT ( -- ) KERNEL3 Clear the data stack and QUIT; no message is displayed. ABORT" ( f1 | " -- ) KERNEL3 If the flag is true, issue and ABORT. ABS ( n1 --- n2 ) KERNEL1 Return the absolute value of the 16 bit integer on the stack ADEBUG ( A1 --- ) DEBUG Set the CFA=a1 as the current word to be debugged. AGAIN ( -- ) KERNEL3 Unconditional jump to just after BEGIN in a BEGIN ... AGAIN loop. ALIAS ( a1 | --- ) UTILS Define a new header whose CODE FIELD POINTER points to a1. This word has the effect of creating another name for an existing definition, both names will compile the same OLDER word when compiling. This word has NO EFFECT on CODE space or LIST space. ALIGN ( -- ) KERNEL3 Used to force even addresses. A noop on the 8086. ALLOC ( n1 --- n2 n3 n4 ) KERNEL2 Allocate n1 16 byte units from DOS. Returns n2 the physical segment number of the start of the space allocated, but only if the allocate succeeds. returns n3 the largest number of 16 byte segments that could have been allocated, and n4=8 if the ALLOC FAILED. If n4 is not 8, then discard n3 and use n2 to point to the allocated space. This space must be accessed with the L@, L!, LFILL, CMOVEL> and CMOVEL operators. the returned value n2 can later be used to DEALLOCate the space back to DOS when you are done using it. ALLOT ( n1 -- ) KERNEL3 Allocate more space in the dictionary. AND ( n1 n2 --- n3 ) KERNEL1 Returns the bitwise AND of n1 and n2 on the stack. ANEW ( | -- ) KERNEL3 Define A NEW definition . If already exists, then we FORGET it before making the new one. A nice utility to allow re-loading a file again and again for debugging purposes. I don't know where this first originated, but I learned of it from RAY ISAAC at CALOS, a real neat trick. ASCII ( | -- n1 ) KERNEL3 Compile the next character in the input stream as a literal ASCII integer. ASSEMBLER ( --- ) KERNEL3 The VOCABULARY that contains all of the assembler definitions. AT ( col row --- ) UTILS A special defered word that moves the display cursor to the COL and ROW specified in preperation for displaying text. The system variables #OUT and #LINE are automatically adjusted by this word without your defered function having to keep track of them. ATBL ( --- a1 ) KERNEL2 A table of character values 256 bytes in size. The UPC and UPPERCASE words use this table when performing case conversion. The values in this table can be changed if you want to do some special type of character translation. ATTRIB ( --- a1 ) VIDEO A variable that holds the value of the current display attributes. The value 7 is the default for normal video. AUTOEDITOFF ( --- ) EDITERR Disable automatic entry into the editor when a compile error occurs. The error message is displayed on the screen but the editor is not invoked. AUTOEDITON ( --- ) EDITERR Turn on the automatic entry into the editor when a compile error is detected. The edit cursor is placed in the editor at the error point. AUTOSAVEON ( --- ) SEDITOR Enable the automatic save of changes to a file after ten minutes of keyboard in-activity. The ten minute delay is configurable with the VALUE AUTOSAVE-MINUTES. The default mode is AUTOSAVEON. See also AUTOSAVEOFF. AUTOSAVEOFF ( --- ) SEDITOR Disable the automatic saving of changes after a period of keyboard in-activity. You can walk away from the keyboard forever and the editor will NEVER automatically save your changes. AUTOSAVE-MINUTES ( --- n1 ) SEDITOR A VALUE which returns the number of minutes SED will wait after the last keystroke before automatically saving any changes you may have made to the current edit file. B ( --- ) VIEW Backup 16 lines in current file and display a section of the file. B/HCB ( --- n1 ) pronounced bytes per handle control block HANDLES A CONSTANT that returns the number of byte used to make a handle with the HANDLE word. B>SEC ( D1 - N1 ) TIMER Convert the BINARY time d1 to seconds. Overflows at 18 hours. B>T ( d1 --- d2 ) TIMER Convert the d1 BINARY time value to d2 the DOS time format. BACKSPACES ( n1 --- ) KERNEL2 Send a set of Backspaces to the terminal. BACKUPOFF ( --- ) EDITSTUF Turn off the feature of SED to automatically create backup copies of your files when you start an edit. You will be editing the original and ONLY copy of your file, and will NOT be able to go back to the previous edited version of a file you change. This switch is normally used only when working on floppys where there is no room for a backup copy. BACKUPON ( --- ) EDITSTUF Enable the feature of SED to automatically create backup copies of your files when you start an edit. This is the normal mode, and allows you to go back to the previous edited version of a changed file if a serious error occurs. BASE ( --- a1 ) KERNEL2 The current numeric base for number input output. BCR ( --- ) BOXTEXT pronounced box carraige return. After creating a box on the screen with BOX&FILL, the cursor is placed automatically on the first empty line inside the box. This word places the cursor down one line and to the left edge inside the box once for each time it is performed. here is an example: : TESTBOX ( --- ) 20 06 40 10 BOX&FILL ." This is displayed on the first line." BCR ." This is on the second line." BCR ." This is on the third line of the box." ; BDOS ( n1 func# --- al ) KERNEL2 Load up the registers and do a DOS system call. return the result placed in the A register on the stack. BEEP ( --- ) KERNEL2 Ring the bell on the terminal by emiting the value 7. BEGIN ( -- ) KERNEL3 Used in the form BEGIN ... AGAIN, or BEGIN ... flag UNTIL, or BEGIN ... flag WHILE ... REPEAT BELL ( --- c1 ) KERNEL2 Return the value 7, an Ascii BELL char. BETWEEN ( n1 n2 n3 --- f1 ) KERNEL1 Return true if n2 <= n1 <= n3, otherwise false. BGSTUFF ( --- ) KERNEL2 A DEFERed word chain, that contains operations that need to be performed periodically while waiting for a key from the keyboard. Words included in the chain must preserve and restore the stacks to the state they found them prior to their execution. Words in the chain must also return quickly to prevent excessive delays in user response. BIG-CURSOR ( --- ) IBMCURSR Set the cursor to a block cursor. BIOSCHAR ( --- a1 ) KERNEL2 A VARIABLE that holds the keycode and scancode of the most recent BIOSKEY?. BIOSKEY ( --- n1 ) KERNEL2 Wait for a key to be pressed on the keyboard, and return the key as n1 containing the ascii code in the lower byte and the scan clde in the upper byte. BIOSKEY? ( --- f1 ) KERNEL2 Returns a true flag if a key has been pressed and is waiting to be picked up. You can in effect look ahead at the key by looking at the variable BIOSCHAR which holds the scanned key that is waiting. BIOSKEYVAL ( --- a1 ) KERNEL2 A VARIABLE that holds the actual bois key value returned on the most recent BIOSKEY operation. This value contains both the ascii value and the scancode for the key. BL ( --- c1 ) KERNEL2 Return hex 20, decimal 32 the value of an Ascii space. BLACK ( --- n1 ) COLOR A CONSTANT that returns the value for color black used on a color monitor. BLACK-ON-WHITE ( --- ) MONOCROM Select BLACK characters on a WHITE background rather than the normal WHITE on BLACK. This is mostly useful for true white phosphor monitors. BLANK ( a1 n1 --- ) KERNEL2 Fill the string with blanks BLANKOFF ( --- ) SAVESCR Disable blanking when typing to the display in fast mode on a color monitor. The CGA board needs blanking to reduce the snow effect, but EGA/VGA do not. BLANKON ( --- ) SAVESCR Enable blanking when typing to the display in fast mode on a color monitor. The CGA board needs this to reduce the snow effect, but EGA/VGA do not. BLUE ( --- n1 ) COLOR Return the color value for BLUE. BODY> ( pfa -- cfa ) KERNEL3 Go from body address pfa to code field address cfa. BOOT ( --- ) KERNEL4 The very first high level word executed during cold start. BOUNDS ( a1 n1 --- a2 a3 ) KERNEL1 Given address a1 and length n1, return a2 and a3 the boundry addresses for DO ... LOOP. BOX ( x y x' y' --- ) BOXTEXT Draws a box like BOX&FILL, but does not fill the box with blanks. See also BOX&FILL. BOX&FILL ( x y x' y' --- ) BOXTEXT Draw a box on the screen from x,y the top left, to x',y' the lower right and clear the inside to blanks. the cursor is then placed in the upper left corner of the box in preperation for a ." . Use BCR to perform a BOX CR down and to the left edge of the box for the next line. BRANCH ( --- ) KERNEL1 Performs an unconditional branch. Notice that we are using absolute addresses insead of relative ones. (fast) BROWN ( --- n1 ) COLOR Return the color value for BROWN. BS ( --- c1 ) KERNEL2 Return the value 8, an Ascii Back Space. BUG ( --- ) VOCABS vocabulary stack -> ( voc1 voc2 -- bug voc2 | current = ? ) The BUG vocabulary, sets CONTEXT to BUG when executed. BYE ( -- ) KERNEL4 Returns control to DOS. Performs the defered word BYEFUNC before actually leaving. BYEFUNC ( --- ) KERNEL4 A defered word which normally contains NOOP, provided wo you can specify a function to be performed before leaving back to DOS. C! ( b1 a1 --- ) KERNEL1 Store 8 bit value b1 at address a1. C!L ( b1 seg a1 --- ) KERNEL2 Store the 8 bit value b1 into the long address specified by seg and a1. C+! ( b1 a1 --- ) KERNEL1 Increment the byte value at a1 by n1. This is equivalent the following: "DUP C@ ROT + SWAP C!" but much faster. C, ( char -- ) KERNEL3 Compile the 8 bit value char into the CODE area. The next available byte location is used as specified by DP, and DP is then incremented. Same as , except uses an 8-bit value. C@ ( a1 --- b1 ) KERNEL1 Fetch the 8 bit value b1 from addrress a1. C@L ( seg a1 - b1 ) KERNEL2 Push the 8 bit value b1 located at the long address specified by seg and a1. CALLS ( | --- ) REF An ALIAS for REF. CAPS ( --- a1 ) KERNEL2 If true, then convert names to upper case CAPS-COMP ( a1 a2 n1 --- f1 ) KERNEL2 The code on this screen handles the case where case is not significant. Each character is converted to upper case before the comparison is made. Thus, lower case a and upper case A are considered identical. CASE ( -- ) CASE Start a CASE statment, as follows: CD ( | --- ) EXEC A pseudonym for CHDIR. See also CHDIR. CHARREAD ( --- c1 ) SEQREAD Read a character c1 from the current file. CHDIR ( | --- ) EXEC Change the directory to the directory specified by filespec. CLOSE ( --- ) SEQREAD A pseudonym for SEQDOWN. See also SEQDOWN. CLR-HCB ( a1 --- ) HANDLES Clear the handle a1 to empty, it is erased and marked as a closed file. CLS ( --- ) UTILS An ALIAS for DARK. CMOVE ( a1 a2 n1 --- ) KERNEL1 Move a set of bytes from the from address to the to address. The number of bytes to be moved is count. The bytes are moved from low address to high address, so overlap is possible and in fact sometimes desired. CMOVE> ( a1 a2 n1 --- ) KERNEL1 The same as CMOVE above except that bytes are moved in the opposite direction, ie from high addresses to low addresses. CMOVEL ( sseg sptr dseg dptr cnt -- ) KERNEL2 Move the character block long from source seg sseg and sptr, to destination seg dseg and dptr for length count. CMOVEL> ( from-seg from-offset to-seg to-offset length --- ) KERNEL2 Move length of data from from-seg and from-offset to to-seg and to-offset. If the move crosses a 64k segment boundry the results are UN-PREDICTABLE. CNHASH ( cfa -- ya ) KERNEL3 Given CFA, get pointer into >NAME hash table in YSEG. CNSRCH ( cfa ya maxya -- nfa failf ) KERNEL3 Search for CFA between YA and MAXYA in YSEG. Return NFA and failure flag. CNT ( --- a1 ) DEBUG How many times thru debug next CODE ( | --- ) PASM Define as a new code definition. Assembly language follows, terminated by END-CODE. COLD ( -- ) KERNEL4 The high level cold start code. For ordinary forth, BOOT should initialize and pass control to QUIT. COLS ( --- n1 ) VIDEO A VALUE initialized at boot time that returns the number of screen columns on the current display, typically in the range 40 to 132. Normally 80, but you should use this value along with ROWS to make your applications forgiving of other display modes. COMMENT: ( --- ) COMMENT Start a multi-line comment. Patches into RUN, it then reads and throws away lines until "comment;" is encountered. COMP ( a1 a2 n1 --- f1 ) KERNEL2 This performs a string compare. If the two strings are equal, then COMPARE returns 0. If the two strings differ, then COMPARE returns -1 or +1. -1 is returned if string 1 is less than string 2. +1 is returned if string 1 is greater than string 2. All comparisons are relative to ASCII order. COMPARE ( a1 a2 n1 --- f1 ) KERNEL2 Performs a string compare. If CAPS is true, characters from both strings are converted to upper case before comparing. COMPILE ( | -- ) KERNEL3 Compile the (typically not-immediate) following word when this definition executes. Name is later compiled into the LIST dictionary space. COMSPEC$ ( --- a1 ) ENVIRON The handle used to hold the COMSPEC string. I.e. COMMAND.COM COMSPEC@ ( --- ) ENVIRON Read the environment string, and extrac the COMSPEC parameter. the COMSPEC is inserted in the COMSPEC$ handle. CONHNDL ( --- a1 ) SEQREAD The handle used to send characters to the console when DOS I/O is being used. CONSOLE ( c1 --- ) KERNEL2 Send character c1 to the console display. CONSTANT ( n1 | -- ) KERNEL3 A defining word that creates constants. At runtime the value of the constant is placed on the stack. CONTEXT ( --- a1 ) KERNEL2 The array specifying the search order. CONTROL ( -- n1 ) KERNEL3 Compile the next character in the input stream as a literal ASCII Control Character. CONVERT ( +d1 a1 --- +d2 a2 ) KERNEL2 Starting with the unsigned double number ud1 and the string at adr1, convert the string to a number in the current base. Leave result and address of unconvertable digit on stack. COPY ( --- ) EXEC Perform a DOS COPY with the filespec following the COPY command. COUNT ( a1 --- a2 n1 ) KERNEL2 Given the address on the stack, returns the address plus one and the byte at that address. Useful for strings. CR ( --- ) KERNEL2 Typically set to CRLF, above. PR-STAT Return printer status, if implemented, else TRUE (PRINT) The value of the DEFERRED word EMIT when you want to send a character to the printer. CRASH ( -- ) KERNEL3 Default routine called by execution vectors. CREATE ( | -- ) KERNEL3 Make a header for the next word in the input stream. CRESET ( n1 a1 --- ) KERNEL1 Set the contents of a1 so the the bits that are 1 in n1 are zero in addr. Equivalent to DUP C@ ROT NOT AND SWAP C! CRLF ( --- ) KERNEL2 Sends a carriage return line feed sequence. CROWS ( --- n1 ) VIDEO A VALUE initialized at boot time that returns the number of cursor rows for a character. Used by the system when setting the NORMAL or BIG cursor. CRTAB ( --- ) DECOM Do a carraige return and a TAB of the current TABSIZE. CSET ( n1 a1 --- ) KERNEL1 Set the contents of a1 so that the bits that are 1 in n1 are also 1 in addr. Equivalent to DUP C@ ROT OR SWAP C! CSP ( --- a1 ) KERNEL2 Used for compile time error checking. CTOGGLE ( a1 n1 --- ) KERNEL1 Flip the bits in a1 by the value n. Equivalent to DUP C@ ROT XOR SWAP C! CURPOINTER ( handle --- double-current ) SEQREAD Return the double-current offset into file handle. CURRENT ( --- a1 ) KERNEL2 New words are added to the CURRENT vocabulary. CURSOR-ON ( --- ) IBMCURSR Turn the cursor back on. CURSOR-OFF ( --- ) IBMCURSR Turn off the cursor. CYAN ( --- n1 ) COLOR Return the color value of CYAN. D+ ( d1 d2 --- d3 ) KERNEL1 Add the two double precision numbers on the stack and return the result as a double precision number. D- ( d1 d2 --- d3 ) KERNEL1 Subtract the two double precision numbers. D. ( d1 --- ) KERNEL2 Output as a signed double number with a trailing space. D.M.Y ( --- ) TIMER Select the date format Day.Month.Year for all calendar operations. D.R ( d1 n1 --- ) KERNEL2 Output as a signed double number right justified. D0= ( d1 --- f1 ) KERNEL1 Compare the top double number to zero. True if d = 0 D2* ( d1 --- d2 ) KERNEL1 32 bit left shift. D2/ ( d1 --- d2 ) KERNEL1 32 bit arithmetic right shift. Equivalent to divide by 2. D: ( --- ) KERNEL4 Select drive A:, B:, C:, or D: as the default drive. D< ( d1 d2 --- f1 ) KERNEL1 Compare the top two double numbers. True if d1 < d2 D= ( d1 d2 --- f1 ) KERNEL1 Compare the top two double numbers. True if d1 = d2 D> ( d1 d2 --- f1 ) KERNEL1 Compare the top two double numbers. True if d1 > d2 DABS ( d1 --- d2 ) KERNEL1 Return the absolute value of the 32 bit integer on the stack DARK ( --- ) UTILS Clear the screen to black or white depending on the display mode. See also BLACK-ON-WHITE, and WHITE-ON-BLACK. DBG ( | --- ) DEBUG Start debugging the word following DBG immediately. See also DEBUG. DEALLOC ( n1 --- f1 ) KERNEL2 De-allocate the DOS memory area specified by absolute segment n1. Returns f1 false if all went well, else f1 is an error code. N1 must be the value passed to Forth when the memory array was originally allocated. DEBUG ( | --- ) DEBUG Look up the word following DEBUG, and make it the next word to be debugged. DEBUGABLE ( --- ) DBGFIX Convert the kernel from inline NEXT to a central NEXT right now at runtime. This is done in preperation for running the debugger, and is made possible by using a simple form of pattern recognition. DECIMAL ( --- ) KERNEL2 All subsequent numeric IO will be in Decimal. DECR ( a1 -- ) KERNEL1 Decrement the word at the specified address by 1. DECR> ( | -- ) EQUCOLON Decrement the body of by one, used to modify the following VALUE or VARIABLE. DEFAULT ( --- ) KERNEL2 Opens the default file per the execute line. This does nothing if no file was given. DEFAULTSTATE ( --- ) UTILS Set the system state to the default values. The effected variables are BASE, CAPS, TABSIZE, LMARGIN, and RMARGIN. DEFER ( | -- ) KERNEL3 Define a vectored execution word. These are initially set to display an error message. They are initialized with IS. DEFERS ( --- ) DEFERS installs the contents of a defered word in the current definition being defined. This is used to build a chain of words to be performed. DEFEXT ( --- a1 ) HANDLES An array holding the default extention "SEQ". DEFINED ( -- here 0 | a1 false )KERNEL3 Look up the next word in the input stream. Return true if it exists, otherwise false. Maybe ignore case. DEFINITIONS ( -- ) KERNEL3 Subsequent definitions will be placed into CURRENT. DEL ( --- ) EXEC Delete the files specified by filespec. DEPTH ( -- n1 ) KERNEL4 Returns the number of items on the parameter stack. DIGIT ( ??? ) KERNEL2 Returns a flag indicating whether or not the character is a valid digit in the given base. If so, returns converted value and true, otherwise returns char and false. DIR ( --- ) EXEC Pass the filespec following DIR to DOS and print a directory of the matching filespecs. DIV0FUNC ( -- ) KERNEL4 FF traps divide by 0 errors, and calls this defered word when such an error is detected. You can change the contents of this defered words to handle divide by 0 errors in your own program. DIV0STRT ( -- ) KERNEL4 The default function to perform when a DIVIDE by 0 trap occurs. This routine aborts. A divide by 0 trap calls DIV0FUNC, which defers to this routine. DIVIDE0 ( status_reg CS IP AX BX CX DX SI BP -- ) KERNEL4 The actual entry point from the divide by 0 trap, this word just calls the deferd word DIV0FUNC. Normally the registers on the stack are just discarded, but you can install your own routine into DIV0FUNC to handle the divide by 0 error. DKGRAY ( --- n1 ) COLOR Returns the color for DARK GRAY. Blinks in Background. DLITERAL ( d# -- ) KERNEL3 Compile the double integer from the stack as a literal. DLN ( a1 --- ) DUMP Dump a line, consisting of 16 bytes of hex data followed by 16 bytes of ascii data. DMAX ( d1 d2 --- d3 ) KERNEL1 Return the greater of the the top two double numbers. DMIN ( d1 d2 --- d3 ) KERNEL1 Return the lesser of the top two double numbers. DNEGATE ( d1 d2 --- d3 ) KERNEL1 Same as NEGATE except for double precision numbers. DO ( limit start -- ) KERNEL3 Initialize a loop structure with index running from start to limit-1. Used in the form DO ... LOOP or DO ... +LOOP DOES> ( -- ) KERNEL3 Specifies the run time of a defining word in high level Forth. DONE ( --- ) EDITSTUF A word that re-enables full screen scrolling if you have left the editor with a smaller edit window thereby invoking a sub-screen scroll. If you don't understand this, try making the edit window several lines smaller with Alt-S-W, then leave the editor and notice that only the area below the editor window scrolls. DONE? ( n1 -- f1 ) KERNEL3 True if the input stream is exhaused or state doesn't match. DOS-LINE ( --- a1 ) DEFAULT The address of where the DOS command line resides. DOS>TIB ( --- ) DEFAULT Move the DOS command line to the Terminal Input Buffer. DOSVER ( --- n1 ) KERNEL2 Get DOS version number from DOS, and return it as N1. DOUBLE? ( --- f1 ) KERNEL2 Returns non-zero if period was encountered. DP ( --- a1 ) KERNEL2 Size of dictionary. Next available location. DPL ( --- a1 ) KERNEL2 The decimal point location for number input. DRIVE? ( --- n1 ) UTILS Displays the current disk drive in the form A:, B:, C: etc. DROP ( n1 --- ) KERNEL1 Throw away the top element of the stack. DTBUF ( --- a1 ) TIMER A buffer used by .DATE and .TIME to build their messages in, prior to displaying them. DU ( a1 -- addr+64 ) DUMP Dump another 4 lines (64 bytes). DU< ( d1 d2 --- f1 ) KERNEL1 Performs unsigned comparison of two double numbers. DUMP ( A1 N1 --- ) DUMP Dump an area of the Code segment. DUMP ( a1 len -- ) KERNEL4 A primitive little dump routine to help you debug after you have changed the system source and nothing works any more. DUP ( n1 --- n1 n1 ) KERNEL1 Duplicate the top element of the stack. DUP>R ( n1 --- n1 ) KERNEL1 Duplicates the value on the parameter stack and pushes it onto return stack. It is dangerous to use this randomly! ED ( --- ) TOPEDIT Enter the editor on the most recent edit line. See also EDITOR EDIT ( n1 --- ) TOPEDIT Enter the editor on the current file at line n1. See also EDITOR EDITOR ( --- ) EDITSTUF The vocabulary that contains all of the editor words. Normally you use "line# EDIT", "SED filename" or just "ED" to start the editor. EEOL ( --- ) UTILS Erase the current line to the end of the line. ELSE ( --- ) KERNEL3 Used in the form: ? IF ELSE THEN. If flag ? is false, branches forward to . EMIT ( c1 -- ) KERNEL2 A defered word which sends a character to the output device. EMIT. ( char -- ) DUMP Emit an ascii character char. If the char is not printable then print a ".". EMPTY ( --- ) EDITERR A word defined with MARK, that cleans out the dictionary back to when EMPTY was defined. All segments are reset. USE CAUTION when changing DEFERed words, as EMPTY does not know about them, and will cause a crash if you empty back to before a needed word used in a DEFERed word. END? ( --- a1 ) KERNEL2 True if input stream exhausted, else false. ENDCASE ( -- ) CASE See CASE. ENDFILE ( handle --- double-end ) HANDLES Return the double-end pointer for the file open in handle, also sets the pointer to the end of the file. Useful for finding the end of a file, and for appending to the end of a file. ENDMENU ( a1 n1 --- ) MENUS Resolves the building of a new menu. See NEWMENU. ENDOF ( -- ) CASE See CASE. ENTRY ( --- a1 ) KERNEL2 Jumped to during multitasking. ENVSIZE ( --- n1 ) ENVIRON Calculate n1 the size of the environment in bytes, clipped to about 31k bytes. ERASE ( a1 n1 --- ) KERNEL2 Fill the string with zeros ES0 ( --- a1 ) KERNEL2 ES register initial segment. EVEN ( -- ) KERNEL3 Makes the top of the stack an EVEN number. A noop on the 8086. EVSEG ( --- n1 ) ENVIRON Return n1 the value of the environment segment. EXEC: ( n1 -- ) KERNEL1 Execute the n-th word following the word EXEC: in a high level definition. EXECUTE ( a1 --- ) KERNEL1 Execute the word whose code field is on the stack. Very useful for passing executable routines to procedures!!! EXEHCB ( --- a1 ) SAVEEXE A handle for use while saving an .EXE file. EXHREAD ( a1 n1 handle seg1 --- n2 ) HANDLES Read from the file specified by handle to the extended segment area specified by seg1, a1 for length n1. Returns n2 the length actually read. EXHWRITE ( a1 n1 handle seg1 ---) HANDLES Write from memory a1,n1 in segment seg1 to the file specified by handle. EXIT ( --- ) KERNEL1 Pop an entry off the return stack and place it into the Interpretive Pointer. Terminates a Hi Level definition. EXPECT ( a1 n1 --- ) KERNEL2 A DEFERed word. Get a string from the terminal and place it in the buffer provided. Performs a certain amount of line editing. Saves the number of characters input in the Variable SPAN. Processes control characters per the array pointed to by CC. EXTYPE ( seg a1 n1 --- ) KERNEL2 A defered word used to print a string to the current output device from external memory specified in segment SEG. FALLOF ( func | file_specs --- ) FWORDS A generalized function. By setting the defered word DONFILE, a function can be performed on all files matching the filespec the user has given. See FLOOK, INDEX, and FPRINT for examples of how to use this word. FALSE ( --- f1 ) KERNEL1 This word was brought to you by CONSTANTS FOR CLARITY. FAST ( --- ) QVIDEO Select the fast screen output routines. FCB>HANDLE ( a1 a2 --- ) HANDLES Copy the file and extention from the specified FCB a1 to handle a2. FEMIT ( c1 --- ) KERNEL2 A FAST EMIT, uses TYPE to display the character c1. FEMIT weill not respond to control characters such as CR, LF or FF, They will be displayed as their graphic character equivelant. FENCE ( --- a1 ) KERNEL3 The limit address for forgetting. Words defined below FENCE may not be forgotten. FILE ( | --- ) SEQREAD Select ,name> as the current file for listing, loading or editing. Any file already open is closed first. FILE>TIB ( a1 --- ) SEQREAD Move the counted dtring a1 into the terminal input buffer. The string is checked for an extension, if none is found, an decimal point is added to the string. FILEPOINTER ( --- a1 ) SEQREAD 32 bit variable holding the file pointer of the most recent 1read. FILEPRINT ( | --- ) PRINT All printing is to goto diskfile . No extention is added to . FILES ( --- ) KERNEL1 The vocabulary that contains the names of all files loaded into F-PC. FILL ( a1 n1 c1 --- ) KERNEL2 FILL the string starting at a1 for count n1 bytes with the character c1. Both BLANK and ERASE are special cases of FILL. FILLBUFF ( --- ) SEQREAD Does an unconditional refill of the disk read buffer. The current buffer contents is not over written, but new data is read into the end of the buffer to fill it up if there is more data to read. FILLTIB ( --- ) SEQREAD Does an unconditional refill of the terminal input buffer by reading the next line, and setting up TIB to point to that line. FIND ( a1 -- cfa flag | a1 false ) KERNEL3 Run through the vocabulary list searching for the name whose address is supplied on the stack. If the name is found, return the code field address of the name and a non-zero flag. The flag is -1 if the word is non-immediate and 1 if it is immediate. If the name is not found, the string address is returned along with a false flag. FINDFIRST ( string --- f1 ) HANDLES Begin a search for files specified by filespec string. String is a null terminated un-counted string. F1 returned indicates whether any files matched. The found file is placed in the Data Transfer Area (DTA). USE CAUTION, not to change either the DTA or the buffer filled in by FINDFIRST. FINDNEXT ( --- f1 ) HANDLES Continue the file search for a specified string. Returns the boolean f1 true if another match was found. USE CAUTION, not to change either the DTA or the buffer filled in by FINDFIRST, as this function relys on that information. FIRST ( --- a1 ) KERNEL2 A system constant that retuns a useless value in F-PC. It is useless because it is only 10 bytes lower than LIMIT. FL ( | --- ) SEQREAD An ALIAS for FILE. FLHNDL ( --- a1 ) PATHSET A VALUE that returns the address of the handle we are working with. FLIP ( n1 --- n2 ) KERNEL1 Exhange the hi and low halves of a word. FLOAD ( | --- ) SEQREAD load the file . this is nestable. FLOOK ( search_string file_specs --- ) FWORDS Search all files in file_spec for search_string. Print each occurance found to the display with a line number. FORGET ( | -- ) KERNEL3 Forget all of the code and headers before . FORGET must be used with caution, if you are using DEFERS or UDEFERS, FORGET will not know about these chains, so they must be unlinked before using FORGET or disaster WILL strike. FORM-DATE ( d1 --- a1 ) TIMER Build the ascii string of the current DOS DATE d1 in the DTBUF (Date/Time buffer) and return its address. FORM-FEED ( --- ) UTILS Print a form feed character. FORM-TIME ( d1 --- a1 ) TIMER Build the ascii string of the current DOS TIME d1 in the DTBUF (Date/Time buffer) and return its address. FORTH ( --- ) KERNEL1 The FORTH vocabulary, where most user words can be found. All of the words in this glossary are in the FORTH vocabulary. FPRINT ( file_specs --- ) FWORDS Print listing files of all files that match the file_specs included on the line following FPRINT. FSAVE ( | --- ) SAVEEXE A pseudonym for SAVE-EXE FUDGE ( --- a1 ) BUFSET A VARIABLE used to determine the speed of MS. Calibrated at boot time to the speed of your computer. GET-CURSOR ( --- SHAPE ) IBMCURSR Get the cursor shape mask SHAPE. GETDATE ( --- Y MD ) TIMER Get the DOS format double date. GETTIME ( --- HM Sh ) TIMER Get the DOS format double time. GET_ALINE ( --- ) SEQREAD get a line of text from the current file, and place it in the output buffer. GFL ( | --- ) SEQREAD Looks at the input stream, if a name is waiting, then continue, but if no name is waiting, the pop up a window display and allow the user to pick from a file in the window. GO ( a1 --- ) KERNEL1 Execute code at the given address. GREEN ( --- n1 ) COLOR Return the color value for GREEN. H. ( u -- ) KERNEL4 Display the unsigned number in hex, with trailing blank. Does not change the number base. HANDLE ( | --- ) HANDLES Creates an array/handle for name, which holds the files attributes, handle number, and null terminated name. HANDLE>EXT ( a1 --- a2 ) HANDLES Moves the address from the handle to the decimal point in the filename, if it exists. Otherwise it steps to the null immediately following the filename. HASH ( str-addr voc-ptr -- thread ) KERNEL3 Using the str-addr and the vocabulary address to determine the address thread in the vocabulary that the name should go into. HCLOSE ( handle --- f1 ) HANDLES Close the file specified by handle, return boolean f1 non-zero if an error occured. HCREATE ( handle --- error-code ) HANDLES Create the file specified in handle, if the file already exists, then it is ZEROed !! Returns zero if no error occured. HDEFAULT ( -- ) DEFAULT Open a file specified on the comand line at startup. HDELETE ( handle --- f1 ) HANDLES Delete the file specified by handle, return boolean f1 non-zero if an error occured. HDOS1 ( cx dx fun -- ax cf | error-code 1 ) HANDLES Define a dos call assembly word, which is later used by HOPEN and HCREATE. HEADER ( | -- ) KERNEL3 Creates a NAME header in HEAD space, but compiles absolutely nothing in CODE space. The head created, does point at HERE though. HELLO ( --- ) HELLO Cold start initialization for F-PC. HELP ( | --- ) VIEW VIEW is followed on the same line by name. Display a help file entry for the specified. HELPOFF ( --- ) VIEW Disable the display of HELP with VIEW. HELPON ( --- ) VIEW Enable the display of HELP with VIEW. HELPVIEW ( | --- ) VIEW Displays the help for in the top 7 lines, and the source for in the next 12 lines. HERE ( --- a1 ) KERNEL2 Return the address of the top of the dictionary HEX ( --- ) KERNEL2 All subsequent numeric IO will be in Hexadecimal. HIDDEN ( --- ) VOCABS vocabulary stack -> ( voc1 voc2 -- hidden voc2 | current = ? ) The HIDDEN vocabulary, sets CONTEXT to HIDDEN when executed. HIDE ( -- ) KERNEL3 Removes the Last definition from the Header Dictionary. HIDELINES ( --- ) SEQREAD Turn off listing of lines while loading. HLD ( --- a1 ) KERNEL2 Points to a converted character during numeric output. HNDLS ( --- a1 ) SEQREAD an array of handles, holds 5 handles in a stack. Used by SEQHANDLE, SEQHANDLE+, and FLOAD. HOLD ( c1 --- ) KERNEL2 Save the char for numeric output later. HOPEN ( handle --- error-code ) HANDLES Open the file specified in handle, return error-code zero if the file was opened properly. HOURS ( N1 --- ) TIMESTUF Wait for n1 hours. Performs PAUSE and PAUSE-FUNC constantly while its waiting. HREAD ( a1 n1 handle --- n2 ) HANDLES Read from a file specified by a handle to a1,n1 in the code segment. Returns n2 the length actually read. HRENAME ( handle1 handle2 --- return-code ) HANDLES Change the name of the file specified in handle1 to the name specified in handle2. Can be used to move a file from one directory to another on the same drive. Returns 18 if the rename was good, not zero. HWRITE ( a1 n1 handle --- n2 ) HANDLES Write to a file specified by a handle from a1,n1 in the code segment. Return n2 the length actually written. I ( --- n1 ) KERNEL1 returns the current loop index. It now requires a little more calculation to compute it than in FIG Forth but the tradeoff is a much faster (LOOP). The loop index is stored on the Return Stack. IBLEN ( --- n1 ) SEQREAD Input buffer length constant. IBM--LINE ( -- ) IBMCURSR Delete the current line on the IBM display, causes all lines lower on the screen to scroll up. This is the defered function of -LINE. Use -LINE for portability. IBM-AT ( col row -- ) IBMCURSR Move to the COL and ROW specified on the IBM display screen. This is done using a BIOS level interupt. This word is normally the defered function of AT, you should use AT for portability. IBM-AT? ( --- col row ) IBMCURSR Return the ROW and COLUMN of the cursor on the display as it is known by DOS. Used to initialize Forth's #LINE and #OUT variables. IBM-PROPRINT ( --- ) PROPRINT Select the IBM Proprinter as the system printer, with BOLD and UNDERLINE available. IBRESET ( --- ) SEQREAD Input Buffer RESET, initializes the LINEREAD function to start reading from a new file or a file in which a move POINTER has been done. Flushes the contents of the read buffer. IF ( f1 -- ) KERNEL3 Used in the form: f1 IF ELSE THEN (ELSE is optional). If flag f1 is false, branches forward to or after THEN. IMMEDIATE ( -- ) KERNEL3 Mark the last Header as an Immediate word. INBSEG ( --- n1 ) SEQREAD The input buffer segment VALUE. INCLUDE ( | --- ) SEQREAD An ALIAS for FLOAD. See also FLOAD. INCR ( a1 -- ) KERNEL1 Increment the word at the specified address by 1. INCR> ( | -- ) EQUCOLON Increment the body of by one, used to modify the following VALUE or VARIABLE. INDEX ( file_spec --- ) FWORDS display an index of the first line of each file that matches the file_specs included on the line following INDEX. INITCOLOR ( --- ) VIDEO A defered word that gets set later, and is used to do the color display attribute control initialization ( it sets the >ATTRIBx words. ). See the file MONOCROM, and COLOR. INITMONO ( --- ) VIDEO A defered word that gets set later, and is used to do the monochrome display attribute control initialization ( it sets the >ATTRIBx words. ). See the file MONOCROM. INITSTUFF ( --- ) KERNEL4 A DEFERed word chain, used by many system utilities that need to specify a function to be performed at cold start time. See also DEFERS for more information on how defered word chains work. INLEN ( --- a1 ) SEQREAD input text length variable INLINE ( --- ) PASM Starts an assembly language sequence in the middle of a : (colon) definition. Assembly code instructions follow until the sequence is terminated by END-INLINE. The sequence of assembly instructions normally includes NEXT, 1PUSH, or 2PUSH just prior to the word END-INLINE. INSTALL ( --- ) UTILS A DEFERed word that is used to install user defined options in the system when they are initially bringing up the system. INSTALLSTUFF ( --- ) UTILS A DEFERed word chain used by the INSTALL words to add additional things to the system that will allow the user to select options at installation time. Use FLOOK INSTALLSTUFF * to see some places where this word is used. INTERPRET ( -- ) KERNEL3 The Forth Interpret Loop. If the next word is defined, execute it, otherwise convert it to a number and push it onto the stack. IS ( cfa -- ) KERNEL4 Depending on STATE, either sets the following DEFERred word immediatly or compiles the setting for later. J ( --- n1 ) KERNEL1 returns the loop index of the inner loop in nested DO .. LOOPs. KEY ( --- c1 ) KERNEL2 A defered word to get a key from user. KEY? ( --- f1 ) KERNEL2 A defered word that returns a true flag if a key waiting. L ( --- ) VIEW Display 18 lines starting at the most recently displayed line. L>NAME ( lfa -- nfa ) KERNEL3 Go from link field address lfa to name field address lfa. LABEL ( --- a1 ) PASM Create a definition that returns the address of whatever code follows, and enable the assembler. Compiled as a VARIABLE. LARGEST ( a1 n1 --- a2 n2 ) LARGEST Given a starting address a1 and an array length in bytes, return a2 the address of the largest word element in the array, and n2 the largest element itself. LAST ( --- a1 ) KERNEL2 Points to the name of the most recently CREATEd word. LDUMP ( seg offset len --- ) DUMP Dump to the display the absolute segment seg, starting at offset for length len. LEAVE ( -- ) KERNEL3 Immediately exit a DO-LOOP. LENGTH ( a1 --- a2 n1 ) KERNEL2 Given the address on the stack, returns the address plus two and the two byte contents of the address. LFILL ( a1 len value --- ) KERNEL2 Fill starting at addr, for length len, with value. LFILLW ( seg offset byte-len WORD --- ) IBMCURSR Fill absolute segment seg starting at offset for length byte-len with the value WORD. LIMIT ( --- a1 ) KERNEL2 A constant that returns the highest address in the CODE segment used by Forth. Typically $FFFE. LINEEDITOR ( x y a1 n1 --- f1 ) LEDIT At location x,y start editing the string specified by a1,n1. the line editor supports the wordstar key sequences, and if the edit terminates with a , then the original string will be changed to match the edited string. If the edit is terminated with ESC, then the original string will not be changed. See the file LEDIT for further information on LINEEDITOR. LINEREAD ( --- a1 ) SEQREAD A defered word that returns a line from the current file. LINK ( --- a1 ) KERNEL2 Points to next task in the circular multi tasking queue. LINK> ( lfa -- cfa ) KERNEL3 Go from link field address lfa to code field address cfa. LIST ( n1 --- ) VIEW N1 is the line number to list in the current open file. LISTING ( --- ) TOPEDIT Print a formatted listing of the file currently open. The printing is done using the editor, so there must be enough memory for the editor to load the file. LITERAL ( n1 -- ) KERNEL3 Compile the single integer from the stack as a literal. LL ( | --- ) VIEW LL is a pseudonym for VIEW, displays Help and Source for . LMARGIN ( -- a1 ) KERNEL4 The left margin setting used by ?LINE, ?CR. When a line wrap occurs, then LMARGIN specifies how many spaces are printed on the following line. Default value is 0. LOAD ( n1 --- ) VIEW n1 is the line number of where to start loading. LOADED, ( --- ) SEQREAD Compile the name of the current file as a variable in the FILES vocabulary. Also links the variable into a list of variables that represent the files that have been loaded. LOADER ( --- ) SEQREAD A defered word that loads the current file. LOADING ( --- a1 ) SEQREAD A VARIABLE that holds a flag TRUE if we in the process of loading a file. LOADSTAT ( --- ) SEQREAD load status display defered word. Normally deferd to <.STAT>. LOOP ( -- ) KERNEL3 Terminate a loop structure. Increment loop index by one and repeat until loop index crosses the boundary between limit and limit - 1. Used in the form DO LOOP. LTBLUE ( --- n1 ) COLOR Return the color value for LIGHT BLUE. Blinks in Background. LTCYAN ( --- n1 ) COLOR Return the color value for LIGHT CYAN Blinks in Background. LTGRAY ( --- n1 ) COLOR Return the color value for LIGHT GRAY LTGREEN ( --- n1 ) COLOR Return the color value for LIGHT GREEN Blinks in Background. LTMAGENTA ( --- n1 ) COLOR Return the color value for LIGHT MAGENTA Blinks in Background. LTRED ( --- n1 ) COLOR Return the color value for LIGHT RED Blinks in Background. M/D/Y ( --- ) TIMER Select the date format Month/Day/Year for all calender functions. M/MOD ( d1 n1 --- rem quot ) KERNEL1 Divides a double by a single, leaving a single quotient and a single remainder. Division is floored. MAGENTA ( --- n1 ) COLOR A CONSTANT that returns the color value for Magenta on a color monitor. MAKEDUMMY ( | -- ) KERNEL3 Make a dummy : definitions out of . Effectively a NOOP, used by ANEW. MANY ( -- ) UTILS Re-execute the input stream until the user presses a key. MARK ( | -- ) HELLO Create a mark, that is define a word that will clear the dictionary back to itself when it is executed. MAX ( n1 n2 --- n3 ) KERNEL1 Return the maximum of n1 and n2 MAX.S ( --- a1 ) KERNEL4 A VARIABLE that holds the value of how many items to display when a .S is performed, normally set to 4, but can be changed by the user. MAXNEST ( --- n1 ) SEQREAD Total size in bytes of the system handle stack. ME$ ( --- a1 ) ENVIRON Storage space for the execution string used to execute this forth currently running. ME@ ( --- ) ENVIRON Extract the execution string from the environment, and place it in the string ME$ MED-CURSOR ( --- ) IBMCURSR set the cursor to a thick cursor, not line, and not block sort of double thick. MEMCHK ( f1 --- ) KERNEL2 abort with memory error message if true MENU ( --- ) MENUS Invode the current menu set, accepts keypad keys to move around the menubar, and then to enter a menu command. If you have not setup a menubar, then the default Forth menubar is used. See also MENUS MENULINE" ( | --- ) MENUS Define a new pull down menu line, with text to perform . All menu lines for a particular menu should have the same length. The first capitalized letter in the will be the recognized menu command letter, and should be unique within the items of a particular menu. See MENUS Example: "T" is the command key. / NOOP is the menu function / / MENULINE" This is a test " noop MIN ( n1 n2 --- n3 ) KERNEL1 Return the minimum of n1 and n2 MINUTES ( N1 --- ) TIMESTUF Wait for n1 minutes. PAUSE and PAUSE-FUNC are performed continuously while waiting. MOD ( num den -- modulus ) KERNEL1 Return the modulus of the numerator and denominator, where the quotient is "floored". This is designed to yield a result having the same sign as the denominator. Note that if the denominator is positive, the result is positive, regardless of the sign of the numerator. MOVE ( a1 a2 n1 --- ) KERNEL2 Move the specified bytes n1 from address a1 ro address a2. No overlapping of data will occur. MOVEPOINTER ( double-offset handle --- ) HANDLES Move the file pointer for handle to the position double-offset in the file already open in handle. MS ( n1 --- ) BUFSET Delay for n1 milliseconds. This function is system specific, and while it is calibrated at system boot time, it may not always be very acurate. MU/MOD ( d1 n1 --- rem dquotient) KERNEL1 divides a double by a single, leaving a double quotient and a single remainder. Division is floored. N ( --- ) VIEW Go forward 16 lines and display 18 lines. N>LINK ( nfa -- lfa) KERNEL3 Go from name field address nfa to link field address lfa. NAME> ( nfa -- cfa ) KERNEL3 Go from name field address nfa to code field address cfa. NAME>PAD ( A1 --- PAD ) VIEW Move the name field to PAD and filter out the hi bit of the last character in name. Also clears all but lower 5 bits of name count. NEEDS ( | --- ) NEEDS Test the file following, if we have not loaded it, then load it else just go on. NEGATE ( n1 --- n2 ) KERNEL1 Turn the number into its negative. A twos complement op. NEWFILE ( | --- ) NEWFILE Open or CREATE the specified and start editing it. if no name is specified, then prompt for a name. NEWINFO ( --- ) INFO Starts a sequence of lines that constitute a NEWINFO, NEWINFO is placed at the beginning of a line, and subsequent lines are compiled into a special file called F-PC.MSG until the terminating line ENDINFO is encountered. When the definition containing NEWINFO and ENDINFO is later executed, the lines between them are read from the disk file, and displayed. This is a system utility, and is not typically used in a user program. NEWMENU ( | --- a1 0 ) compile time MENUS ( --- a1 ) run time Starts the definition of a new menu , see MENUS for an example of how to make a menu. NEWMENUBAR ( | --- ) MENUS Starts the definition of a new menubar, see MENUS for an example of how to make a menubar. NIP ( n1 n2 --- n2 ) KERNEL1 Drop the second element from the stack. NO-NAME ( --- ) KERNEL3 A dummy name, whose name field address is returned by >NAME when the real name field can not be found. NOBACKUP ( --- ) EDITSTUF Disable the creation of backup copies of your edit files. This is normally only done when you are short of disk space, wo allow the editing of larger files in a limited environment. NOOP ( --- ) KERNEL1 One of the most useful words in Forth. Does nothing. NORM-CURSOR ( --- ) IBMCURSR Set the cursor to the normal underline shape. NOT ( n1 --- n2 ) KERNEL1 Does a ones complement of the top. Equivalent to -1 XOR. NRESOLVE ( 0 n1 n2 ... n -- ) CASE Primitive used by ENDCASE to resolve the previous case references. NUMBER ( a1 --- d1 ) KERNEL2 Convert a string to a number. Normally (NUMBER) NUMBER? ( a1 --- d1 f1 ) KERNEL2 Convert the count delimited string at a1 to a double number. NUMBER? takes into account a leading minus sign, and stores a pointer to the last delimiter in DPL. The string must end with a blank. Leaves a true flag if successful. OBLEN ( --- n1 ) SEQREAD output buffer length constant OCTAL ( --- ) KERNEL2 All subsequent numeric IO will be in Octal. OF ( n1 n2 -- n1 ) CASE ( n1 n1 -- ) See CASE. OFF ( a1 --- ) KERNEL1 Set the contents of a1 to FALSE OFF> ( | --- ) EQUCOLON Turn off the VALUE or VARIABLE following. Somewhat faster than OFF. OK ( --- ) SEQREAD Load all of the current file. Peforms a 1 LOAD. ON ( a1 --- ) KERNEL1 Set the contents of a1 to TRUE ON> ( | --- ) EQUCOLON Turn on the VALUE or VARIABLE following. Somewhat faster than ON. OPEN ( | --- ) SEQREAD Open as the current file for loading, editor etc. This is a pseudonym for FILE. OR ( n1 n2 --- n3 ) KERNEL1 Returns the bitwise OR of n1 and n2 on the stack. OSF ( --- a1 ) KERNEL2 Operating Sys call in progress flag. OUTBUF ( --- a1 ) SEQREAD the line output buffer array OUTPAUSE ( --- ) KERNEL2 A DEFERed word that can be set to PAUSE, but is normally set to NOOP, to prevent multi tasking from interfering with typed output. OVER ( n1 n2 --- n1 n2 n1 ) KERNEL1 Copy the second element to the top. P! ( n1 port# --- ) KERNEL1 Write the value n1 to the 16 bit port#. P@ ( port# -- n1 ) KERNEL1 Read the 16 bit port# and return value n1. PAD ( --- a1 ) KERNEL2 Floating Temporary Storage area. DON'T USE THIS, it will be going away in the ANSI standard. PAGE ( --- ) UTILS Printer dependent. Get to a new page. Increment the page number and reset the line number and the column number. PARAGRAPH ( offset --- paragraph-in ) KERNEL3 Convert offset to the next largest paragraph size that will contain all of offset. Used to do paragraph alignment. PARSE ( a1 --- a2 n1 ) KERNEL2 Scan the input stream until char is encountered. Update >IN pointer. Leaves the address and length of the enclosed string. PATH$ ( --- a1 ) ENVIRON Storage space for the PATH string. PATH@ ( --- ) ENVIRON Extract the PATH from the environment string. PATHHNDL ( --- a1 ) PATHSET A handle that returns a1 the address of the handle that contains the default drive path. PATHSET ( handle --- f1 ) HANDLES Set the current drive path into handle. returns boolean f1 true if an error occured while performing this operation. PAUSE ( --- ) KERNEL1 Used by the Multitasker to switch tasks. PAUSE-FUNC ( --- ) TIMESTUF A defered word to be set to a function that is to be performed while waiting for timing words Like TENTHS, SECONDS, MINUTES and HOURS to complete. PC! ( n1 port# --- ) KERNEL1 Write the byte n1 to the 8 bit port#. PC@ ( port# -- n1 ) KERNEL1 Read the 8 bit port# and return value n1. PCLOSE ( --- ) PRINT Close the current print file, and restore printing to the PRN device. PDOS ( a1 drive# --- f1 ) KERNEL1 Read the current DOS path of drive# into the array at a1. The string returned will be NULL terminated. F1 returns TRUE if an error occured. PEMIT ( c1 --- ) KERNEL2 A DEFERed word that normally contains (PRINT), to print a character c1 to the printer. PERFORM ( a1 --- ) KERNEL1 The word whose code field is stored at the address pointed to by a1, the number on the stack. Same as @ EXECUTE PFILE ( | --- ) PRINT All printing is to goto diskfile . No extention is added to . PICK ( n1 --- n2 ) KERNEL1 Reaches into the stack and grabs an element, copying it to the top of the stack. For example, if the stack has 1 2 3 Then 0 PICK is 3, 1 PICK is 2, and 2 PICK is 1. PLACE ( from count to --- ) KERNEL1 Move the characters at from to to with a preceding length byte of len. POSTFIX ( --- ) PASM Switch the assembler to POSTFIX mode, like the F83 postfix assembler. The normal mode is PREFIX. See also PREFIX. PR-STATUS ( n1 --- n2 ) KERNEL2 Return the printer status as n2 from the printer specified by n1. N1=0 for PRT1, and 1 for PRT2. PRE> ( --- ) PASM Restores the previous assembler mode after using >PRE to select PREFIX for a macro. Used in pairs with >PRE. PREFIX ( --- ) PASM Switch the assembler to PREFIX notation mode. This is the normal mode. See also POSTFIX. PREPEND.PATH ( handle --- f1 ) PATHSET Prepend the default drive and path to handle, and return f1 the boolean that tells if we were successful. PRINT ( | -- ) KERNEL3 Interpret the following words, and output to printer. PRINTING ( --- a1 ) KERNEL2 A variable which holds a flag that Indicates whether printing is enabled. PRIOR ( --- a1 ) KERNEL2 Points to the last vocabulary that was searched. PRNHNDL ( --- a1 ) SEQREAD The handle used by the system to talk to the printer. Normally initialized to contain PRN. on handle 4, but may be opened on a real file to cause printing to a file. See also PFILE and PCLOSE. QTYPE ( A1 N1 --- ) QVIDEO Quick type, uses a direct screen assembly word called VIDEO-TYPE to blast text directly tot he screen. Handles attributes as well, see MONOCROM. QUERY ( --- ) KERNEL2 Get more input from the user and place it at TIB. QUIT ( -- ) KERNEL4 The main loop in Forth. Gets more input from the terminal and Interprets it. Responds with OK if healthy. R# ( --- a1 ) KERNEL2 The cursor position during editing. R> ( --- n1 ) KERNEL1 Pops a value off of the return stack and pushes it onto the parameter stack. It is dangerous to use this randomly! R>DROP ( --- ) KERNEL1 Pops a value off of the return stack and discards it. It is dangerous to use this randomly! R@ ( --- n1 ) KERNEL1 Copies the value on the return stack to the parameter stack. RECOVERLINE ( n1 --- ) SAVESCR Recover a line n1 from the most recently saved screen with SAVESCR. The line is placed on the screen on line n1. RECOVERSCR ( --- ) SAVESCR Recover a COPY of the most recently saved screen with SAVESCR. You can temporarily restore the screen with this word, in preperation for messing it up again before finally using RESTSCR to restore the screen. This word does NOT pop the save screen stack, it only makes a copy of the most recent save. RECURSE ( -- ) KERNEL4 We prefer to use RECURSIVE rather than RECURSE. See RECURSIVE RECURSIVE ( -- ) immediate KERNEL3 Allow the current definition to be self referencing. RED ( --- n1 ) COLOR A CONSTANT that retuns the value of the color red on a color monitor. REF ( | --- ) REF Display all references found to in the currently compiled Forth system. Examines COLON definitions and DEFERed words. REN ( --- ) EXEC Perform a RENAME with the filespec following the REN command. RENAME ( | --- ) EXEC Perform a RENAME with the filespec following the RENAME command. REPAIR ( | --- ) TOPEDIT Perform a VIEW and EDit on the following. REPEAT ( -- ) KERNEL3 Unconditional backward branch to just after BEGIN in a BEGIN flag WHILE REPEAT loop. RESTORE> ( --- ) followed by a definition in a colon def. SAVEREST Restore the previous value of the body of the name following in this colon definition. See also SAVE> and SAVE!>. RESTORESTATE ( --- ) UTILS Restore the system state as preserved by SAVESTATE. RESTORE_VECTORS ( -- ) KERNEL4 Restores the CONTROL BREAK DOS vectors to their original value as when Forth was entered. The CONTROL BREAK and DIVIDE by 0 vectors are saved by the assembly language cold start routines before Forth is entered. RESTSCR ( --- ) SAVESCR Restore the screen from the external segment screen save area. Un-nestable up to three times. REVEAL ( -- ) KERNEL3 Activates (reveals) the Last definition in the Header Dictionary. RMARGIN ( -- a1 ) KERNEL4 Controls the right margin, used by ?LINE, ?CR. Specifys where to wrap the line. Default value is 70. ROLL ( n1 --- n2 ) KERNEL1 Similar to SHAKE and RATTLE. Should be avoided. 1 ROLL is SWAP, 2 ROLL is ROT, etc. ROLL can be useful, but it is SLOW. ROOT ( --- ) VOCABS The root vocabulary that is always available in the vocabulary list. ROT ( n1 n2 n3 --- n2 n3 n1 ) KERNEL1 Rotate the top three element, bringing the third to the top. ROWS ( --- n1 ) VIDEO A VALUE that returns the number of ROWS available on the current display as determined at boot time. You should use this VALUE to adjust your programs to work with displays having between 25 and 60 lines. See also COLS. RP! ( a1 --- ) KERNEL1 ( Warning, this is different from FIG Forth ) Sets the return stack pointer to the specified value. RP0 ( --- a1 ) KERNEL2 Empty return stack for this task. RP@ ( --- a1 ) KERNEL1 Return the address of the next entry on the return stack. RUN ( --- ) KERNEL3 Interpret or compile whatever is in the TERMINAL INPUT BUFFER. Tests STATE, and does the appropriate thing. RWERR ( --- a1 ) HANDLES A VARIABLE that holds the value of the most recent disk read or write error. RWMODE ( --- a1 ) HANDLES the variable rwmode, which defaults to a value of 2, controls the read write mode of the file being opened, the value 2 is read, or write, a value of 1 specifies write only, and a value of 0 specifies read only. S>D ( n1 --- d1 ) KERNEL1 Take a single precision number and make it double precision by extending the sign bit to the upper half. SAVE!> ( n1 --- ) followed by the name of a definition SAVEREST Saves the body contents of the definition following to the return stack, and sets the body to value n1. Used to save and set VARIALBEs or VALUEs. Complimented by RESTORE>. SAVE-EXE ( | --- ) SAVEEXE Save the current Forth memory image to the file if present, or if not present, then prompt for a name to save to. SAVE> ( --- ) followed by a name in definition SAVEREST Saves the body contents of the definition following to the return stack. Used to save VARIABLEs or VALUEs that may be changed by a following operation. Complimented with RESTORE>. See also SAVE!> SAVEPOINTER ( --- ) SEQREAD Save the file offset into the current file for later restoral. SAVESCR ( --- ) SAVESCR Save the current contents of the screen to an external segment save area. Nestable up to three times. SAVESTATE ( --- ) UTILS Saves F-PC's state, including BASE, CAPS, LMARGIN, RMARGIN, TABSIZE and STATV. SCAN ( a1 n1 c1 --- ) KERNEL2 Given the address and length of a string, and a character to look for, run through the string until we find the character. Leave the address of the match and the length of the remaining string. SCANW ( a1 w1 w2 --- a2 w3 ) SCAN Scan array at a1 for length w1 words for word value w2. Returns address a2 where w2 was found, and length remaining w3. SEARCH ( sadr slen badr blen -- n1 f1 ) SEARCH Search for string sadr,slen contained in badr,blen. Returns f1 equal true if found, and n1 equal to the offset into the string where sadr,slen was found. SEC-ELAPSED ( --- N1 ) TIMESTUF Return n1 the seconds that have elapsed since TIME-RESET. SECONDS ( N1 --- ) TIMESTUF Wait n1 seconds. SED ( | filename --- ) TOPEDIT Start the editor on the filename specified, or if no name is specified, then prompt for a file. Will create a file if it does not already exist. See also EDITOR SEE ( --- ) DECOM The user interface. To decompile something type SEE . SEEK ( d1 --- ) SEQREAD Seek (move pointer) to position d1 in the current file. SEGSET ( --- ) KERNEL4 A DEFERed word that contain the current function used to set up the segment registers at cold start time. Typically contains SETYSEG. SELECT ( n1 --- ) KERNEL4 Select drive n1 as the current disk drive to use as the DEFAULT drive when no drive is specified. N1 ranges from 0 which is drive A:, to a legal value up to 255 in DOS. SEQDOWN ( --- ) SEQREAD Step down one handle in the handle stack. closes the current file, and selects the next lower file. SEQHANDLE+ ( --- a1 ) SEQREAD A VALUE that holds the address of the NEXT available sequential file handle. Oftain used to hold temporary file information during copy or rename operations. SEQHANDLE ( --- a1 ) KERNEL2 A VALUE that holds the address of the current sequential file handle. This handle holds the filename of the currently open file if any, along with the DOS handle number if the file is open. SEQINIT ( --- ) SEQREAD Initialize the handle stack, in preparation for use. SEQUP ( --- ) SEQREAD Step up one handle in the handle stack. SET-CURSOR ( N1 --- ) IBMCURSR Set the cursor shape to the mask value n1. SET-DTA ( a1 --- ) HANDLES Set the Disk Transfer Area as a1. SETBLOCK ( seg size --- f1 ) SETBLOCK Adjust the segment seg to the new size in 16 byte segments. return error flag f1 non-zero if the adjustment did not succeed. SETDATE ( NM Y --- ) TIMER Set the DOS date given the double date. SETTIB ( a1 --- ) SEQREAD Sets the terminal input buffer to the counted string a1, in preperation for INTERPRETation, or WORD. Be sure to save the current TIB for later restoral. SETTIME ( HM Sh --- ) TIMER Set the DOS time given the double time. SETVIEW ( | --- ) VIEW Set the VIEWPATH handle to . If is omitted, it will be prompted. SETYSEG ( --- ) KERNEL2 Set the segment variables as needed. SET_VECTORS ( -- ) KERNEL4 Set the CONTROL BREAK and DIVIDE by 0 traps to point to the Forth provided functions, so we can handle them smoothly. SHOWLINES ( --- ) SEQREAD Turn on listing of lines while loading. SIGN ( n1 --- ) KERNEL2 If n1 is negative insert a minus sign into the string. SKIP ( a1 n1 c1 --- ) KERNEL2 Given the address and length of a string, and a character to look for, run through the string while we continue to find the character. Leave the address of the mismatch and the length of the remaining string. SLOW ( --- ) QVIDEO Select the BDOS screen output routines. Mose everything will still work but BOY WILL IT BE SLOW! NO COLOR SUPPORT in this mode. SOURCE ( --- a1 n1 ) KERNEL2 Return a string from the current input stream. SP! ( a1 --- ) KERNEL1 ( Warning, this is different from FIG Forth ) Sets the parameter stack pointer to the specified value. SP0 ( --- a1 ) KERNEL2 Empty parameter stack for this task. SP@ ( --- a1 ) KERNEL1 Return the address of the next entry on the parameter stack SPACE ( --- ) KERNEL2 Send a space to the terminal SPACES ( n1 --- ) KERNEL2 Send a set of spaces to the terminal, uses the SPCS array to TYPE the spaces out very quickly SPAN ( --- a1 ) KERNEL2 Number of characters input by EXPECT. SPCS ( --- a1 ) KERNEL2 An array of spaces used by SPACES to display spaces quickly. This array holds 132 spaces, for displays up to 132 columns wide. SPLIT ( n1 --- n2 n3 ) KERNEL1 SPLIT the 16 bit value n1 into two stack entries which are the LOW and HIGH bytes of N1. The HIGH byte is on the top of the stack. SRCOFF ( --- ) DECOM A control to the debugger, to cause the source for a word being debugged NOT to be displayed. SRCON ( --- ) DECOM A control to the debugger, to cause the source for a word being debugged to be displayed. SSEG ( --- a1 ) KERNEL2 A VARIABLE that holds the absolure segment where SEARCHing is done. START ( --- ) KERNEL4 A minimum initialization word, clears the input stream, and the data stack, then performs DEFAULT, and INTERPRETs the input stream. STATE ( --- a1 ) KERNEL2 A USER VARIABLE that holds the system STATE, used to determine if Forth is COMPILING or INTERPRETING. STATOFF ( --- ) STATUS Turn status displaying off. STATON ( --- ) STATUS Turn status displaying on. STATUS ( -- ) KERNEL3 Indicate the current status of the system. STIME ( --- a1 ) TIMER A double variable that holds the BINARY start time for various timing operations. SVINIT ( --- ) SAVESCR Cold start initialization word that allocates some space for the screen save segment. SVSEG ( --- seg1 ) SAVESCR A constant that returns the segment of the screen save area. When not initialized, svseg return a zero. SWAP ( n1 n2 --- n2 n1 ) KERNEL1 Exchange the top two elements on the stack. SYS ( | command --- ) EXEC Accept the command line (up to line end) following SYS as a DOS command line. T>B ( d1 --- d2 ) TIMER Convert the d1 DOS double time value to d2 the BINARY time. TAB ( -- ) KERNEL4 Print spaces to get to the next TAB increment as specified by TABSIZE. TABSIZE ( --- a1 ) KERNEL4 Controls the TAB increment for TAB. Default is 8. TELETYPE ( --- ) PRTCTRL Select the dumbest printer, so NOT CONTROL CHARACTER aside from CR and LF will be sent to the printer. BOLD and UNDERLINE wil not function with this driver. TENTHS ( N1 --- ) TIMESTUF Wait n1 tenths of a second. THEN ( -- ) KERNEL3 Terminate a branch structure. Used in the form: flag IF ... ELSE ... THEN THESE ( --- ) WORDS A option passed to WORDS, to control whether WORDS will look in all vocabularys, or only the CONTEXT vocabulary. The following command sequence will cause WORDS to display only those words containing XYZ in the HIDDEN vocabulary: HIDDEN THESE WORDS XYZ TIB ( --- a1 ) KERNEL2 Leaves address of text input buffer. TILLKEY ( n1 --- ) TIMESTUF Wait up to n1 seconds for the user to press a key, then continue on whether they have pressed a key or not. TIME-ELAPSED ( --- d1 ) TIMER Return d1 the binary time elapsed since the last TIME-RESET. TIME-RESET ( --- ) TIMER Reset the start time to the current time. TIMER ( | forth_commands --- )TIMER Measure the time it takes to interpret the forth commands on the following command line. TIMES ( N1 -- ) UTILS Re-execute the input stream N1 number of times. Used in the form: CR HERE . 5 TIMES TIMES ( n1 -- ) UTILS Re-execute the input stream a specified number of times. TOPRINTER ( --- ) PRINT An ALIAS for PCLOSE. Close the current print file, and restore printing to the PRN device. TOS ( --- a1 ) KERNEL2 Top OF Stack, Saved during Task switching. TOTALLINES ( --- a1 ) SEQREAD A VARIABLE that holds the total number of lines the system has read and compiled since it was last reset. Incremented by LINEREAD. TOTALWORDS ( --- a1 ) WORDS Accumulator for the total number of names. TRAVERSE ( a1 direction -- addr' ) KERNEL3 Run through a name field in the specified direction. Terminate when a byte whose high order bit is on is detected. TRIM ( faddr voc-addr -- ) KERNEL3 Change the hash pointers in a vocabulary so that they are all less than a specified value, faddr. TRUE ( --- f1 ) KERNEL1 A CONSTANT that returns -1, a boolean true. TTIME ( --- a1 ) TIMER A double variable that holds the DOS total time. TUCK ( n1 n2 --- n2 n1 n2 ) KERNEL1 Tuck the first element under the second one. TURNKEY ( | --- ) SAVEEXE Save a copy of the current memory image to the file as an .EXE file. The LIST segment id compressed as much as possible. The CODE segment is compressed as much as possible, and the HEAD segment is discarded completely. The created .EXE file is not Forth any more, and can only perform whatever function was plugged into BOOT or DEFAULT before TURNKEY was performed. The user is responsible for performing whatever initializaton is needed, and for handling ALL error conditions. However wonderful this word may sound, it is NOT for the faint of heart. TYPE ( a1 n1 --- ) KERNEL2 A defered word used to Print a string to the current output device from the segment specified in the variable TYPESEG. TYPESEG ( --- a1 ) VIDEO A VARIABLE that holds the absolute segment in memory where VIDEO-TYPE types FROM, it is the source of VIDEO-WRITE, and normally holds the CODE segment, but can be set to any segment from which typing needs to be done. U*D ( n1 n2 --- d1 ) KERNEL1 U*D is a synonym for UM* U. ( n1 --- ) KERNEL2 Output as an unsigned single number with trailing space. U.R ( n1 n2 --- ) KERNEL2 Output as an unsigned single number right justified. U16/ ( n1 --- n2 ) KERNEL1 Four 16 bit logical right shifts. Unsigned divide by 16 decimal. U2/ ( n1 --- n2 ) KERNEL1 16 bit logical right shift. U< ( n1 n2 --- f1 ) KERNEL1 Compare the top two elements on the stack as unsigned integers and return true if the second is less than the first. Be sure to use U< whenever comparing addresses, or else strange things will happen beyond 32K. U<= ( un1 un2 --- f1 ) UTILS Unsigned less than or equal. U> ( n1 n2 --- f1 ) KERNEL1 Compare the top two elements on the stack as unsigned integers. True if n1 > n2 unsigned. U>= ( n1 n2 --- f1 ) UTILS Unsigned greater than or equal. UD. ( d1 --- ) KERNEL2 Output as an unsigned double number with a trailing space UD.R ( d1 n1 --- ) KERNEL2 Output as an unsigned double number right justified. UM* ( un1 un2 -- ud ) KERNEL1 Return a 32 bit unsigned product of two 16 bit unsigned numbers. UM/MOD ( ud un --- uremainder uquotient ) KERNEL1 The unsigned double numerator ud is divided by an unsigned single denominator un to produce an unsigned quotient and unsigned remainder. The quotient is at the top of the stack. UNBUG ( -- ) DEBUG Remove the debug point currently in place. UNDEFER ( | -- ) DEFERS This is sort of an undo for DEFERS. UNDEFER removes one level from the chain of a defered word. Must be used with EXTREME caution, as there is no protection from trying to use it at the wrong time in the wrong place. YOU ARE ON YOUR OWN with this one. See also DEFERS above. UNDO ( --- ) KERNEL1 Cleans up the return stack so we can EXIT from the current loop without crashing, as in DO and "UN"DO. UNEDIT ( --- ) TOPEDIT The word that gets plugged into CLEARMEM, which de-allocates the memory used by the editor during an edit session. This is needed in the case where you want to spawn a DOS shell, as the SED editor consumes all of the available memory during an edit. UNINSTALL ( --- ) INSTALL Mark the F-PC currently in memory as un-installed. A subequent FSAVE will result in a system that comes up with the UN-installed message in HELLO. UNINSTALLSTUFF ( --- ) UTILS A DEFERed word that is executed by UNINSTALL. Typically contains a chain of function to perform during the un-install process. UNNEST ( --- ) KERNEL1 Same as exit. Compiled by ; to help decompiling. UNTIL ( f1 -- ) KERNEL3 Marks end of a BEGIN ... UNTIL loop; terminate if flag boolean is true. UP ( --- a1 ) KERNEL1 Holds a pointer to the current USER area. ( multitasking ) UPC ( char --- char' ) KERNEL2 Convert a Char to upper Case UPPER ( a1 length --- ) KERNEL2 Take the string at the specified address and convert length characters of it to upper case. It converts the string in place, so be sure to make a copy of the original if you need to use it later. USED ( | --- )UTILS A word which calls USED! to save the current values of DP, XDP, and YDP. USED then executes the command line following, and calculates the space used by the command line and displays the results. USED is used as follows: USED FLOAD MYFILE USEDIN ( | --- ) REF An ALIAS for REF, this word looks through the dictionary and finds words which use , the names are then displayed. USER ( --- ) KERNEL4 VOCABULARY that holds multi tasking versions of defining words. USER ( | --- ) KERNEL4 Vocabulary that holds task versions of defining words. VALUE ( n1 | --- ) KERNEL3 Create as a word which like a CONSTANT return its value, but which unlike a constant can be changed with the words: =:, !>, INCR>, DECR>, OFF>, ON>, +!>. Values provide a more readable source code than VARIABLES, and an improvement in performance as well. VARIABLE ( | -- ) KERNEL3 A defining word to create variables. At runtime the address of the variable is placed on the stack. VIDEO-SEG ( --- a1 ) VIDEO A variable that holds the segment value of the display screen. VIDEO-TYPE ( a1 n1 --- ) VIDEO2 The VERY FAST direct screen type routine, displays the string starting at address a1 for length n1 at the current cursor position specified by #LINE and #OUT. #OUT is incremented by n1. The variable NOSETCUR holds a flag that controls whether VIDEO-TYPE should actually move the cursor during the type. VIDEO-TYPE is much faster if NOSETCUR is TRUE, but then the cursor must be set later with an AT or TYPE with NOSETCUR=FALSE. This TRICK allows F-PC to re-display 10 full text screens per second on an XT (4.7mhz) class machine. VIEW ( | --- ) VIEW A DEFERED word that contains either DOVIEW, or HELPVIEW. View the source for . VIEW> ( vfa -- cfa ) KERNEL3 Go from view field address vfa to code field address cfa. VIEWLINES ( n1 n2 --- ) VIEW n1 lines to view, n2 line to underline. VIEWPATH ( --- a1 ) PATHSET A handle that holds the path for the compiled files in F-PC. VMODE-VAR ( --- a1 ) VIDEO A VARIABLE that holds the video mode that was obtained at system startup. See the IBM or Mictosoft documentation for further information on the various video modes. VMODE.SET ( --- ) VIDEO Set the VIDEO-SEG variable after testing the current video mode, and perform any needed initialization required by executing the INITMONO, or INITCOLOR as needed. VOC-LINK ( --- a1 ) KERNEL2 Points to the most recently defined vocabulary. VOCABULARY ( | -- ) KERNEL3 Defines a new Forth vocabulary . W.NAME ( NFA --- ) WORDS Print name of word NFA. Test to see if conditions are correct, like CODE, or ALL, or WITHIN, and print name. WARM ( -- ) KERNEL4 The WARM entry point for Forth, just calles the DEFERed word WARMFUNC, then calls BYE is WARMFUNC returns. A WARM start is invoked whenever the CONTROL BREAK key is pressed. WARMFUNC ( --- ) KERNEL4 A DEFERed word that is invoked when a warm start occurs. This function is called whenever the CONTROL BREAK key is pressed. WARMSTRT ( -- ) KERNEL4 The default function to be performed on a WARM start. This word is plugged into the DEFERed word WARMFUNC, to specify what is done when the CONTROL BREAK key is pressed. See also WARMFUNC and WARM. WARNING ( --- a1 ) KERNEL2 A VARIABLE that holds a boolean flag that determines if you should be warned in the event you re-define a definition name. WARNOVER ( --- ) KERNEL3 A warning message that is issued by ?STACK in the event you are close to running out of CODE memory. WHILE ( f1 -- ) KERNEL3 Used in the form BEGIN flag WHILE REPEAT. Repeat and clauses while the flag f1 is true (really, non-zero). WHITE ( --- n1 ) COLOR A CONSTANT that return the value for the color white on a color display. White will blink if used in the background. WHITE-ON-BLACK ( --- ) MONOCROM Selects the normal display mode of light characters on a dark background. The opposite mode is BLACK-ON-WHITE. WIDTH ( --- a1 ) KERNEL2 Number of characters to keep in name field. WITHIN ( n1 n2 --- f1 ) KERNEL1 Return true if min <= n1 < max, otherwise false. WITHPATH ( --- f1 ) SEQREAD A boolean VALUE that returns a true flag if the file path is to be included in the name of the variable that gets compiled by LOADED, when adding a new file the loaded file list in the FILES vocabulary. WITHPATH is normally true, so user loaded files can be located in whatever directory they are in. WITHPATH is set to FALSE when compiling the system which allows the VIEWPATH to be applied to system files and have their location specified at installation time. WORD ( C1 --- A1 ) KERNEL2 Parse the input stream for char and return a count delimited string at here. Note there is always a blank following it. WORDS ( | -- ) WORDS Display words that match text. is optional, if ommited then the CONTEXT vocabulary will be displayed. Two space delimited strings may follow, and only words containing both strings will be printed: X, ( n1 --- ) KERNEL2 Compile the value n1 into LIST space into the next available address as specified by XDPSEG and XDP. XDP is incremented by two. X," ( | " --- ) KERNEL3 A " delimited string from the input stream is compiled into LIST space. This word is used by ." and "" . X>"BUF ( --- "BUF ) KERNEL3 This word is compiled by the "" word, it moves the string compiled into LIST space from LIST space to CODE space in the "BUF buffer. The address of "BUF is then returned on the stack. XALIGN ( --- ) KERNEL3 Align XDP to the next higher even value. This word is not currently used in F-PC. XC, ( n1 --- ) KERNEL2 Compile n1 into the next available byte in LIST space. XDP is incremented by one. XDP ( --- a1 ) KERNEL2 A VARIABLE that holds the offset into the XDPSEG where the next word in a colon definition will be compiled. F-PC always aligns colon definitions to the next higher segment boundry at the start of a new definition, causing XDP to equal zero. XDPSEG ( --- a1 ) KERNEL2 A VARIABLE that holds the current absolute segment where the next colon definition will be compiled. XDUMP ( a1 n1 --- ) DUMP DUMP an area of memory in the LIST segment. A1 is a relative segment offset from XSEG, and n1 is the length to dump in bytes. This is normally used as follows: ' HEX >BODY @ 10 XDUMP XEVEN ( a1 --- a2 ) KERNEL3 LIST space is aligned on WORD boundries in F-PC, this word aligns a1 to the next higher even address a2. XFDOS ( ?? --- ?? ) KERNEL2 call INT 21 with most any reg combination used. See the souce for this word in the KERNEL for more information on how to use it. XHERE ( --- seg n1 ) KERNEL2 HERE for LIST space, returns the absolute segment SEG and the offset into that segment n1 of HERE in LIST space. XOR ( n1 n2 --- n3 ) KERNEL1 Returns the bitwise Exclusive Or of n1 and n2 on the stack. XREF ( | --- ) REF An ALIAS for REF, this word looks through the dictionary and finds words which use , the names are then displayed. XSEG ( --- a1 ) KERNEL1 A system variable that holds the current absolute segment of the LIST area. Y! ( n1 a1 --- ) KERNEL2 Store the value n1 into the address a1 in HEAD space. Y, ( n1 --- ) KERNEL2 Compile the value n1 into the next available location in HEAD space. YDP is incremented by two. Y-M-D ( --- ) TIMER Switch the system to using the date format Year-Month-Day. Y@ ( a1 --- n1 ) KERNEL2 Fetch the 16 bit contents of a1 in HEAD space and return it as n1. YC! ( n1 a1 --- ) KERNEL2 Store the byte value n1 into address a1 in HEAD space. YC@ ( a1 --- n1 ) KERNEL2 Fetch the byte contents of a1 in HEAD space, and return it as n1. YCOUNT ( a1 --- a2 n1 ) UTILS The byte at a1 in HEAD space is returned as n1, and a2=a1+1. YCSET ( byte a1 --- ) KERNEL2 The byte located at a1 in HEAD space is ored with byte, and the result is saved back into addr. YDP ( --- a1 ) KERNEL2 A variable that holds the address in HEAD space of the next available byte. YDUMP ( A1 N1 --- ) DUMP Dump an area of the HEAD segment. YELLOW ( --- n1 ) COLOR The color value for YELLOW on a color monitor. Yellow blinks when used in background. YHASH ( yname vocaddr --- thre) KERNEL2 Using the name address in HEAD space, and the vocabulary address, determine the address thread in the vocabulary that yname should go into. Used by HIDE and REVEAL. YHERE ( --- a1 ) KERNEL2 Push the contents of YDP the new HEAD pointer on the stack. YS: ( a1 --- yseg a1 ) KERNEL2 Place a copy of the current HEAD segment under the address a1 on the stack. YSEG ( -- a1 ) KERNEL1 A variable which holds the base of Head space. YSTART ( --- a1 ) KERNEL2 System variable, If non-zero, ptr to start of headers after dictionary. Used to set DP in when SAVE-SYSTEM is used in making a .COM file. [ ( -- ) KERNEL3 Stop compiling and start interpreting. ['] ( | -- ) KERNEL3 Compile the CFA of as a literal in a colon definition. Like ' only used while compiling [COMPILE] ( | -- ) KERNEL3 Force which is normally an immediate word to be compiled like any other word. \ ( -- ) KERNEL4 This line is a comment till the end of this line, and any text after the \ is ignored. \S ( n1 --- ) SEQREAD Stop loading the current file with the line that contains this word. \UNLESS ( | --- ) UTILS An immediate word, dont load this line of source UNLESS is defined, that is treat this line as a comment if is not defined. ] ( -- ) KERNEL3 The Compiling Loop. First sets Compile State. Looks up the next word in the input stream and either executes it or compiles it depending upon whether or not it is immediate. If the word is not in the dictionary, it converts it to a number, either single or double precision depending on whether or not any punctuation was present. Continues until input stream is empty or state changes. ` ( command --- ) EXEC A pseudonym for SYS. See also SYS.