MODOS9

Header for : OS9
Module size: $7E7  #2023
Module CRC : $6678A3 (Good)
Hdr parity : $18
Edition    : $0C  #12
Ty/La At/Rv: $C1 $81
System mod, 6809 Obj, re-ent, R/O

CODE

* Disassembly by Os9disasm of modos9

 mod L07e7,L000d,$c1,$81,L0076,D0000

* OS-9 system function equates

F$Link equ $00
F$Load equ $01
F$UnLink equ $02
F$Exit equ $06
F$Mem equ $07
F$DelBit equ $14
F$AProc equ $2c
F$NProc equ $2d
F$All64 equ $30
I$Dup equ $82

* class D external label equates

D0001 equ $0001
D0002 equ $0002
D0003 equ $0003
D0006 equ $0006
D0007 equ $0007
D0008 equ $0008
D0009 equ $0009
D000a equ $000a
D000b equ $000b
D000d equ $000d
D000e equ $000e
D0012 equ $0012
D001a equ $001a
D0020 equ $0020
D0022 equ $0022
D0024 equ $0024
D0026 equ $0026
D0028 equ $0028
D002a equ $002a
D002e equ $002e
D0033 equ $0033
D0038 equ $0038
D003a equ $003a
D003c equ $003c
D003e equ $003e
D0040 equ $0040
D0042 equ $0042
D0043 equ $0043
D0044 equ $0044
D0046 equ $0046
D0048 equ $0048
D0049 equ $0049
D004b equ $004b
D004d equ $004d
D004f equ $004f
D0051 equ $0051
D005b equ $005b
D0066 equ $0066
D0070 equ $0070
D0081 equ $0081
D00b9 equ $00b9
D00d7 equ $00d7
D0100 equ $0100
D05bc equ $05bc
Dfff4 equ $fff4
Dfff8 equ $fff8
Dfffe equ $fffe
Dffff equ $ffff

* OS9 data area definitions

D0000 equ .

L000d clra  
 comb  
 adca  $0c43
 coma  
L0013 rola  
 fcb $4e
 rola  
 andb  D004f
L0017 equ *-1
 comb  
 rts   
 negb  
 sbca  $200f
L001c equ *-2
 nop   
 bra   L0031
 nop   
 bra   L0035
 nop   
 bra   L0039
 nop   
 bra   L003d
 nop   
 bra   L0041
 jmp   [$2c]
L0031 jmp   [$2e]
L0035 jmp   [$34]
L0039 jmp   [$36]
L003d jmp   [$32]
L0041 jmp   [$30]
L0045 neg   D0002
 adca  $0304
 fcb $55
 fcb $05
 lsr   D00b9
 bita  #4
 eorb  #$10
 ror   D00d7
 fcb $11
 asr   D003a
 nop   
 ror   D0070
 sync  
 fcb $05
 addd  -12,x
 ror   D0033
 lbsr  L03e9
 eora  5,x
 clr   D05bc,y
 cmpx  1,x
 anda  L02b2,pcr
 ldx   2,x
 bitb  #$32
 asr   D0043
 suba  #$8e
L0076 equ *-1
 neg   D0020
 ldy   #$03e0
 clra  
 clrb  
L007f std   ,x++
 leay  Dfffe,y
 bne   L007f
 inca  
 inca  
 std   D0020
 addb  #$20
 std   D0022
 addb  #2
 std   D0046
 addb  #$70
 std   D0044
 clrb  
 inca  
 std   D0026
 stx   D0028
 leas  256,x
L009f leay  ,x
 ldd   ,y
 ldx   #$00ff
 stx   ,y
 cmpx  ,y
 bne   L00c2
 ldx   #-256
 stx   ,y
 cmpx  ,y
 bne   L00c2
 std   ,y
 leax  D0100,y
 cmpx  #-4096
 bcs   L009f
 leay  ,x
L00c2 leax  ,y
 stx   D0024
 pshs  x,y
 leax  L001c,pcr
 ldy   #$0100
 ldb   #$29
L00d2 lda   ,x+
 sta   ,y+
 decb  
 bne   L00d2
 puls  x,y
