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,R0
	RRR,R0
	RRR,R0
	BSTR,UN	PCRED
	LODZ,R2
	BSTR,UN	PCRED
	BCTA,UN	TITLE
*
PCRED	ANDI,R0	H'F'	CONVERT CREDIT TO ASCII
	ADDI,R0	H'30'	AND PRINT VALUE
	BSTA,UN	COUT
TEXT	RETC,UN
*
HEAD	DATA	H'50,4F,4B,45,52,20,4D,2F'	POKER M/
	DATA	H'43,0,D,A,A,42,41,4E'	C____BAN
	DATA	H'4B,20,24,20,0,D,A,50'	K $ ___P
	DATA	H'55,4C,4C,D,A,A'	ULL___
CARD	DATA	H'0,39,4A,51,4B,41,37'	_9JQKA7
PRIZE	DATA	H'3,10,14,18,23,30,99'	____#0_
CREDIT	RES	1
DATA1	DATA	H'11'	_
DATA2	DATA	H'12'	_
DATA3	DATA	H'31'	1
*
	END	H'440'
