# test file for the assembler
# contains every single instruction supported

org 0x0
	lda #12
	sta 00

foo:
	lda 42+12-3
	sta 0x60
	lda #0x23
	lda 0xfff
bar:
	jmp foo
	bra baz
	nop
	nop
	nop
	bra bar
	timex "blammo!"
baz:
; opcodes 00-0F
	brset 0,12,bar
	brclr 0,12,bar
	brset 1,12,bar
	brclr 1,12,bar
	brset 2,12,bar
	brclr 2,12,bar
	brset 3,12,bar
	brclr 3,12,bar
	brset 4,12,bar
	brclr 4,12,bar
	brset 5,12,bar
	brclr 5,12,bar
	brset 6,12,bar
	brclr 6,12,bar
	brset 7,12,bar
	brclr 7,12,bar
; opcodes 10-1F
	bset 0,12
	bclr 0,12
	bset 1,12
	bclr 1,12
	bset 2,12
	bclr 2,12
	bset 3,12
	bclr 3,12
	bset 4,12
	bclr 4,12
	bset 5,12
	bclr 5,12
	bset 6,12
	bclr 6,12
	bset 7,12
	bclr 7,12
; opcodes 20-2F
	bra lbl1
	brn lbl1
	bhi lbl1
	bls lbl1
	bcc lbl1
	bcs lbl1
	blo lbl1     ; duplicate opcode.. bcs and blo are the same
	bne lbl1
	beq lbl1
	bhcc lbl1
	bhcs lbl1
	bpl lbl1
	bmi lbl1
	bmc lbl1
	bms lbl1
	bil lbl1
	bih lbl1
; opcodes 30-3F
	neg 42
	com 42
	lsr 42
	ror 42
	asr 42
	asl 42
	lsl 42
	rol 42
	dec 42
	inc 42
	tst 42
	clr 42
; opcodes 40-4F
	nega
	mul
	coma
	lsra
	rora
	asra
	asla
	lsla
	rola
	deca
	inca
	tsta
	clra
; opcodes 50-5F
	negx
	comx
	lsrx
	rorx
	asrx
	aslx
	lslx
	rolx
	decx
	incx
	tstx
	clrx
; opcodes 60-6F
	neg 42 ,X
	com 42 ,X
	lsr 42 ,X
	ror 42 ,X
	asr 42 ,X
	asl 42 ,X
	lsl 42 ,X
	rol 42 ,X
	dec 42 ,X
	inc 42 ,X
	tst 42 ,X
	clr 42 ,X
; opcodes 70-7F
	neg ,X
	com ,X
	lsr ,X
	ror ,X
	asr ,X
	asl ,X
	lsl ,X
	rol ,X
	dec ,X
	inc ,X
	tst ,X
	clr ,X
; opcodes 80-8F
	rti
	rts
	swi
	stop
	wait
; opcodes 90-9F
	tax
	clc
	sec
	cli
	sei
	rsp
	nop
	txa
; opcodes A0-AF
	sub #23
	cmp #23
	sbc #23
	cpx #23
	and #23
	bit #23
	lda #23
	eor #23
	adc #23
	ora #23
	add #23
	bsr 43
	ldx #23
; opcodes  B0-BF
	sub 42
	cmp 42
	sbc 42
	cpx 42
	and 42
	bit 42
	lda 42
	sta 42
	eor 42
	adc 42
	ora 42
	add 42
	jmp 42
	jsr 42
	ldx 42
	stx 42
; opcodes C0-CF
	sub 424
	cmp 424
	sbc 424
	cpx 424
	and 424
	bit 424
	lda 424
	sta 424
	eor 424
	adc 424
	ora 424
	add 424
	jmp 424
	jsr 424
	ldx 424
	stx 424
; opcodes D0-DF
	sub 424,X
	cmp 424,X
	sbc 424,X
	cpx 424,X
	and 424,X
	bit 424,X
	lda 424,X
	sta 424,X
	eor 424,X
	adc 424,X
	ora 424,X
	add 424,X
	jmp 424,X
	jsr 424,X
	ldx 424,X
	stx 424,X
; opcodes E0-EF
	sub 42,X
	cmp 42,X
	sbc 42,X
	cpx 42,X
	and 42,X
	bit 42,X
	lda 42,X
	sta 42,X
	eor 42,X
	adc 42,X
	ora 42,X
	add 42,X
	jmp 42,X
	jsr 42,X
	ldx 42,X
	stx 42,X
; opcodes F0-FF
	sub ,X
	cmp ,X
	sbc ,X
	cpx ,X
	and ,X
	bit ,X
	lda ,X
	sta ,X
	eor ,X
	adc ,X
	ora ,X
	add ,X
	jmp ,X
	jsr ,X
	ldx ,X
	stx ,X
; pseudo opps:
org 0
	timex "blammo"
	db 42
	db 41, 42, 43, 44