L00db lbsr  L0342
 bcs   L00e6
 ldd   2,x
 leax  d,x
 bra   L00ec
L00e6 cmpb  #$e7
 beq   L00ee
 leax  1,x
L00ec bne   L00db
L00ee leay  L07e9,pcr
 leax  L0000,pcr
 pshs  x
 ldx   #$002c
L00fb ldd   ,y++
 addd  ,s
 std   ,x++
 cmpx  #$0036
 bls   L00fb
 leas  2,s
 leax  L018d,pcr
 stx   D003c
 leax  L023e,pcr
 stx   D0040
 leax  L01b8,pcr
 stx   D003e
 stx   D0038
 leax  L0265,pcr
 stx   D0042
 stx   D002e
 leax  L01c8,pcr
 stx   D003a
 leax  L01ca,pcr
 stx   D0081
 leay  L0045,pcr
 lbsr  L07dd
 lda   #$c0
 leax  L0013,pcr
 os9 F$Link
 lblo  L0076
 stu   D002a
 ldd   10,u
 clrb  
 cmpd  D0024
 bcc   L0150
 std   D0024
L0150 ldx   D0020
 ldb   #248
 stb   ,x
 clra  
 ldb   D0024
 negb  
 tfr   d,y
 negb  
 lbsr  L0646
 leax  L0017,pcr
 lda   #$c1
 os9 F$Link
 lblo  L0076
 jmp   ,y
 pshs  b,x,pc
 ldb   #$18
 bra   L0184
 pshs  b,x,pc
 ldb   #$16
 bra   L0184
 rti   
 jmp   [$38]
 pshs  b,x,pc
 ldb   #$14
L0184 ldx   >$004b
 ldx   b,x
 stx   3,s
 puls  b,x,pc
L018d leay  <L01a9,pcr
L0190 clra  
 tfr   a,dp
 ldx   D004b
 ldd   D0042
 std   D002e
 ldd   D003e
 std   D0038
 leau  ,s
 stu   4,x
 lda   13,x
 ora   #$80
 sta   13,x
 jmp   ,y
L01a9 jsr   [$3a]
 bcc   L01b5
 ldb   ,s
 orb   #$10
 stb   ,s
L01b5 lbra  L024d
L01b8 clra  
 tfr   a,dp
 jsr   [$3a]
 bcc   L01c7
 ldb   ,s
 orb   #$10
 stb   ,s
L01c7 rti   
L01c8 comb  
 rts   
L01ca ldx   D0051
 beq   L01f5
 lda   13,x
 bita  #$40
 beq   L01f5
 ldu   4,x
 ldd   4,u
 subd  #1
 std   4,u
 bne   L01f5
L01df ldu   14,x
 bsr   L0212
 leax  ,u
 beq   L01f3
 lda   13,x
 bita  #$40
 beq   L01f3
 ldu   4,x
 ldd   4,u
 beq   L01df
L01f3 stx   D0051
L01f5 dec   D0048
 bne   L0209
 lda   D005b
 sta   D0048
 ldx   D004b
 beq   L0209
 lda   13,x
 ora   #$20
 sta   13,x
 bpl   L020a
L0209 rti   
L020a leay  >L024d,pcr
 bra   L0190
 ldx   4,u
L0212 pshs  y,u
 ldu   #63
 bra   L0220
L0219 ldb   12,u
 incb  
 beq   L0220
 stb   12,u
L0220 ldu   14,u
 bne   L0219
 ldu   #63
 lda   11,x
 sta   12,x
 orcc  #$50
L022d leay  ,u
 ldu   14,u
 beq   L0237
 cmpa  12,u
 bls   L022d
L0237 stu   14,x
 stx   D000e,y
 clrb  
 puls  y,u,pc
L023e leay  <L0246,pcr
 orcc  #$50
 lbra  L0190
L0246 andcc #$af
 ldy   D0044
 bsr   L0270
