====== EDIT ====== Header for : Edit Module size: $1516 #5398 Module CRC : $04652B (Good) Hdr parity : $2B Exec. off : $0161 #353 Data size : $0C1F #3103 Edition : $03 #3 Ty/La At/Rv: $11 $81 Prog mod, 6809 Obj, re-ent, R/O ===== CODE ===== * Disassembly by Os9disasm of edit mod L1516,L000d,$11,$81,L0161,D0c1f * OS-9 system function equates F$Link equ $00 F$UnLink equ $02 F$Fork equ $03 F$Wait equ $04 F$Exit equ $06 F$Mem equ $07 F$Icpt equ $09 F$PErr equ $0f F$PrsNam equ $10 I$Create equ $83 I$Open equ $84 I$Delete equ $87 I$Read equ $89 I$Write equ $8a I$ReadLn equ $8b I$WritLn equ $8c I$Close equ $8f * class D external label equates Dfffe equ $fffe Dffff equ $ffff * OS9 data area definitions D0000 rmb 1 D0001 rmb 1 D0002 rmb 1 D0003 rmb 1 D0004 rmb 1 D0005 rmb 1 D0006 rmb 1 D0007 rmb 1 D0008 rmb 1 D0009 rmb 1 D000a rmb 1 D000b rmb 1 D000c rmb 2 D000e rmb 1 D000f rmb 1 D0010 rmb 1 D0011 rmb 1 D0012 rmb 2 D0014 rmb 2 D0016 rmb 2 D0018 rmb 2 D001a rmb 2 D001c rmb 2 D001e rmb 2 D0020 rmb 1 D0021 rmb 2 D0023 rmb 1 D0024 rmb 1 D0025 rmb 1 D0026 rmb 1 D0027 rmb 2 D0029 rmb 1 D002a rmb 1 D002b rmb 2 D002d rmb 2 D002f rmb 1 D0030 rmb 2 D0032 rmb 4 D0036 rmb 1 D0037 rmb 1 D0038 rmb 1 D0039 rmb 1 D003a rmb 1 D003b rmb 1 D003c rmb 1 D003d rmb 1 D003e rmb 1 D003f rmb 1 D0040 rmb 1 D0041 rmb 1 D0042 rmb 1 D0043 rmb 1 D0044 rmb 1 D0045 rmb 2 D0047 rmb 1 D0048 rmb 1 D0049 rmb 2 D004b rmb 2 D004d rmb 1 D004e rmb 1 D004f rmb 2 D0051 rmb 4 D0055 rmb 2 D0057 rmb 13 D0064 rmb 7 D006b rmb 2 D006d rmb 2 D006f rmb 5 D0074 rmb 7 D007b rmb 5 D0080 rmb 9 D0089 rmb 1 D008a rmb 4 D008e rmb 16 D009e rmb 7 D00a5 rmb 1 D00a6 rmb 11 D00b1 rmb 3 D00b4 rmb 2 D00b6 rmb 15 D00c5 rmb 8 D00cd rmb 2 D00cf rmb 2 D00d1 rmb 2 D00d3 rmb 2 D00d5 rmb 1 D00d6 rmb 18 D00e8 rmb 4 D00ec rmb 1 D00ed rmb 10 D00f7 rmb 4 D00fb rmb 3 D00fe rmb 2 D0100 rmb 2847 D0c1f equ . L000d fcb $45 lsr 9,s andb $0328 coma bvs L0047 rts fcb $38 leay 13,u rol 3,s fcb $72 clr -9,s fcb $61 fcb $72 fcb $65 L0022 fcb $01 lbra L0292 lbra L0c38 lbra L0bec lbra L0be3 lbra L100f lbra L0770 lbra L06ea lbra L0716 lbra L073f lbra L04a1 lbra L046b lbra L05d6 L0047 lbra L0626 lbra L0094 lbra L0b96 lbra L0b01 L0053 lda #0 sta 35,u rti L0059 ldx D000e jmp ,x L005d lda D0026 lbsr L0107 lda #$3a lbsr L0107 ldx D0012 leax 375,x lda D000a ldy #$0080 os9 I$ReadLn bcc L0081 cmpb #$d3 lbeq L114d lbra L12aa L0081 rts L0082 pshs d,x lbsr L06d7 bsr L008b puls d,x,pc L008b pshs d lbsr L0130 bsr L0094 puls d,pc L0094 pshs d,x,y cmpd #0 beq L00c6 leay d,x pshs y L00a0 tst D0037 beq L00ac lda #$20 bsr L0107 bsr L0107 bsr L0107 L00ac tst D0023 beq L00c4 lda ,x+ bsr L0107 cmpx ,s beq L00be cmpa #$0d bne L00ac bra L00a0 L00be cmpa #$0d beq L00c4 bsr L00ff L00c4 puls y L00c6 puls d,x,y,pc L00c8 pshs d,y ldd D0002 tstb beq L00e0 cmpa ,s bne L00e0 ldd D0021 addd #1 std D0021 ldb D0020 adcb #0 stb D0020 L00e0 bsr L0130 tfr d,y lda ,s os9 I$Write lblo L12aa puls d,y,pc L00ef pshs a bsr L00ff lda D0037 clr D0037 bsr L008b sta D0037 puls a,pc L00fd bsr L00ff L00ff pshs a lda #$0d bsr L0107 puls a,pc L0107 pshs a,x,y lda D000b ldy #1 tfr s,x tst D0041 bmi L0119 tst D003e beq L0120 L0119 os9 I$WritLn lblo L12aa L0120 puls a,x,y,pc L0122 pshs x lda ,x+ cmpa #$0d lbeq L1272 bsr L0132 puls x,pc L0130 lda #$0d L0132 pshs x,y ldb #$0d ldy #0 L013a cmpx D001c beq L014c leay D0001,y cmpb ,x beq L014c cmpa ,x+ bne L013a leay Dffff,y bra L0152 L014c cmpa #$0d lbne L1272 L0152 tfr y,d cmpd #0 puls x,y,pc L015a pshs d,x,u os9 F$PrsNam puls d,x,u,pc L0161 tfr u,d std D0012 sts D001e leas 1054,u addd #$041f std D0014 std D0016 std D001c std D001a pshs d,x,y,u leax L0022,pcr stx D000c leax L005d,pcr stx D000e leax L09dd,pcr stx D0010 ldd #0 std D0051 std D006f std D0089 leax L1482,pcr stx D004d leax L13cf,pcr stx D006b leax L0000,pcr stx D004f stx D006d leax L13b0,pcr lda #1 os9 F$Link bcs L01b5 jsr ,y L01b5 leax L13b6,pcr lda #1 os9 F$Link bcs L01c2 jsr ,y L01c2 puls d,x,y,u lda #255 sta D0041 inca sta D0001 sta D0003 sta D0005 sta D0007 sta D000a sta D003d inca sta D000b sta D003e sta D0040 lda #$45 sta D0026 clr D0036 lbsr L0691 cmpa #$0d beq L0260 lbsr L015a bcs L0259 lda #1 stx D0032 os9 I$Open bcs L024b ldb #1 std D0000 pshs x leay 247,u leax L139f,pcr ldd #7 lbsr L0b96 pshs y ldx D0032 L020f cmpx 2,s beq L0220 lda ,x+ sta ,y+ cmpa #$2f bne L020f sty ,s bra L020f L0220 puls y leax L13a7,pcr ldd #8 lbsr L0b96 ldx D0032 ldd ,s subd D0032 sty D0032 lbsr L0b96 lda #$0d sta ,y puls x lbsr L0691 cmpa #$0d bne L024b leax 254,u inc D0036 L024b ldd #$020b os9 I$Create bcs L025b ldb #2 std D0002 bra L0260 L0259 ldb #$d8 L025b orcc #1 os9 F$Exit L0260 ldy #0 sty D0024 lda #$42 lbsr L06ea lbsr L073f lda #$42 ldy #1 lbsr L06ea leax L0053,pcr ldu D0012 os9 F$Icpt tst D0001 beq L028f ldd D001e subd D001c subd #$0400 lbsr L0f43 L028f lbsr L00fd L0292 ldu D0012 leas 1054,u leax 670,u stx D0045 stx D0047 leax -40,x stx D0049 lda #255 sta D0041 sta D0023 lda D0040 sta D003e clr D003b clr D003a clr D003c lda #1 sta D0037 tst D003d beq L02cb tst D0039 bne L02cb leax L1398,pcr lbsr L00ef lbsr L00ff L02cb clr D003d clr D0039 lbsr L0059 leax 375,u lbsr L0130 leay d,x sty D002b ldy #0 sty D0029 leau 630,u stu D0027 lda ,x cmpa #$20 bne L02f8 leax 1,x lbsr L0bde bra L0292 L02f8 cmpa #$0d bne L0308 ldx D001a lbsr L06b2 stx D001a lbsr L008b bra L0292 L0308 bsr L0310 lbsr L00ff lbra L0292 L0310 ldd D0043 pshs d ldd D0045 std D0043 pshs d lda D003e pshs a clr D002f inc D0041 L0322 cmpx D002b lbhs L03b8 lbsr L0691 cmpa #$0d bne L0335 leax 1,x clr D002f bra L0322 L0335 ldd D0027 pshs d stu D0027 ldd D0029 pshs d ldd D002b pshs d pshs u lbsr L0691 sta D0038 lbsr L03d3 pshs x pshs u leax L05f4,pcr ldy #$2f20 L0630 leay D0100,y subd ,x bcc L0630 addd ,x++ pshs d ldd ,x tfr y,d beq L0659 ldy #$2f30 cmpd #12320 bne L0652 ldy #$2f20 tfr b,a L0652 lbsr L0107 puls d bra L0630 L0659 lbsr L0107 leas 2,s puls d,x,y,pc L0660 pshs d,x ldx D0027 ldd -2,x puls d,x,pc L0668 pshs d,x tst D0023 beq L0683 ldx D0027 ldd -2,x beq L0683 cmpd #-1 bne L067e andcc #251 bra L0683 L067e subd #1 std -2,x L0683 puls d,x,pc L0685 pshs d,x ldx D0027 ldd -2,x cmpd #-1 puls d,x,pc L0691 lda ,x+ cmpa #$20 beq L0691 leax -1,x rts L069a lda ,y+ cmpa #$20 beq L069a leay Dffff,y rts L06a3 pshs d ldd D001c sty D001c bsr L06b2 pshs cc std D001c puls cc,d,pc L06b2 pshs a L06b4 cmpx D001c beq L06c0 lda ,x+ cmpa #$0d bne L06b4 andcc #251 L06c0 puls a,pc L06c2 cmpx D001c beq L06ce bsr L06b2 cmpx D0018 beq L06ce leax -1,x L06ce andcc #251 rts L06d1 bsr L06d7 beq L06e9 leax -1,x L06d7 pshs a L06d9 cmpx D0018 beq L06e7 lda ,-x cmpa #$0d bne L06d9 leax 1,x andcc #251 L06e7 puls a L06e9 rts L06ea pshs d,x,y ldd #$000b ldy D001c lbsr L0bc0 leax d,y sty D0016 stx D001c stx D0018 stx D001a std ,y std D0002,y lda ,s sta D0004,y ldd 4,s std D0005,y ldd D0000 std D0004 ldd D0002 std D0006 puls d,x,y,pc L0716 pshs d,x,y stx D001a ldd ,x lbsr L0bec nega negb sbca #0 ldx D001c leax d,x stx D0016 leay 11,x sty D0018 ldd 2,x leay d,x sty D001a ldd 7,x std D0004 ldd 9,x std D0006 puls d,x,y,pc L073f pshs d,x,y ldx D0016 ldd D001c subd D0016 std ,x ldd D001a subd D0016 std 2,x ldd D0004 std 7,x ldd D0006 std 9,x lda 4,x cmpa #$42 bne L0763 ldd 5,x std D0024 bra L076e L0763 ldy D0014 sty D001a ldd ,x lbsr L0c38 L076e puls d,x,y,pc L0770 pshs d ldx D0014 L0774 lda 4,x cmpa #$42 bne L0781 ldd ,s cmpd 5,x beq L0788 L0781 lbsr L089b bcs L0774 andcc #251 L0788 puls d,pc ldx D0012 ldd 5,u addd #$041f leax d,x cmpx D001c bls L07a1 os9 F$Mem lblo L12aa sty D001e L07a1 pulu u,pc lbsr L0922 lbsr L00ff ldd D001c subd D0014 lbsr L0626 lda #$20 lbsr L0107 lbsr L0107 ldd D001e subd D0014 lbsr L0626 lbsr L00ff lbra L0929 ldx D0016 lda 4,x cmpa #$42 lbne L127e ldd D001c subd D0016 std ,x ldd 5,u cmpd 5,x beq L07f9 bsr L0770 beq L07f3 ldd #$000b lbsr L0bc0 lbsr L073f lda #$42 ldy 5,u lbsr L06ea pulu u,pc L07f3 lbsr L073f lbsr L0716 L07f9 pulu u,pc tst D0041 lbne L127e ldx D0016 lda 4,x cmpa #$42 lbne L127e ldx 5,x ldy D0024 pshs x,y ldx 5,u lbsr L0691 cmpa 1,x bne L0825 lbsr L073f lda #$4d lbsr L06ea bra L0836 L0825 leax 1,x lbsr L04a1 lbeq L1278 lbsr L073f tfr d,x lbsr L0716 L0836 puls x,y stx D0024 sty D002d lda #$4d sta D0026 pulu u,pc lbsr L0922 leax L13c6,pcr lbsr L00ef ldx D0014 L084f ldb 4,x cmpb #$42 bne L0873 ldd 5,x cmpx D0016 beq L0863 cmpd D0024 beq L0866 lda #$20 cmpx #$862a L0863 equ *-2 cmpx #$8624 L0866 equ *-2 lbsr L0107 ldd 5,x lbsr L0626 lbsr L00ff L0873 bsr L089b bcs L084f leax L13be,pcr lbsr L00ef ldx D0014 L0880 pshs x lda 4,x cmpa #$4d bne L0893 leax 11,x lbsr L008b puls x bsr L089b bcs L0880 L0893 lbsr L00ff lbsr L0929 pulu u,pc L089b pshs d ldd ,x leax d,x cmpx D001c puls d,pc tst D0041 lbne L127e ldx 5,u lda ,x+ pshs a lbsr L0691 lbsr L04a1 lbeq L1278 tfr d,y ldd ,y ldx D001a pshs d,x sty D001a lbsr L0bec ldd D0016 subd ,s std D0016 ldd D0018 subd ,s std D0018 ldd D001c subd ,s std D001c puls x puls d pshs x subd ,s++ std D001a pulu u,pc pshs u ldx 5,u lbsr L0130 tfr d,y tfr x,u leax L12c9,pcr clra leax d,x lbsr L00ef lbsr L00ff lbra L0292 L12a8 ldb #$d7 L12aa inc D003e pshs b leax ===== RTS ===== Return to [[:OS-9:]] or [[:Top:]]