*
*  TEST FOR XLATE -- 8080-TO-Z80 TRANSLATOR
*

;
;  DEFINE SOME USEFUL CONSTANTS
;
V16	EQU	6789H
V8	EQU	45H

;
;  LET'S DO IT --
;
	ORG	100H
;
;  JMPS
;
	JMP	V16
	JNZ	V16
	JZ	V16
	JNC	V16
	JC	V16
	JPO	V16
	JPE	V16
	JP	V16
	JM	V16
	pchl		;this checks for proper case conversion
;
;  CALLS 'AND a proper case conversion' test
;
	CALL	V16
	CNZ	V16
	CZ	V16
	CNC	V16
	CC	V16
	CPO	V16
	CPE	V16
	CP	V16
	CM	V16
;
;  RETS
;
	RET
	RNZ
	RZ
	RNC
	RC
	RPO
	RPE
	RP
	RM
;
;  RESTARTS
;
	RST	0
	RST	1
	RST	2
	RST	3
	RST	4
	RST	5
	RST	6
	RST	7
;
;  ROTATES
;
	RLC
	RRC
	RAL
	RAR
;
;  CONTROLS
;
	NOP
	HLT
	DI
	EI
;
;  MVI
;
	MVI	B,V8
	MVI	C,V8
	MVI	D,V8
	MVI	E,V8
	MVI	H,V8
	MVI	L,V8
	MVI	M,V8
	MVI	A,V8
;
;  ACC IMMEDIATE
;
	ADI	V8
	ACI	V8
	SUI	V8
	SBI	V8
	ANI	V8
	XRI	V8
	ORI	V8
	CPI	V8
;
;  LOAD IMMEDIATE
;
	LXI	B,V16
	LXI	D,V16
	LXI	H,V16
	LXI	SP,V16
;
;  STACK OPS
;
	PUSH	B
	PUSH	D
	PUSH	H
	PUSH	PSW
;
	POP	B
	POP	D
	POP	H
	POP	PSW
;
	XTHL
	SPHL
;
;  DOUBLE ADD
;
	DAD	B
	DAD	D
	DAD	H
	DAD	SP
;
;  INCREMENT
;
	INR	B
	INR	C
	INR	D
	INR	E
	INR	H
	INR	L
	INR	M
	INR	A
;
	INX	B
	INX	D
	INX	H
	INX	SP
;
;  DECREMENT
;
	DCR	B
	DCR	C
	DCR	D
	DCR	E
	DCR	H
	DCR	L
	DCR	M
	DCR	A
;
	DCX	B
	DCX	D
	DCX	H
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