ForthVM Class Reference
[Internal - Internal implementation of the forth virtual machine]

Implementation of the forth virtual machine. More...

Inheritance diagram for ForthVM:
Inheritance graph
[legend]

List of all members.

Private Member Functions

bool DoReset ()
CELL DoQuit ()
CELL DoExecute (CELL xt)
CELL DoEvaluate (const CHAR *text, unsigned textLength)
void DoPush (const CELL *cells, unsigned numCells)
const CELLDoPop (unsigned numCells)
CELL Run (const CELL *ip)
CELL UncaughtException (CELL exceptionNumber)

Private Attributes

ForthIoIo
CELLSp0
CELLRp0
CELLMemoryEnd
CELLSp
CELLRp
CHARDp
UCELL DpLimit
UCELL SourceSize
CELL SourceBase
UCELL SourceOffset
CELL SourceId
CELL Context [MaxWordlists+1]
CELL Current
CELL Latest
CELL State
CELL Base
CELLExceptionFrame
CELL ExceptionMessage [2]
Wordlist ForthWordlist
Wordlist EnvironmentWordlist

Friends

class Forth

Detailed Description

Implementation of the forth virtual machine.

Definition at line 1598 of file forth.cpp.


Member Data Documentation

ForthIo* ForthVM::Io [private]

Object used to perform console i/o.

Definition at line 1636 of file forth.cpp.

CELL* ForthVM::Sp0 [private]

Initial value for the parameter stack.

Definition at line 1641 of file forth.cpp.

CELL* ForthVM::Rp0 [private]

Initial value for the return stack.

Definition at line 1646 of file forth.cpp.

The address immediately after the memory used by the virtual machine. Note, member data after this member is zeroed on reboot of forth VM

Definition at line 1652 of file forth.cpp.

CELL* ForthVM::Sp [private]

Saved value for the parameter stack. Only valid when VM code is not executing.

Definition at line 1658 of file forth.cpp.

CELL* ForthVM::Rp [private]

Saved value for the restore stack. Only valid when VM code is not executing.

Definition at line 1664 of file forth.cpp.

CHAR* ForthVM::Dp [private]

The Dictionary Pointer. (The value returned by HERE.)

Definition at line 1669 of file forth.cpp.

The maximum valid value for Dp

Definition at line 1674 of file forth.cpp.

Length of the current input buffer.

Definition at line 1679 of file forth.cpp.

Start address of the current input buffer. Note, this member must immediately follow SourceSize.

Definition at line 1685 of file forth.cpp.

The address of this member is returned by >IN.

Definition at line 1690 of file forth.cpp.

Stores the value returned by SOURCE-ID Note, this member must immediately follow SourceOffset.

Definition at line 1696 of file forth.cpp.

List of wordlists in the dictionary search order. The first cell contains a count of the number of wordlists, following cells contain pointers to wordlists in the order they will be searched.

Definition at line 1703 of file forth.cpp.

Pointer to the wordlist to which new definitions will be added. I.e. contains the value returned by GET-CURRENT.

Definition at line 1709 of file forth.cpp.

CELL ForthVM::Latest [private]

Pointer to the Link Field Address of the last word to be defined. (Or the current word being defined.)

Definition at line 1715 of file forth.cpp.

CELL ForthVM::State [private]

The address of this member is returned by STATE.

Definition at line 1720 of file forth.cpp.

CELL ForthVM::Base [private]

The address of this member is returned by BASE.

Definition at line 1725 of file forth.cpp.

Pointer to the latest exception frame used by CATCH and THROW.

Definition at line 1730 of file forth.cpp.

c-addr and u which indicate the string associated with the last ABORT performed. Also used to store the name of a word when it wasn't found in the dictionary. This member is used in the implementation of QUIT to display a message when an uncaught THROW is executed.

Definition at line 1741 of file forth.cpp.

The main forth wordlist.

Definition at line 1746 of file forth.cpp.

Wordlist used to store words for environment queries.

Definition at line 1751 of file forth.cpp.


The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.1