           /part 22
/test lia, lai, swp, and sni
/also zero memory for jdp test of part 23

0/

	22	/program number
stt,	szs 10	/if up,
	hlt	/halt after read-in

/start of tests
/test lia and lai

	cla>>05<<cli	/clear ac and io simultaneously
	lia	/test lia of 0s to 0s
	dio tmp
	sas tmp
	hlt	/ac must be same as io
	sza
	hlt	/error, lia changes ac

	lai	/test lai of 0s to 0s
	dio tmp
	sas tmp	/ac should equal io
	hlt	/error
	sza
	hlt	/error

	lio ons	/777777
	lia	/test lia of 0s into 1s
	dio tmp
	sas tmp
	hlt
	sza
	hlt	/error

	cma
	lai	/test lai of 0s into 1s
	dio tmp
	sas tmp
	hlt	/error
	sza
	hlt	/error

	cma
	lia	/test lia of 1s into 0s
	dio tmp
	sas tmp
	hlt	/error
	sas ons
	hlt	/error

	cla
	lai	/test lai of 1s into 0s
	dio tmp
	sas tmp
	hlt	/error
	sas ons
	hlt	/error







                                                             	lia	/test lia of 1s into 1s
	dio tmp
	sas tmp
	hlt	/error
	sas ons
	hlt	/error

	lai	/test lai of 1s into 1s
	dio tmp
	sas tmp
	hlt	/error
	sas ons
	hlt	/error

/test of swap

	cla>>05<<cli	/clears ac and io simultaneously
	swp	/swap ac and io
	sza
	hlt	/error
	lai
	sza
	hlt	/error

	cma
	swp	/test swap of 1s for 0s
	sza
	hlt	/error
	lai	sas ons
	hlt	/error

	cla
	swp	/test swap of 0s for 1s
	sas ons
	hlt	/error
	lai
	sza
	hlt	/error

	cla>>05<<cma>>05<<lia	/should load ac and io with 1s
	swp	/test swap of 1s for 1s
	sas ons
	hlt	/error
	lai
	sas ons
	hlt	/error

/test sni--skip on non-zero io

	lio ons	/777777
	sni	/should skip
	hlt	/error in sni
	sni i	/should not skip
	skp i	/ok
	hlt	/error










                                                           	cli	/0s to io
	sni	/should not skip
	skp i	/ok
	hlt	/error
	sni i	/should skip
	hlt	/error

/end of tests for part 22

	szs 20		/if up
	jmp stt 2	/program iterates
	jmp 7766		/zero memory for next program

/random constants

ons,	777777
tmp,	0

/section to  zero memory

7765/

	770012	/this is -7765
zrm,	dzm 0
	idx zrm
	isp 7765
	jmp zrm

/rim loader just above this

/end of program

foo,

start stt
                                              
                                             
,	dzm  0
	 x  zr   s  7765
	jmp zrm

/rim loader just above this

/end of program

foo,

starrtrrt 2tt
                                              
                                             