L024d ldx   D004b
 beq   L02b2
 orcc  #$50
 ldb   13,x
 andb  #$7f
 stb   13,x
 bitb  #$20
 beq   L02c9
 andb  #$df
 stb   13,x
 bsr   L0212
 bra   L02b2
L0265 clra  
 tfr   a,dp
 leau  ,s
 ldy   D0046
 bsr   L0270
 rti   
L0270 pshs  u
 ldx   10,u
 ldb   ,x+
 stx   10,u
 lslb  
 bcc   L0280
 rorb  
 ldx   Dfffe,y
 bra   L0288
L0280 cmpb  #$6e
 bcc   L029f
 ldx   b,y
 beq   L029f
L0288 jsr   ,x
L028a puls  u
 tfr   cc,a
 bcc   L0292
 stb   2,u
L0292 ldb   ,u
 andb  #$f0
 stb   ,u
 anda  #$0f
 ora   ,u
 sta   ,u
 rts   
L029f comb  
 ldb   #$d0
 bra   L028a
L02a4 ldb   13,x
 orb   #$80
 stb   13,x
 ldb   54,x
 andcc #$af
 os9 F$Exit
L02b2 clra  
 clrb  
 std   D004b
 bra   L02ba
L02b8 cwai  #$af
L02ba orcc  #$50
 ldx   D004d
 beq   L02b8
 ldd   14,x
 std   D004d
 stx   D004b
 lds   4,x
L02c9 ldb   13,x
 bmi   L0300
 bitb  #2
 bne   L02a4
 ldb   54,x
 beq   L02f7
 decb  
 beq   L02f4
 ldu   55,x
 beq   L02a4
 ldy   57,x
 ldd   6,s
 pshs  d,y,u
 ldu   10,s
 lda   54,x
 ldb   9,s
 tfr   d,y
 ldd   6,s
 pshs  d,y,u
 clrb  
L02f4 stb   54,x
L02f7 ldd   22,x
 std   D002e
 ldd   D003c
 std   D0038
L0300 rti   
 pshs  u
 ldd   1,u
 ldx   4,u
 lbsr  L043b
 bcc   L0310
 ldb   #$dd
 bra   L0335
L0310 ldy   ,u
 ldb   D0007,y
 bitb  #$80
 bne   L0322
 tst   2,u
 beq   L0322
 comb  
 ldb   #$d1
 bra   L0335
L0322 inc   2,u
 ldu   ,s
 stx   4,u
 sty   8,u
 ldd   D0006,y
 std   1,u
 ldd   D0009,y
 leax  d,y
 stx   6,u
L0335 puls  u,pc
 pshs  u
 ldx   4,u
 bsr   L0342
 puls  y
 stu   D0008,y
 rts   
L0342 bsr   L039b
 bcs   L0392
 lda   6,x
 pshs  a,x
 ldd   4,x
 leax  d,x
 puls  a
 lbsr  L043b
 puls  x
 bcs   L0393
 ldb   #$e7
 cmpx  ,u
 beq   L0399
 lda   7,x
 anda  #$0f
 pshs  a
 ldy   ,u
 lda   D0007,y
 anda  #$0f
 cmpa  ,s+
 bcc   L0399
 pshs  x,y
 ldb   2,u
 bne   L038d
 ldx   ,u
 cmpx  D0066
 bcc   L038d
 ldd   2,x
 addd  #$00ff
 tfr   a,b
 clra  
 tfr   d,y
 ldb   ,u
 ldx   D0020
 os9 F$DelBit
 clr   2,u
L038d puls  x,y
L038f stx   ,u
 clrb  
L0392 rts   
L0393 leay  ,u
 bne   L038f
 ldb   #$ce
L0399 coma  
 rts   
L039b ldd   ,x
 cmpd  #$87cd
 bne   L03a9
 leay  8,x
 bsr   L03b6
 bcc   L03ad
L03a9 comb  
 ldb   #$cd
 rts   
L03ad pshs  x
 ldy   2,x
 bsr   L03c3
 puls  x,pc
L03b6 pshs  x,y
 clra  
L03b9 eora  ,x+
 cmpx  2,s
 bls   L03b9
 cmpa  #255
 puls  x,y,pc
