[net.micro.cpm] Subroutine to test for 8080 or Z80.

CC.Otken@utexas-20.arpa (05/10/83)

From:  John Otken <CC.Otken@utexas-20.arpa>

Quite a few people seem to be writing Z80 only code these days which
could be bad news to some 8080/8085 CPUs.  Well, here is a subroutine
which exploits the subtle differences in 8080s and Z80s.

;;	Z80 - Test for Z80 CPU.
;
;	exit:	(Zf) = set if Z80 processor
;			BC, DE, HL unchanged
;
Z80	xra	a		; Clear parity flag
	ori	80h
	adi	80h		; Clear zero, set parity if Z80
	jpo	Z801		;   if 8080/8085
	xra	a		; Set zero
Z801	ret
-------