Forthfreak
spacer
spacer
Favorite?

KEYWORDS

ForthCoreWords

  Home   Changes   Preferences   Edit   Favorites   Keywords
(You are Nobody)

Core and Core Extension


legend: word implementation state for jsforth

  • spacer implemented and working
  • spacer implemented but not thoroughly tested
  • spacer (partly) implemented or broken
  • spacer non-compliant implementation
  • spacer delayed/postponed: problem to solve
  • spacer not started, thought about or not cared for yet
  • spacer

CORE

  • spacer !
  • spacer #
  • spacer #>
  • spacer #S
  • spacer '
  • spacer (
  • spacer *
  • spacer */
  • spacer */MOD
  • spacer +
  • spacer +!
  • spacer +LOOP
  • spacer ,
  • spacer -
  • spacer .
  • spacer ."
  • spacer /
  • spacer /MOD
  • spacer 0<
  • spacer 0=
  • spacer 1+
  • spacer 1-
  • spacer 2!
  • spacer 2*
  • spacer 2/
  • spacer 2@
  • spacer 2DROP
  • spacer 2DUP
  • spacer 2OVER
  • spacer 2SWAP
  • spacer :
  • spacer ;
  • spacer <
  • spacer <#
  • spacer =
  • spacer >
  • spacer >BODY
  • spacer >IN
  • spacer >NUMBER
  • spacer >R
  • spacer ?DUP
  • spacer @
  • spacer ABORT
  • spacer ABORT"
  • spacer ABS
  • spacer ACCEPT
  • spacer ALIGN
  • spacer ALIGNED
  • spacer ALLOT
  • spacer AND
  • spacer BASE
  • spacer BEGIN
  • spacer BL
  • spacer C!
  • spacer C,
  • spacer C@
  • spacer CELL+
  • spacer CELLS
  • spacer CHAR
  • spacer CHAR+
  • spacer CHARS
  • spacer CONSTANT
  • spacer COUNT
  • spacer CR
  • spacer CREATE
  • spacer DECIMAL
  • spacer DEPTH
  • spacer DO
  • spacer DOES>
  • spacer DROP
  • spacer DUP
  • spacer ELSE
  • spacer EMIT
  • spacer ENVIRONMENT?
  • spacer EVALUATE
  • spacer EXECUTE
  • spacer EXIT
  • spacer FILL
  • spacer FIND
  • spacer FM/MOD
  • spacer HERE
  • spacer HOLD
  • spacer I
  • spacer IF
  • spacer IMMEDIATE
  • spacer INVERT
  • spacer J
  • spacer KEY
  • spacer LEAVE
  • spacer LITERAL
  • spacer LOOP
  • spacer LSHIFT
  • spacer MAX
  • spacer MIN
  • spacer MOD
  • spacer MOVE
  • spacer NEGATE
  • spacer OR
  • spacer OVER
  • spacer POSTPONE
  • spacer QUIT
  • spacer R>
  • spacer R@
  • spacer RECURSE
  • spacer REPEAT
  • spacer ROT
  • spacer RSHIFT
  • spacer S"
  • spacer S>D
  • spacer SIGN
  • spacer SM/REM
  • spacer SOURCE
  • spacer SPACE
  • spacer SPACES
  • spacer STATE
  • spacer SWAP
  • spacer THEN
  • spacer TYPE
  • spacer U.
  • spacer U<
  • spacer UM/MOD
  • spacer UNLOOP
  • spacer UNTIL
  • spacer VARIABLE
  • spacer WHILE
  • spacer WORD
  • spacer XOR
  • spacer ![
  • spacer [']
  • spacer [CHAR]
  • spacer ]

CORE EXT

  • spacer #TIB
  • spacer .(
  • spacer .R
  • spacer 0<>
  • spacer 0>
  • spacer 2>R
  • spacer 2R>
  • spacer 2R@
  • spacer :NONAME
  • spacer <>
  • spacer ?DO
  • spacer AGAIN
  • spacer C"
  • spacer CASE
  • spacer COMPILE,
  • spacer CONVERT
  • spacer ENDCASE
  • spacer ENDOF
  • spacer ERASE
  • spacer EXPECT
  • spacer FALSE
  • spacer HEX
  • spacer MARKER
  • spacer NIP
  • spacer OF
  • spacer PAD
  • spacer PARSE
  • spacer PICK
  • spacer QUERY
  • spacer REFILL
  • spacer RESTORE-INPUT
  • spacer ROLL
  • spacer SAVE-INPUT
  • spacer SOURCE-ID
  • spacer SPAN
  • spacer TIB
  • spacer TO
  • spacer TRUE
  • spacer TUCK
  • spacer U.R
  • spacer U>
  • spacer UNUSED
  • spacer VALUE
  • spacer WITHIN
  • spacer [COMPILE]
  • spacer \

DOUBLE/MIXED MATH

  • spacer M*
  • spacer UM*
  • spacer D.
  • spacer D.R
  • spacer D+
  • spacer D=
  • spacer D<
  • spacer DABS
  • spacer DNEGATE

VOCABULARY / WORDLIST EXTENSIONS

  • spacer VOCABULARY
  • spacer DEFINITIONS
  • spacer ORDER
  • spacer ONLY
  • spacer ALSO
  • spacer PREVIOUS
  • spacer FORTH
  • spacer VOCS
    • displays all vocabulary names

The vocabulary implementation in jsforth is not wordlist based, but simulates the Ragsdale/ONLY vocabulary contruct accurately, using the standards selector. There is a restriction associated with it: A maximum of about 20 additional - next to the predefined ONLY, FORTH and HIDDEN - can be defined.

STRING EXTENSIONS

  • spacer -TRAILING
  • spacer /STRING
  • spacer CMOVE

MEMORY EXTENSIONS

  • spacer ALLOCATE
    • Both first-fit and best-fit chunk search methods are provided.
  • spacer FREE
  • spacer RESIZE
  • spacer FIT ( – a )
    • a variable to control ALLOCATE chunk search:
      • FIT OFF - first fit
      • FIT ON - best fit

EXCEPTIONS EXTENSIONS

  • spacer CATCH
  • spacer THROW

BLOCKS FILESYSTEM EXTENSIONS

  • spacer BUFFER ( u – a )
  • spacer BLOCK ( u – a )
  • spacer LIST ( u – )
  • spacer SAVE-BUFFERS ( – )
  • spacer EMPTY-BUFFERS ( – )
  • spacer UPDATE ( – )
  • spacer LOAD ( u – )
  • spacer THRU ( u1 u2 – )
  • spacer +LOAD ( u – )
  • spacer +THRU ( u1 u2 – )
  • spacer CAPACITY ( – u )
    • returns the number of blocks available
      • block are mapped on cookies, RAM and web server. server blocks are read/only.

More words from the blocks wordset can be loaded. Among those are:

  • spacer CLEAR ( u – )
  • spacer COPY ( u1 u2 – )
  • spacer LS ( – ) display index of all blocks
  • spacer –> ( – )

FLOATING POINT MATH ESTIMATING

  • spacer >FLOAT
  • spacer D>F
  • spacer DF!
  • spacer DF@
  • spacer DFALIGN
  • spacer DFALIGNED
  • spacer DFLOAT+
  • spacer DFLOATS
  • spacer F!
  • spacer F*
  • spacer F**
  • spacer F+
  • spacer F-
  • spacer F.
  • spacer F/
  • spacer F0<
  • spacer F0=
  • spacer F<
  • spacer F>D
  • spacer F@
  • spacer FABS
  • spacer FACOS
  • spacer FACOSH
  • spacer FALIGN
  • spacer FALIGNED
  • spacer FALOG
  • spacer FASIN
  • spacer FASINH
  • spacer FATAN
  • spacer FATAN2
  • spacer FATANH
  • spacer FCONSTANT
  • spacer FCOS
  • spacer FCOSH
  • spacer FDEPTH
  • spacer FDROP
  • spacer FDUP
  • spacer FE.
  • spacer FEXP
  • spacer FEXPM1
  • spacer FLITERAL
  • spacer FLN
  • spacer FLNP1
  • spacer FLOAT+
  • spacer FLOATS
  • spacer FLOG
  • spacer FLOOR
  • spacer FMAX
  • spacer FMIN
  • spacer FNEGATE
  • spacer FOVER
  • spacer FROT
  • spacer FROUND
  • spacer FS.
  • spacer FSIN
  • spacer FSINCOS
  • spacer FSINH
  • spacer FSQRT
  • spacer FSWAP
  • spacer FTAN
  • spacer FTANH
  • spacer FVARIABLE
  • spacer F~
  • spacer PRECISION
  • spacer REPRESENT
  • spacer SET-PRECISION
  • spacer SF!
  • spacer SF@
  • spacer SFALIGN
  • spacer SFALIGNED
  • spacer SFLOAT+
  • spacer SFLOATS

additionally

  • spacer 1/F
  • spacer F0>
  • spacer F>
  • spacer F<>
  • spacer F.S ( – )
    • print contents of floating point stack

COMMON EXTENSIONS

  • spacer FOR
  • spacer NEXT
    • "n FOR ... NEXT" is a countdown loop:
      • goes from N down to 1.
      • I, J, LEAVE, ?LEAVE, UNLOOP all work with both FOR ... NEXT and DO ... LOOP
  • spacer ENDIF
    • alias of THEN
  • spacer SKIP ( a1 u1 c – a2 u2 )
    • truncate string by skipping all leading occurances of c
  • spacer SCAN ( a1 u1 c – a2 u2 )
    • truncate string by searching for first occurance of c
  • spacer COLD
    • perform a cold start:
      • sets up stacks
      • forgets all added words
      • restores dp (here)
      • sets number base to 10
      • enter interpretation mode
      • outputs initial greeting
  • spacer WARM
    • perform a warm start:
      • sets up stacks
      • enter interpretation mode
  • spacer ,"
  • spacer ?EXEC
  • spacer ?COMP
  • spacer ESC
    • the ASCII escape character
  • spacer .NAME
    • prints word name when given an xt
  • spacer NAME
    • returns word name as string when given an xt
  • spacer BODY>
    • given a body (as from >BODY) get back the xt
  • spacer HIDE
  • spacer REVEAL
    • smudging
  • spacer WORDS
  • spacer <<
  • spacer >>
    • aliases for LSHIFT, RSHIFT
  • spacer .S
  • spacer PROMPT
  • spacer PAGE
  • spacer CLS
    • alias for PAGE
  • spacer ON
  • spacer OFF
    • "variable ON/OFF" sets it to true or false
  • spacer EXCHANGE
    • ( n addr – m ) dup @ -rot ! ;
  • spacer SKIM
    • ( addr – addr+ n ) dup cell+ swap @ ;
    • or (often more efficient): cell+ dup cell- @
    • sometimes known as @+
  • spacer -ROT
  • spacer RDROP
    • drops top return stack element
  • spacer CASESENSITIVE
    • a variable to turn on/off case sensitivity for vocabulary searches
  • spacer ?LEAVE
    • equivalent to IF LEAVE THEN
  • spacer KEY? ( – f )
    • returns true flag if a key is waiting to be picked up with KEY, false otherwise.
  • spacer MS ( u – )
    • pauses execution for u milliseconds

JSFORTH SPECIFIC

  • spacer DU* ( ud1 u – ud2 )
  • spacer DEBUGGER ( – a )
    • a variable, turn ON for additional diagnostic output
  • spacer ALERT ( a n – )
    • pops up an alert box with string a n as text.
  • spacer CONFIRM ( a n – f )
    • pops up a yes/no confirm box with string a n as text. choice is returned as flag
  • spacer URL ( a n – )
    • opens url in new browser window. gets prepended to url if necessary.
  • spacer LOADURL ( a n – )
    • opens url in help window.
  • spacer HELP
  • spacer S(
    • put a string on the stack (addr len) in interpret mode. addr len are pointing into the parse buffer, therefore will entering a new line after carriage return overwrite the string.
  • spacer POPUPS
    • a variable, to turn on of off popup errors alerts. POPUPS OFF routes errors to console.
  • spacer NEWERROR ( a n1 n2 – )
    • installs string a n1 as error message for uncaught n2 THROW
    • example: s( CUSTOM ERROR ) 50 newerror
    • empty string s( ) 50 newerror removes that error text again. both negative and positive error numbers are accepted. negative error numbers overwrite system errors texts.
  • spacer EPOCHE ( u – )
    • returns number of seconds since jan1,1970
  • spacer READLINE ( a n1 – n2 )
    • reads screen line n1, writes to address a. n2 characters were read.
  • spacer WRITELINE ( a n1 n2 – )
    • write n1 chars at a to screen line n2
  • spacer INFO ( a n – )
    • write n chars at address a to info screen.
  • spacer SLOW ( – )
    • sets variable OUTFILE to use slow output routines
  • spacer FAST ( – )
    • sets variable OUTFILE to use fast output routines, which cause line breaks during output to not update the screen. KEY, KEY?, MS (i.e. whenever JS-Forth waits for an event), PAGE, CLS, error output, still do.
  • spacer STARTCLOCK ( – )
    • remember current time
  • spacer ELAPSED ( – u )
    • calculate elapsed milliseconds since last STARTCLOCK
  • spacer RANDOM ( u1 – u2 )
    • return a random number between 0 and u1.

MULTIPLE STANDARDS AND DIALECT SUPPORT

  • spacer COMPLIANCE ( – a )
    • a variable, to select forth standard jsforth should comply to.
    • any other value than 0 filters words found by FIND and WORDS, according the selected standard.
  • spacer ANS ( – )
    • request DPANS94-compliance by writing to variable COMPLIANCE
  • spacer F83 ( – )
    • request F83-compliance by writing to variable COMPLIANCE
  • spacer F79 ( – )
    • request F79-compliance by writing to variable COMPLIANCE
  • spacer FIG ( – )
    • request fig-compliance by writing to variable COMPLIANCE
  • spacer JSF ( – )
    • makes DPANS words and JSFORTH extensions available.

Whenever a standard is masked, the above words can not be found anymore, as they comply with no standard. To return to a dictionary, which provides those words not strictly belonging to a standard, use JSF (even though JSF is not a word of any standard, it has been made visible through all standards, to make changing standards possible while one has been selected.

  • Standards are encoded as bit masks, and thus can be combined.
  • Not all words have been correctly categorized according the standards which require them. Not all alternative implementations of those words which changed throughout standards have been supplied yet. The information used for masking words is the same you get with HELP <word> (which is only available in the JSF vocabulary).
  • jsforth starts in JSF mode.
  • Words with different semantics through standards are implemented by redefinition. one word is filtered by one, another by another standard.
    • example: NOT is only available in fig/f79 mode. ' has different implementations for ANS/F83 vs. FIG/F79, as has LEAVE

Different standards have not be consequently set yet, and need to be checked against their corresponding documents.


  Home   Changes   Preferences   Edit   Favorites   Keywords
gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.