L03c3 ldd   #-1
 pshs  d
 pshs  d
 leau  1,s
L03cc lda   ,x+
 bsr   L03fc
 leay  Dffff,y
 bne   L03cc
 clr   -1,u
 lda   ,u
 cmpa  #$80
 bne   L03e4
 ldd   1,u
 cmpd  #$0fe3
 beq   L03e7
L03e4 comb  
 ldb   #$e8
L03e7 puls  x,y,pc
L03e9 ldx   4,u
 ldy   6,u
 beq   L03fa
 ldu   8,u
L03f2 lda   ,x+
 bsr   L03fc
 leay  Dffff,y
 bne   L03f2
L03fa clrb  
 rts   
L03fc eora  ,u
 pshs  a
 ldd   1,u
 std   ,u
 clra  
 ldb   ,s
 lslb  
 rola  
 eora  1,u
 std   1,u
 clrb  
 lda   ,s
 lsra  
 rorb  
 lsra  
 rorb  
 eora  1,u
 eorb  2,u
 std   1,u
 lda   ,s
 asla  
 eora  ,s
 sta   ,s
 asla  
 asla  
 eora  ,s
 sta   ,s
 asla  
 asla  
 asla  
 asla  
 eora  ,s+
 bpl   L043a
 ldd   #$8021
 eora  ,u
 sta   ,u
 eorb  2,u
 stb   2,u
L043a rts   
L043b ldu   #0
 tfr   a,b
 anda  #$f0
 andb  #$0f
 pshs  d,x,y,u
 bsr   L0497
 cmpa  #$2f
 beq   L0494
 lbsr  L0739
 bcs   L0495
 ldu   D0026
L0453 pshs  b,y,u
 ldu   ,u
 beq   L0483
 ldd   4,u
 leay  d,u
 ldb   ,s
 lbsr  L0797
 bcs   L048b
 lda   5,s
 beq   L046e
 eora  6,u
 anda  #$f0
 bne   L048b
L046e lda   6,s
 beq   L0478
 eora  6,u
 anda  #$0f
 bne   L048b
L0478 puls  b,x,u
 stu   6,s
 bsr   L0497
 stx   2,s
 clra  
 bra   L0495
L0483 ldd   11,s
 bne   L048b
 ldd   3,s
 std   11,s
L048b puls  b,y,u
 leau  4,u
 cmpu  D0028
 bcs   L0453
L0494 comb  
L0495 puls  d,x,y,u,pc
L0497 lda   #$20
L0499 cmpa  ,x+
 beq   L0499
 lda   ,-x
 rts   
 ldx   D0049
 os9 F$All64
 bcs   L0503
 ldx   D004b
 pshs  x
 ldd   9,x
 std   D0009,y
 lda   11,x
 clrb  
 std   D000b,y
 ldb   #$80
 stb   D000d,y
 sty   D004b
 leax  26,x
 leay  D001a,y
 ldb   #$0c
L04c3 lda   ,x+
 sta   ,y+
 decb  
 bne   L04c3
 ldb   #3
L04cc lda   ,x+
 os9 I$Dup
 bcc   L04d4
 clra  
L04d4 sta   ,y+
 decb  
 bne   L04cc
 bsr   L053f
 bcs   L04f8
 puls  y
 sty   D004b
 lda   ,x
 sta   1,u
 ldb   D0003,y
 sta   D0003,y
 lda   ,y
 std   1,x
 ldb   13,x
 andb  #$7f
 stb   13,x
 os9 F$AProc
 rts   
L04f8 pshs  b
 os9 F$Exit
 comb  
 puls  b,x
 stx   D004b
 rts   
L0503 comb  
 ldb   #$e5
 rts   
 bsr   L052f
 bcs   L051d
 orcc  #$50
 ldb   13,x
 andb  #$7f
 stb   13,x
L0513 os9 F$AProc
 os9 F$NProc
 bsr   L052f
 bcc   L0513
L051d pshs  b
 stb   54,x
 ldb   13,x
 orb   #2
 stb   13,x
 ldb   #255
 stb   11,x
 comb  
 puls  b,pc
