====== OS9GEN ====== Header for : OS9gen Module size: $393 #915 Module CRC : $0B0F06 (Good) Hdr parity : $B8 Exec. off : $0138 #312 Data size : $0519 #1305 Edition : $04 #4 Ty/La At/Rv: $11 $81 Prog mod, 6809 Obj, re-ent, R/O ===== CODE ===== * Disassembly by Os9disasm of os9gen mod L0393,L000d,$11,$81,L0138,D0519 * OS-9 system function equates F$Fork equ $03 F$Wait equ $04 F$Exit equ $06 F$PrsNam equ $10 I$Create equ $83 I$Open equ $84 I$Delete equ $87 I$Seek equ $88 I$Read equ $89 I$Write equ $8a I$ReadLn equ $8b I$WritLn equ $8c I$GetStt equ $8d I$SetStt equ $8e I$Close equ $8f * class D external label equates Dfffa equ $fffa * OS9 data area definitions D0000 rmb 2 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 2 D000d rmb 1 D000e rmb 18 D0020 rmb 15 D002f rmb 38 D0055 rmb 1220 D0519 equ . L000d clra comb rts asr 5,s ldu 4,x L0014 dec D0055 com $6520 bvc L005e fcb $41 fcb $55 lsrb rola clra fcb $4e bvs L005d bra L0074 comb rts asra fcb $45 fcb $4e bra L0068 ble L0092 fcb $65 ror $6e61 tst 5,s fcb $3e dec D0020 bgt L0067 fcb $72 fcb $65 fcb $61 lsr -13,s bra L0068 com 29796 bra L00ae jmp -16,s fcb $75 lsr $2920 neg $6174 asl 14,s fcb $61 tst 5,s com $2075 jmp -12,s rol 12,s bra L00a1 clra L005d rora L005e bge L006a bra L0082 bra L00d1 fcb $65 fcb $72 asr 9,s L0067 equ *-1 L0068 jmp 7,s L006a bra L00dc fcb $61 lsr $6873 bra L00db jmp -12,s L0074 fcb $6f bra L00c5 fcb $65 asr $204f comb rts fcb $42 clr 15,s lsr $2066 L0082 equ *-1 rol 12,s fcb $65 bgt L0095 coma fcb $61 jmp D0007,y lsr $2066 rol 14,s lsr Dfffa,y L0092 equ *-1 bra L009f L0094 equ *-1 L0095 fcb $45 fcb $72 fcb $72 clr -14,s bra L0113 fcb $72 rol -12,s L009f rol 14,s L00a1 fcb $67 bra L010f fcb $65 fcb $72 jmp 5,s fcb $6c bra L011f fcb $72 fcb $61 com 11,s L00ae equ *-1 tst D000a L00b0 equ *-1 asrb fcb $61 fcb $72 jmp 9,s jmp 7,s bra L00e7 bra L0122 rol 12,s fcb $65 bvc L0134 bvs L00e3 clr -14,s L00c5 bra L0132 fcb $65 fcb $72 jmp 5,s inc 10,x neg 29285 com $656e L00d1 equ *-2 lsr $206f fcb $6e bra L014d fcb $72 fcb $61 L00db com 11,s L00dc equ *-1 bra L0112 pshs y blt L0103 L00e3 lsr $6869 com $0a74 L00e7 equ *-2 fcb $72 fcb $61 com 11,s bra L015d clr -12,s bra L0165 fcb $65 asr 29289 lsr 29797 jmp D000e,y tst D000a L00fd equ *-1 fcb $45 fcb $72 fcb $72 clr -14,s L0103 bra L0132 bra L0156 comb rts fcb $62 clr 15,s lsr $2066 L010f rol 12,s fcb $65 L0112 bra L017a L0113 equ *-1 fcb $72 fcb $61 asr 13,s fcb $65 jmp -12,s fcb $65 lsr 13,x L011e fcb $52 L011f fcb $45 fcb $4e fcb $41 L0122 tsta fcb $45 bra L017a L0125 equ *-1 fcb $65 tst -16,s fcb $42 clr 15,s lsr $20ff L012f clra comb rts L0132 fcb $42 clr 15,s L0134 equ *-1 lsr $0dff L0138 clrb stb D0005 stu D0000 lda #$2f cmpa ,x lbne L035f os9 F$PrsNam lblo L035f lda #$2f L014d equ *-1 cmpa ,y lbeq L035f leay 49,u L0156 equ *-1 L0157 sta ,y+ lda ,x+ decb bpl L0157 L015d equ *-1 sty D002f lda #$40 ldb #$20 L0165 std ,y++ leax 49,u lda #3 os9 I$Open sta D0003 lblo L035f ldx D002f leay >L0125,pcr L017a equ *-1 lda #$2f L017d sta ,x+ lda ,y+ bpl L017d leay >L012f,pcr L0187 lda ,y+ sta ,x+ bpl L0187 tfr x,d leax 49,u pshs x subd ,s++ std D000d lda #2 ldb #3 os9 I$Create sta D0002 lblo L0370 ldx #0 stx D0006 ldu #12288 ldb #2 os9 I$SetStt lblo L0370 ldu D0000 L01b8 clra leax 81,u ldy #$0400 os9 I$ReadLn bcs L0210 lda ,x ldb #$d3 cmpa #$0d beq L0210 lda #1 os9 I$Open bcs L01ff sta D0004 L01d6 lda D0004 leax 81,u ldy #$0400 os9 I$Read bcs L01f4 tfr y,d addd D0006 std D0006 lda D0002 os9 I$Write bcc L01d6 lbra L0370 L01f4 cmpb #$d3 lbne L0370 os9 I$Close bra L01b8 L01ff pshs b leax 81,u ldy #$0100 lda #2 os9 I$WritLn L020d lbra L0370 L0210 cmpb #$d3 bne L020d leax 15,u ldb #0 lda D0002 os9 I$GetStt lblo L0370 lda D0002 ldx #0 ldu D0006 ldb #2 os9 I$SetStt lblo L0370 ldu D0000 os9 I$Close lblo L035f ldx 35,u lda 37,u clrb tfr d,u lda D0003 os9 I$Seek ldu D0000 lblo L0370 leax 81,u ldy #$0100 os9 I$Read lblo L0370 ldd 105,u lbne L0373 lda D0003 ldx #0 ldu #21 os9 I$Seek ldu D0000 lblo L0370 leax 8,u ldy #5 os9 I$Read lblo L0370 ldd D000b beq L02a7 ldx D002f leay L012f,pcr lda #$2f L028d sta ,x+ lda ,y+ bpl L028d leax 49,u os9 I$Delete ldx D002f leay L0125,pcr lda #$2f L02a1 sta ,x+ lda ,y+ bpl L02a1 L02a7 lda #1 clrb leax L011e,pcr ldy D000d leau 49,u os9 F$Fork lblo L0370 os9 F$Wait lblo L0370 tstb lbne L0370 ldu D0000 ldb 97,u stb D0008 ldd 98,u std D0009 ldd D0006 std D000b ldx #0 ldu #21 lda D0003 os9 I$Seek ldu D0000 lblo L0370 leax 8,u ldy #5 os9 I$Write lblo L0370 lbsr L037a leax 81,u ldy #$0100 os9 I$Read lblo L0363 leax 81,u lda 76,x bita #$0f bne L0389 ora #$0f sta 76,x tst 77,x bne L0389 com 77,x lda 78,x bita #$e0 bne L0389 ora #$e0 sta 78,x bsr L037a leax 81,u ldy #$0064 os9 I$Write bcs L0363 pshs u ldx #2 ldu #25600 os9 I$Seek puls u ldx #-4096 ldy #$0f00 os9 I$Write bcs L0358 os9 I$Close bcs L035f clrb bra L0370 L0358 leax L0094,pcr clrb bra L0363 L035f leax L0014,pcr L0363 pshs b lda #2 ldy #$0100 os9 I$WritLn puls b L0370 os9 F$Exit L0373 leax L00fd,pcr clrb bra L0363 L037a pshs u lda D0003 ldx #0 ldu #256 os9 I$Seek puls u,pc L0389 leax L00b0,pcr clrb bra L0363 emod L0393 equ * end ===== RTS ===== Return to [[:OS-9:]] or [[:Top:]]