; Edward Cheung
; 68B09 assembly program Demo
;   asm6809 rev 2.16 used for assembly.  https://www.6809.org.uk/asm6809/
;     typical command: asm6809 demo.asm -l demo.txt -H -o demo.hex
;
;   How to program: copy .hex file to host PC.  Set S4 format to "intel".  Download hex
;     file into S4.  Perform move of code from top of 0xFFFF (6809 address space) to top 
;     of 0x1FFFF (1 Meg PROM) with 'move 0F000,0FFFF,1F000'.  
;     Set S4 to AMD or Intel 27C010.  Burn PROM.
;
	org	$F000   ; Put main near top of ROM
main	nop
	lda	#$55
	sta	$0400   ; write RAM
	lda	#$7A
	sta	$0401   ; write RAM
	lda	$0400	; read RAM
	lda	$0401	; read RAM
	nop
	jmp	main	; Loop

	org	$FFF0	; Setup vectors
	fdb	main
	fdb	main
	fdb	main
	fdb	main
	fdb	main
	fdb	main
	fdb	main
	fdb	main
	end
