;TS4.MAC contains some globally used subroutines.
; See list of entry points for names.

	PAGE 70
	.Z80
	TITLE TS4

	SUBTTL STATEMENT SCHEMATA

	ENTRY SCHEM1,SCHEM2,SCHEM3

SCHEM1:	;returns the next function argument in ARGST
	;or sets the Carry flag if end of ALIST is reached.
	EXTERNAL ARGST,$ALIST
	EXTERNAL SUCCA
	LD IX,ARGST
	LD IY,ARGST
	CALL SUCCA
	LD HL,($ALIST)
	LD DE,(ARGST)
	SCF
	CCF
	SBC HL,DE
	RET

SCHEM2:	;returns the next function argument in ARGST
	;or sets the Carry flag if the argument is empty
	EXTERNAL ARGST,$ARGST
	EXTERNAL SUCCA
	LD IX,ARGST
	LD IY,ARGST
	CALL SUCCA
	LD HL,($ARGST)
	LD DE,(ARGST)
	SCF
	CCF
	SBC HL,DE
	RET

SCHEM3:	;returns the form whose name is in ARGST in ENTST
	;or sets the Zero flag if no form with this name was found
	EXTERNAL ARGST,ENTST,$FLIST
	EXTERNAL FLUP
	LD IX,ARGST
	LD IY,ENTST
	CALL FLUP
	LD HL,($FLIST)
	LD DE,(ENTST)
	SCF
	CCF
	SBC HL,DE
	RET

	END
