* test na poprawnosc asemblacji
* program sklada sie z wszystkich mozliwych
* trybow i rozkazow CPU65816
* komentarz zawiera informacje o oczekiwanym wyniku asemblacji rozkazu

        opt h-
        org $8000

Z       equ $80
Q       equ $a000
W       equ $6070
T       equ $708090

        opt c+

	LDA	(Z,X)   ;$A1
	LDA	Z,S	;$A3
	LDA	Z	;$A5
	LDA	[Z]	;$A7
	LDA	#6	;$A9
	LDA	Q	;$AD
	LDA	T	;$AF
	LDA	(Z),Y	;$B1
	LDA	(Z)	;$B2
	LDA	(Z,S),Y	;$B3
	LDA	Z,X	;$B5
	LDA	[Z],Y	;$B7
	LDA	Q,Y	;$B9
	LDA	Q,X	;$BD
	LDA	T,X	;$BF

	LDX	#6	;$A2
	LDX	Z	;$A6
	LDX	Q	;$AE
	LDX	Z,Y	;$B6
	LDX	Q,Y	;$BE

	LDY	#6	;$A0
	LDY	Z	;$A4
	LDY	Q	;$AC
	LDY	Z,X	;$B4
	LDY	Q,X	;$BC

	STA	(Z,X)	;$81
	STA	Z,S	;$83
	STA	Z	;$85
	STA	[Z]	;$87
	STA	Q	;$8D
	STA	T	;$8F
	STA	(Z),Y	;$91
	STA	(Z)	;$92
	STA	(Z,S),Y	;$93
	STA	Z,X	;$95
	STA	[Z],Y	;$97
	STA	Q,Y	;$99
	STA	Q,X	;$9D
	STA	T,X	;$9F

	STX	Z	;$86
	STX	Q	;$8E
	STX	Z,Y	;$96

	STY	Z	;$84
	STY	Q	;$8C
	STY	Z,X	;$94

	ADC	(Z,X)	;$61
	ADC	Z,S	;$63
	ADC	Z	;$65
	ADC	[Z]	;$67
	ADC	#6	;$69
	ADC	Q	;$6D
	ADC	T	;$6F
	ADC	(Z),Y	;$71
	ADC	(Z)	;$72
	ADC	(Z,S),Y	;$73
	ADC	Z,X	;$75
	ADC	[Z],Y	;$77
	ADC	Q,Y	;$79
	ADC	Q,X	;$7D
	ADC	T,X	;$7F

	AND	(Z,X)	;$21
	AND	Z,S	;$23
	AND	Z	;$25
	AND	[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Z,X	;$74
	STZ	Q	;$9C
	STZ	Q,X	;$9E

	SEP	#6	;$E2

	REP	#6	;$C2

	TRB	Z	;$14
	TRB	Q	;$1C

	TSB	Z	;$04
	TSB	Q	;$0C

	BRA	*+4	;$80

	BRL	W	;$82

	COP	#$056	;$02

	MVN	Z,$40	;$54

	MVP	Z,$30	;$44

	PEA	Q	;$62
	PEA	(Z)	;$D4
	PEA	#$40	;$F4

	PHB		;$8B

	PHD		;$0B

	PHK		;$4B

	PHX		;$DA

	PHY		;$5A

	PLB		;$AB

	PLD		;$2B

	PLX		;$FA

	PLY		;$7A

	RTL		;$6B

	STP		;$DB

	TCD		;$5B

	TCS		;$1B

	TDC		;$7B

	TSC		;$3B

	TXY		;$9B

	TYX		;$BB

	WAI		;$CB

	WDM		;$42

	XBA		;$EB

	XCE		;$FB