L052f pshs  u
 ldx   D004b
 ldu   18,x
 os9 F$UnLink
 ldu   ,s
 bsr   L053f
 puls  u,pc
L053f ldx   D004b
 pshs  x,u
 ldd   D0040
 std   20,x
 std   22,x
 std   24,x
 clra  
 clrb  
 sta   54,x
 std   55,x
 lda   1,u
 ldx   4,u
 os9 F$Link
 bcc   L0564
 os9 F$Load
 bcs   L05d3
L0564 ldy   D004b
 stu   D0012,y
 cmpa  #$11
 beq   L0577
 cmpa  #$c1
 beq   L0577
 comb  
 ldb   #$ea
 bra   L05d3
L0577 leay  ,u
 ldu   2,s
 stx   4,u
 lda   2,u
 clrb  
 cmpd  D000b,y
 bcc   L0587
 ldd   D000b,y
L0587 addd  #0
 bne   L058c
L058c os9 F$Mem
 bcs   L05d3
 subd  #$000c
 subd  6,u
 bcs   L05d1
 ldx   8,u
 ldd   6,u
 pshs  d
 beq   L05aa
 leax  d,x
L05a2 lda   ,-x
 sta   ,-y
 cmpx  8,u
 bhi   L05a2
L05aa ldx   D004b
 sty   Dfff8,y
 leay  Dfff4,y
 sty   4,x
 lda   7,x
 clrb  
 std   D0008,y
 sta   D0003,y
 adda  8,x
 std   D0006,y
 puls  d
 std   D0001,y
 ldb   #$80
 stb   ,y
 ldu   18,x
 ldd   9,u
 leau  d,u
 stu   D000a,y
 clrb  
L05d1 ldb   #$e6
L05d3 puls  x,u,pc
 ldd   1,u
 addd  #$00ff
 clrb  
 std   1,u
 ldx   D0022
 ldd   #$01ff
 pshs  d
 bra   L05f0
L05e6 dec   1,s
 ldb   1,s
L05ea asl   ,s
 bcc   L05f6
 rol   ,s
L05f0 leax  -1,x
 cmpx  D0020
 bcs   L060c
L05f6 lda   ,x
 anda  ,s
 bne   L05e6
 dec   1,s
 subb  1,s
 cmpb  1,u
 rora  
 addb  1,s
 rola  
 bcs   L05ea
 ldb   1,s
 clra  
 incb  
L060c leas  2,s
 bcs   L0621
 ldx   D0020
 tfr   d,y
 ldb   1,u
 clra  
 exg   d,y
 bsr   L0646
 exg   a,b
 std   8,u
L061f clra  
 rts   
L0621 comb  
 ldb   #$cf
 rts   
 ldd   1,u
 addd  #$00ff
 tfr   a,b
 clra  
 tfr   d,y
 ldd   8,u
 beq   L061f
 tstb  
 beq   L063a
 comb  
 ldb   #$d2
 rts   
L063a exg   a,b
 ldx   D0020
 bra   L0699
 ldd   1,u
 leau  4,u
 pulu  x,y
L0646 pshs  d,x,y
 bsr   L067c
 tsta  
 pshs  a
 bmi   L065d
 lda   ,x
L0651 ora   ,s
 leay  Dffff,y
 beq   L0675
 lsr   ,s
 bcc   L0651
 sta   ,x+
L065d tfr   y,d
 sta   ,s
 lda   #255
 bra   L0667
L0665 sta   ,x+
L0667 subb  #8
 bcc   L0665
 dec   ,s
 bpl   L0665
L066f asla  
 incb  
 bne   L066f
 ora   ,x
L0675 sta   ,x
 clra  
 leas  1,s
 puls  d,x,y,pc
L067c pshs  b
 lsra  
 rorb  
 lsra  
 rorb  
 lsra  
 rorb  
 leax  d,x
 puls  b
 lda   #$80
 andb  #7
 beq   L0692
L068e lsra  
 decb  
 bne   L068e
L0692 rts   
 ldd   1,u
 leau  4,u
 pulu  x,y
