license
6.1.1000 CREATE

CORE

( "name" -- )

Skip leading space delimiters. Parse name delimited by a space. Create a definition for name with the execution semantics defined below. If the data-space pointer is not aligned, reserve enough data space to align it. The new data-space pointer defines name's data field. CREATE does not allocate data space in name's data field.

name Execution: ( -- a-addr )

a-addr is the address of name's data field. The execution semantics of name may be extended by using DOES>.

  
	: CREATE  ( "name" -- ) 
    	'create @execute 
    ;
     
 
	include ./base_altering.html
	 
ANS 9.6.1.0875 CATCH

EXCEPTION

( i*x xt -- j*x 0 | i*x n )

Push an exception frame on the exception stack and then execute the execution token xt (as with EXECUTE) in such a way that control can be transferred to a point just after CATCH if THROW is executed during the execution of xt.

If the execution of xt completes normally (i.e., the exception frame pushed by this CATCH is not popped by an execution of THROW) pop the exception frame and return zero on top of the data stack, above whatever stack items would have been returned by xt EXECUTE. Otherwise, the remainder of the execution semantics are given by THROW.

 
	CODE CATCH       ( cfa -- n )
		S )+ W MOV
		OP R -) MOV         \ object pointer must be restored.
		LP R -) MOV         \ local pointer has to be restored.
		S R -) MOV          \ stackpointer
		handler U) R -) MOV \ hander 
		R handler U) MOV    \ save so throw
		W ) JSR
		R )+ handler U) MOV
		3 CELLS # R ADD
		0 # S -) MOV
	NEXT
	 
6.1.1200 DEPTH

CORE

( -- +n )

+n is the number of single-cell values contained in the data stack before +n was placed on the stack.

 
	: DEPTH ( -- n)
		_%data_stack_end @ @s - 4/ 2-
	;
	 
6.2.2290 TIB

t-i-b CORE EXT

( -- c-addr )

c-addr is the address of the terminal input buffer.

Note: This word is obsolescent and is included as a concession to existing implementations.

COLDFORTH The TIB returns the base address of the input buffer no matter what the source.

 
	: TIB ( --addr ) 
		%tib @ 
	;