; TfsSwat.asm -- TFS Swat context-switching procedure
; Copyright Xerox Corporation 1979

.ent TFSSwatContextProc

.srel
TFSSwatContextProc: .TFSSwatContextProc
.nrel

.TFSSwatContextProc:
	snz 0 0		; entering Swat?
kwait:	inc 0 0 snr	; yes, wait for no Trident commands pending
	 jmp 1 3
	lda 1 @.KBLK
	sz 1 1
	 jmp kwait
	inc 1 1 szr	; wait a while longer for things to settle
	 jmp .-1
	jmp 1 3

.KBLK:	640

.end