	TITLE	- - - MAL 6800 V 1.3 SELF TEST - - -
	PAGE	12/7/78 11:30 TMM
	NAME	ASMSELFTEST.ASM
*
*	THIS FILE COMPRISES A TEST FOR MAL/6800 1.3.  IT TESTS
*	THAT ALL KNOWN BUGS HAVE BEEN CORRECTED, AND IS A HANDY
*	REGRESSION CHECKER.
*
	PAGE	TEST HANDLING OF ELSEIF.
*
*  (1)	TEST ELSEIF BEING PROPERLY SKIPPED.
*

	IF	1
	0
	ELSEIF	1
	#ERROR
	ELSEIF	1
	#ERROR		SECOND CLAUSE.
	FIN

*
*  (2)	TEST ELSEIF BEING INVOKED.
*

	IF	0
	#ERROR		IF 0
	ELSEIF	1
ELSEIFT2GOOD	EQU	1
	ELSEIF	1
	#ERROR		SECOND ELSEIF 1 AFTER IF 0.
	FIN
	IFUND	ELSEIFT2GOOD
	#ERROR		ELSEIF TEST 2 FAILED.
	FIN

*
*  (3)	TEST OTHER ELSEIF'S BEING INVOKED.
*

	IF	0
	#ERROR		IF 0.
	ELSEIF	0
	#ERROR		ELSEIF 0 AFTER IF 0.
	ELSEIF	1
ELSEIFT3GOOD	EQU	1
	0
	FIN

	IFUND	ELSEIFT3GOOD
	#ERROR		ELSEIF WASN'T EXECUTED.
	FIN	ELSEIFT3GOOD.
	PAGE	TEST ## OPERATOR.
*
*  TEST SHIFT OPERATOR.
*

	IF	($B3##8)#$B300
	#ERROR	($B3##8)#$B300
	FIN

	IF	(($B300##-8)##8)#$B300
	#ERROR	(($B300##-8)##8)#$B300
	FIN
	PAGE	TEST RPT ON A RMB
*
*  THIS TEST FAILS FAIRLY OBVIOUSLY -- IT WILL CRASH THE SYSTEM
*  IF THE ASSEMBLER ISN'T WORKING RIGHT.
*

RPTTSTSYM	RPT	27
	RMB	5

	EQU	RPTTSTX		SHOW THE VALUE IN CASE OF PHASE ERROR....
RPTTSTX	EQU	*	IF PHASE ERROR, WE HAVE PROBLEMS WITH RPT.

	IF	(*-RPTTSTSYM)#5*27
	#ERROR	SIGH... RPT ON RMB BLEW UP....
	FIN	(*-RPTTSTSYM)#5*27
	END
