====== BINEX ====== Header for : Binex Module size: $278 #632 Module CRC : $D250BD (Good) Hdr parity : $52 Exec. off : $0030 #48 Data size : $02C5 #709 Edition : $43 #67 Ty/La At/Rv: $11 $81 Prog mod, 6809 Obj, re-ent, R/O ===== CODE ===== * Disassembly by Os9disasm of binex mod L0278,L000d,$11,$81,L0030,D02c5 * OS-9 system function equates F$Exit equ $06 I$Create equ $83 I$Open equ $84 I$Read equ $89 I$Write equ $8a I$ReadLn equ $8b I$WritLn equ $8c * class D external label equates Dfffa equ $fffa Dffff equ $ffff * OS9 data area definitions D0000 rmb 1 D0001 rmb 1 D0002 rmb 2 D0004 rmb 1 D0005 rmb 1 D0006 rmb 1 D0007 rmb 2 D0009 rmb 1 D000a rmb 3 D000d rmb 29 D002a rmb 2 D002c rmb 1 D002d rmb 1 D002e rmb 1 D002f rmb 2 D0031 rmb 2 D0033 rmb 658 D02c5 equ . L000d fcb $42 rol 14,s fcb $65 eorb $436f neg 31090 rol 7,s asl -12,s bra L004e rts fcb $38 fcb $32 bra L006f clr -12,s clr -14,s clr 12,s fcb $61 bge L004b rola jmp 3,s bgt L0031 L0030 stx D0002 L0031 equ *-1 lda #1 os9 I$Open bcc L003c L0039 os9 F$Exit L003c sta D0000 stx D0002 lda #2 ldb #$7f os9 I$Create bcs L0039 sta D0001 L004b stx D0002 ldd #0 L004e equ *-2 sta D0006 std D000a std D002f ldx #21296 stx D002d ldx #12336 stx D0031 stx D0033 L0062 leax L0217,pcr lda #1 ldy #$0022 os9 I$Write L006f leax 49,u lda #0 ldy #5 os9 I$ReadLn leay Dffff,y cmpy #0 beq L0062 cmpy #4 bhi L0062 beq L00a7 tfr y,d pshs b decb leax 49,u leay 4,x L0095 lda b,x sta ,-y decb bpl L0095 ldb #4 subb ,s+ lda #$30 L00a2 sta ,-y decb bgt L00a2 L00a7 lbsr L0178 leax L01f9,pcr lda #1 ldy #$001e os9 I$Write leax 12,u lda #0 ldy #$0015 os9 I$ReadLn leay Dffff,y cmpy #0 bne L0120 L00ca lda D0000 leax 12,u ldy #$0020 os9 I$Read lblo L0160 cmpy #0 lbeq L0160 lda D0006 bne L0120 inc D0006 lda #$31 sta D002e ldx D0004 stx D000a ldx 12,u cmpx #$87cd beq L0120 leax L0239,pcr pshs y ldy #$003c lda #1 os9 I$Write leax 53,u ldy #2 lda #0 os9 I$ReadLn puls y lda 53,u anda #$df cmpa #$59 beq L0120 L011c clrb os9 F$Exit L0120 sty D0007 tfr y,d addb #3 stb D0009 leax 9,u clra ldb ,x L012e adda ,x+ decb bne L012e coma sta ,x leax 9,u leay 47,u ldb ,x incb L013e bsr L01b6 decb bne L013e ldb #$0d stb ,y leax 45,u ldy #$0073 lda D0001 os9 I$WritLn lblo L0039 ldd D000a addd D0007 std D000a lbra L00ca L0160 cmpb #$d3 lbne L0039 lda #$39 cmpa D002e beq L011c sta D002e ldx D0004 stx D000a ldy #0 bra L0120 L0178 bsr L017c sta D0004 L017c lda ,x+ bsr L0197 asla asla asla asla anda #$f0 pshs a lda ,x+ bsr L0197 adda ,s+ sta D0005 adda D002c sta D002c lda D0005 rts L0197 suba #$30 bmi L01a6 cmpa #9 ble L01a5 suba #7 cmpa #$0f bhi L01a6 L01a5 rts L01a6 leax >L01d7,pcr lda #2 ldy #$00ff os9 I$WritLn lbra L011c L01b6 pshs d lda ,x+ tfr a,b lsra lsra lsra lsra bsr L01cc sta ,y+ tfr b,a bsr L01cc sta ,y+ puls d,pc L01cc anda #$0f adda #$30 cmpa #$39 bls L01d6 adda #7 L01d6 rts L01d7 bpl L0203 bra L0229 clra fcb $4e blt L0227 fcb $45 lslb bra L0226 asla fcb $41 fcb $52 fcb $41 coma lsrb fcb $45 fcb $52 bra L0232 fcb $4e coma clra fcb $55 fcb $4e lsrb fcb $45 fcb $52 fcb $45 lsra asr D000d L01f9 fcb $45 jmp -12,s fcb $65 fcb $72 bra L026e fcb $61 tst 5,s L0203 bra L026b clr -14,s bra L0271 fcb $65 fcb $61 lsr 5,s fcb $72 bra L0282 fcb $65 com 15,s fcb $72 lsr Dfffa,y bra L025d L0217 equ *-1 jmp -12,s fcb $65 fcb $72 bra L0291 lsr $6172 lsr $696e fcb $67 bra L0288 L0226 equ *-1 L0227 lsr 4,s L0229 fcb $72 fcb $65 com 29472 ror 15,s fcb $72 bra L0299 L0232 equ *-1 rol 12,s fcb $65 abx bra L025d L0239 asr D000d dec D002a bpl L025f fcb $4e clr -12,s bra L02a5 bra L02a8 rol 14,s L0248 fcb $61 fcb $72 rol $206c clr 1,s fcb $64 bra L02bf clr 4,s fcb $75 inc 5,s bra L02bf rol 12,s fcb $65 bgt L027e L025d equ *-1 bra L02b0 L025f equ *-1 fcb $72 clr 3,s fcb $65 fcb $65 fcb $64 bra L02c9 jmp -7,s asr $6179 L026b equ *-2 bra L0297 L026e equ *-1 rolb ble L02c0 L0271 equ *-1 bvs L02b3 fcb $20 emod L0278 equ * end ===== RTS ===== Return to [[:OS-9:]] or [[:Top:]]