AS09 Assembler for M6809 [1.42]. Page 1 --------------------------------- demo1.a09 ---------------------------------- 77 lines read, no errors in pass 1. *** name 'demo1.txt - a simple demonstration of 6809+a title '(c) 1981, conejo computer products' page AS09 Assembler for M6809 [1.42]. Page 2 --------------------- (c) 1981, conejo computer products --------------------- * file=demo1.txt * 6809 / apple demo prog * runs a counter on top line *** opt num 1000 = org 4096 ; <<< change as desired <<< 07f0 = screen equ $7f0 ; crt address c030 = beep equ $c030 ; i/o for speaker 1000 : 2002 start bra begin 1002 : 0628 adr fdb $628 ; screen addr 1004 : 328d016a begin leas endp+232,pc ; set stack pointer 1008 : ae8cf7 ldx adr,pc ; screen address 100b : 318d0065 leay msg1,pc ; "6809 COUNTING ...." 100f : a6a0 l100 lda ,y+ 1011 : a780 sta ,x+ 1013 : 26fa bne l100 1015 : c630 l200 ldb #'0' ; ASCII ZERO 1017 : 318d0067 leay msg1a,pc ; buffer address 101b : 6c26 inc 6,y ; from here we increment bcd digits 101d : a626 lda 6,y ; by adding 1 til '9' then do carry 101f : 8139 cmpa #'9' 1021 : 2341 bls l300 1023 : e726 stb 6,y 1025 : 6c25 inc 5,y 1027 : a625 lda 5,y 1029 : 8139 cmpa #'9' 102b : 2337 bls l300 102d : e725 stb 5,y 102f : 6c24 inc 4,y 1031 : a624 lda 4,y 1033 : 8139 cmpa #'9' 1035 : 232d bls l300 1037 : e724 stb 4,y 1039 : 7dc030 tst beep ; click speaker 103c : 6c23 inc 3,y 103e : a623 lda 3,y 1040 : 8139 cmpa #'9' 1042 : 2320 bls l300 1044 : e723 stb 3,y 1046 : 6c22 inc 2,y 1048 : a622 lda 2,y 104a : 8139 cmpa #'9' 104c : 2316 bls l300 104e : e722 stb 2,y 1050 : 6c21 inc 1,y 1052 : a621 lda 1,y 1054 : 8139 cmpa #'9' * inc a ;start lda * ; bra start 1056 : 230c bls l300 1058 : e721 stb 1,y 105a : 6ca4 inc ,y 105c : a6a4 lda ,y 105e : 8139 cmpa #'9' 1060 : 2302 bls l300 1062 : e7a4 stb ,y 1064 : 308d000c l300 leax msg1,pc ; send data to crt 1068 : 10ae8c96 ldy adr,pc AS09 Assembler for M6809 [1.42]. Page 3 --------------------- (c) 1981, conejo computer products --------------------- 106c : a680 l400 lda ,x+ ; move local to crt memory 106e : a7a0 sta ,y+ 1070 : 26fa bne l400 1072 : 20a1 bra l200 ; main loop 1074 : 3638303920434f.. msg1 fcc "6809 COUNTING " 1082 : 3030303030303000 msg1a db "0000000",0 000e = cnt equ msg1a-msg1 108a = endp equ * 108a = end start No errors in pass 2. Wrote binary from address $1000 through $1089. Total size 138 bytes. Program start address is at $1000 (4096).