L0699 pshs  d,x,y
 bsr   L067c
 coma  
 pshs  a
 bpl   L06b0
 lda   ,x
L06a4 anda  ,s
 leay  Dffff,y
 beq   L06c4
 asr   ,s
 bcs   L06a4
 sta   ,x+
L06b0 tfr   y,d
 bra   L06b6
L06b4 clr   ,x+
L06b6 subd  #8
 bhi   L06b4
 beq   L06c4
L06bd asla  
 incb  
 bne   L06bd
 coma  
 anda  ,x
L06c4 sta   ,x
 clr   ,s+
 puls  d,x,y,pc
 pshs  u
 ldd   1,u
 ldx   4,u
 ldy   6,u
 ldu   8,u
 bsr   L06df
 puls  u
 std   1,u
 sty   6,u
 rts   
L06df pshs  d,x,y,u
 pshs  d,y
 clr   8,s
 clr   9,s
 tfr   d,y
 bsr   L067c
 pshs  a
 bra   L06fc
L06ef leay  D0001,y
 sty   5,s
L06f4 lsr   ,s
 bcc   L0700
 ror   ,s
 leax  1,x
L06fc cmpx  11,s
 bcc   L071e
L0700 lda   ,x
 anda  ,s
 bne   L06ef
 leay  D0001,y
 tfr   y,d
 subd  5,s
 cmpd  3,s
 bcc   L0725
 cmpd  9,s
 bls   L06f4
 std   9,s
 ldd   5,s
 std   1,s
 bra   L06f4
L071e ldd   1,s
 std   5,s
 coma  
 bra   L0727
L0725 std   9,s
L0727 leas  5,s
 puls  d,x,y,u,pc
 ldx   4,u
 bsr   L0739
 std   1,u
 bcs   L0735
 stx   4,u
L0735 sty   6,u
 rts   
L0739 lda   ,x
 cmpa  #$2f
 bne   L0741
 leax  1,x
L0741 leay  ,x
 clrb  
 lda   ,y+
 anda  #$7f
 bsr   L077e
 bcs   L075e
L074c incb  
 lda   Dffff,y
 bmi   L075b
 lda   ,y+
 anda  #$7f
 bsr   L076e
 bcc   L074c
 lda   ,-y
L075b andcc #254
 rts   
L075e cmpa  #$2c
 bne   L0764
L0762 lda   ,y+
L0764 cmpa  #$20
 beq   L0762
 lda   ,-y
 comb  
 ldb   #$eb
 rts   
L076e cmpa  #$2e
 beq   L07b5
 cmpa  #$30
 bcs   L078e
 cmpa  #$39
 bls   L07b5
 cmpa  #$5f
 beq   L07b5
L077e cmpa  #$41
 bcs   L078e
 cmpa  #$5a
 bls   L07b5
 cmpa  #$61
 bcs   L078e
 cmpa  #$7a
 bls   L07b5
L078e orcc  #1
 rts   
 ldb   2,u
 leau  4,u
 pulu  x,y
L0797 pshs  d,x,y
L0799 lda   ,y+
 bmi   L07aa
 decb  
 beq   L07a6
 eora  ,x+
 anda  #$df
 beq   L0799
L07a6 orcc  #1
 puls  d,x,y,pc
L07aa decb  
 bne   L07a6
 eora  ,x
 anda  #$5f
 bne   L07a6
 puls  d,x,y
L07b5 andcc #254
 rts   
 ldy   6,u
 bra   L07dd
L07bd tfr   b,a
 anda  #$7f
 cmpa  #$7f
 beq   L07cd
 cmpa  #$37
 bcs   L07cd
 comb  
 ldb   #$e3
 rts   
L07cd lslb  
 ldu   D0046
 leau  b,u
 ldd   ,y++
 leax  d,y
 stx   ,u
 bcs   L07dd
 stx   112,u
L07dd ldb   ,y+
 cmpb  #$80
 bne   L07bd
 rts   

 emod 

L07e7 equ *

 end

RTS

Return to OS-9 or Top

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies