view 3rdparty/packages/os9l2bbs/cmds/BBS.mail.readD.asm @ 2400:75ba2a80a4e3

OS-9 L2 BBS Commands disassembled
author boisy
date Sun, 24 Jan 2010 17:20:05 +0000
parents
children 04755ee002ba
line wrap: on
line source

         nam   BBS.mail.readD
         ttl   program module       

* Disassembled 2010/01/24 10:34:32 by Disasm v1.5 (C) 1988 by RML

         ifp1
         use   /dd/defs/defsfile
         endc
tylg     set   Prgrm+Objct   
atrv     set   ReEnt+rev
rev      set   $01
         mod   eom,name,tylg,atrv,start,size
u0000    rmb   1
u0001    rmb   2
u0003    rmb   1
u0004    rmb   1
u0005    rmb   3
u0008    rmb   1
u0009    rmb   1
u000A    rmb   2
u000C    rmb   8
u0014    rmb   3
u0017    rmb   1
u0018    rmb   13
u0025    rmb   1
u0026    rmb   1
u0027    rmb   1
u0028    rmb   1
u0029    rmb   1
u002A    rmb   1
u002B    rmb   1
u002C    rmb   1
u002D    rmb   1
u002E    rmb   64
u006E    rmb   80
u00BE    rmb   2
u00C0    rmb   2
u00C2    rmb   20
u00D6    rmb   30
u00F4    rmb   1
u00F5    rmb   1
u00F6    rmb   6
u00FC    rmb   62
u013A    rmb   140
size     equ   .
name     equ   *
         fcs   /BBS.mail.readD/
         fcb   $43 C
         fcb   $6F o
         fcb   $70 p
         fcb   $79 y
         fcb   $72 r
         fcb   $69 i
         fcb   $67 g
         fcb   $68 h
         fcb   $74 t
         fcb   $20 
         fcb   $28 (
         fcb   $43 C
         fcb   $29 )
         fcb   $20 
         fcb   $31 1
         fcb   $39 9
         fcb   $38 8
         fcb   $38 8
         fcb   $42 B
         fcb   $79 y
         fcb   $20 
         fcb   $4B K
         fcb   $65 e
         fcb   $69 i
         fcb   $74 t
         fcb   $68 h
         fcb   $20 
         fcb   $41 A
         fcb   $6C l
         fcb   $70 p
         fcb   $68 h
         fcb   $6F o
         fcb   $6E n
         fcb   $73 s
         fcb   $6F o
         fcb   $4C L
         fcb   $69 i
         fcb   $63 c
         fcb   $65 e
         fcb   $6E n
         fcb   $63 c
         fcb   $65 e
         fcb   $64 d
         fcb   $20 
         fcb   $74 t
         fcb   $6F o
         fcb   $20 
         fcb   $41 A
         fcb   $6C l
         fcb   $70 p
         fcb   $68 h
         fcb   $61 a
         fcb   $20 
         fcb   $53 S
         fcb   $6F o
         fcb   $66 f
         fcb   $74 t
         fcb   $77 w
         fcb   $61 a
         fcb   $72 r
         fcb   $65 e
         fcb   $20 
         fcb   $54 T
         fcb   $65 e
         fcb   $63 c
         fcb   $68 h
         fcb   $6E n
         fcb   $6F o
         fcb   $6C l
         fcb   $6F o
         fcb   $67 g
         fcb   $69 i
         fcb   $65 e
         fcb   $73 s
         fcb   $41 A
         fcb   $6C l
         fcb   $6C l
         fcb   $20 
         fcb   $72 r
         fcb   $69 i
         fcb   $67 g
         fcb   $68 h
         fcb   $74 t
         fcb   $73 s
         fcb   $20 
         fcb   $72 r
         fcb   $65 e
         fcb   $73 s
         fcb   $65 e
         fcb   $72 r
         fcb   $76 v
         fcb   $65 e
         fcb   $64 d
         fcb   $EC l
         fcb   $E6 f
         fcb   $EA j
         fcb   $F5 u
         fcb   $E9 i
         fcb   $A0 
         fcb   $E2 b
         fcb   $ED m
         fcb   $F1 q
         fcb   $E9 i
         fcb   $F0 p
         fcb   $EF o
         fcb   $F4 t
         fcb   $F0 p
         fcb   $48 H
         fcb   $69 i
         fcb   $67 g
         fcb   $68 h
         fcb   $20 
         fcb   $6D m
         fcb   $65 e
         fcb   $73 s
         fcb   $73 s
         fcb   $61 a
         fcb   $67 g
         fcb   $65 e
         fcb   $20 
         fcb   $69 i
         fcb   $73 s
         fcb   $20 
         fcb   $23 #
         fcb   $00 
         fcb   $11 
         fcb   $45 E
         fcb   $6E n
         fcb   $74 t
         fcb   $65 e
         fcb   $72 r
         fcb   $20 
         fcb   $6D m
         fcb   $65 e
         fcb   $73 s
         fcb   $73 s
         fcb   $61 a
         fcb   $67 g
         fcb   $65 e
         fcb   $20 
         fcb   $23 #
         fcb   $0D 
         fcb   $3E >
L00AA    fcb   $42 B
         fcb   $42 B
         fcb   $53 S
         fcb   $2E .
         fcb   $6D m
         fcb   $61 a
         fcb   $69 i
         fcb   $6C l
         fcb   $2E .
         fcb   $69 i
         fcb   $6E n
         fcb   $78 x
         fcb   $0D 
L00B7    fcb   $42 B
         fcb   $42 B
         fcb   $53 S
         fcb   $2E .
         fcb   $6D m
         fcb   $61 a
         fcb   $69 i
         fcb   $6C l
         fcb   $0D 
         fcb   $2A *
         fcb   $2A *
         fcb   $2A *
         fcb   $2A *
         fcb   $2A *
         fcb   $2A *
         fcb   $20 
         fcb   $20 
         fcb   $20 
         fcb   $44 D
         fcb   $45 E
         fcb   $4C L
         fcb   $45 E
         fcb   $54 T
         fcb   $45 E
         fcb   $44 D
         fcb   $20 
         fcb   $20 
         fcb   $20 
         fcb   $2A *
         fcb   $2A *
         fcb   $2A *
         fcb   $2A *
         fcb   $2A *
         fcb   $2A *
         fcb   $0D 
L00DA    fcb   $0A 
         fcb   $0A 
         fcb   $46 F
         fcb   $72 r
         fcb   $6F o
         fcb   $6D m
         fcb   $20 
         fcb   $20 
         fcb   $20 
         fcb   $20 
         fcb   $3A :
L00E5    fcb   $4C L
         fcb   $65 e
         fcb   $66 f
         fcb   $74 t
         fcb   $20 
         fcb   $6F o
         fcb   $6E n
         fcb   $20 
         fcb   $3A :
L00EE    fcb   $41 A
         fcb   $62 b
         fcb   $6F o
         fcb   $75 u
         fcb   $74 t
         fcb   $20 
         fcb   $20 
         fcb   $20 
         fcb   $3A :
L00F7    fcb   $00 
         fcb   $09 
L00F9    fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $2D -
         fcb   $0D 
L0139    fcb   $0A 
         fcb   $0D 
L013B    fcb   $0A 
         fcb   $54 T
         fcb   $68 h
         fcb   $61 a
         fcb   $74 t
         fcb   $27 '
         fcb   $73 s
         fcb   $20 
         fcb   $61 a
         fcb   $6C l
         fcb   $6C l
         fcb   $20 
         fcb   $74 t
         fcb   $68 h
         fcb   $65 e
         fcb   $20 
         fcb   $6D m
         fcb   $61 a
         fcb   $69 i
         fcb   $6C l
         fcb   $20 
         fcb   $74 t
         fcb   $68 h
         fcb   $61 a
         fcb   $74 t
         fcb   $20 
         fcb   $77 w
         fcb   $61 a
         fcb   $73 s
         fcb   $20 
         fcb   $6C l
         fcb   $65 e
         fcb   $66 f
         fcb   $74 t
         fcb   $20 
         fcb   $66 f
         fcb   $6F o
         fcb   $72 r
         fcb   $20 
         fcb   $79 y
         fcb   $6F o
         fcb   $75 u
         fcb   $0D 
L0166    fcb   $53 S
         fcb   $6F o
         fcb   $72 r
         fcb   $72 r
         fcb   $79 y
         fcb   $2C ,
         fcb   $20 
         fcb   $79 y
         fcb   $6F o
         fcb   $75 u
         fcb   $20 
         fcb   $68 h
         fcb   $61 a
         fcb   $76 v
         fcb   $65 e
         fcb   $20 
         fcb   $6E n
         fcb   $6F o
         fcb   $20 
         fcb   $6D m
         fcb   $61 a
         fcb   $69 i
         fcb   $6C l
         fcb   $0D 
L017E    fcb   $43 C
         fcb   $68 h
         fcb   $65 e
         fcb   $63 c
         fcb   $6B k
         fcb   $69 i
         fcb   $6E n
         fcb   $67 g
         fcb   $20 
         fcb   $66 f
         fcb   $6F o
         fcb   $72 r
         fcb   $20 
         fcb   $6D m
         fcb   $61 a
         fcb   $69 i
         fcb   $6C l
         fcb   $2E .
         fcb   $2E .
         fcb   $2E .
         fcb   $0A 
         fcb   $0D 
L0194    fcb   $52 R
         fcb   $65 e
         fcb   $2D -
         fcb   $52 R
         fcb   $65 e
         fcb   $61 a
         fcb   $64 d
         fcb   $3F ?
         fcb   $20 
         fcb   $28 (
         fcb   $59 Y
         fcb   $2F /
         fcb   $4E N
         fcb   $29 )
         fcb   $3A :
         fcb   $0D 
L01A4    fcb   $42 B
         fcb   $42 B
         fcb   $53 S
         fcb   $2E .
         fcb   $6D m
         fcb   $61 a
         fcb   $69 i
         fcb   $6C l
         fcb   $2E .
         fcb   $64 d
         fcb   $65 e
         fcb   $6C l
         fcb   $65 e
         fcb   $74 t
         fcb   $65 e
         fcb   $0D 
start    equ   *
         os9   F$ID     
         sty   u000C,u
         ldy   #$0000
         os9   F$SUser  
         leax  >L00AA,pcr
         lda   #$01
         os9   I$Open   
         lbcs  L03A6
         sta   ,u
         leax  >L00B7,pcr
         lda   #$01
         os9   I$Open   
         lbcs  L03A6
         sta   u0001,u
         clr   u0004,u
         leax  >L017E,pcr
         ldy   #$00C8
         lda   #$01
         os9   I$WritLn 
         leax  <u002E,u
         ldy   #$0040
         lda   ,u
         os9   I$Read   
         lbcs  L03A6
L01FE    leax  >u00BE,u
         ldy   #$0040
         lda   ,u
         os9   I$Read   
         bcs   L0218
         ldd   >u00FC,u
         cmpd  u000C,u
         bne   L01FE
         bra   L0262
L0218    cmpb  #$D3
         lbne  L03A6
         tst   u0004,u
         beq   L0252
         leax  >L013B,pcr
         ldy   #$00C8
         lda   #$01
         os9   I$WritLn 
         lda   u0001,u
         os9   I$Close  
         lda   ,u
         os9   I$Close  
         ldy   u000C,u
         os9   F$SUser  
         leax  >L01A4,pcr
         ldy   #$0001
         leau  >u013A,u
         lda   #$11
         ldb   #$03
         os9   F$Chain  
L0252    leax  >L0166,pcr
         ldy   #$00C8
         lda   #$01
         os9   I$WritLn 
         lbra  L03A5
L0262    inc   u0004,u
         ldd   >u00BE,u
         cmpd  #$FFFF
         lbeq  L01FE
         leax  >L00DA,pcr
         ldy   >L00F7,pcr
         leay  $02,y
         lda   #$01
         os9   I$Write  
         leax  >u00C2,u
         ldy   #$00C8
         lda   #$01
         os9   I$WritLn 
         lbcs  L03A6
         leax  >L00E5,pcr
         ldy   >L00F7,pcr
         lda   #$01
         os9   I$Write  
         leax  <u0014,u
         ldb   >u00F5,u
         clra  
         lbsr  L041A
         lda   <u0017,u
         sta   <u0025,u
         lda   <u0018,u
         sta   <u0026,u
         lda   #$2F
         sta   <u0027,u
         ldb   >u00F6,u
         clra  
         leax  <u0014,u
         lbsr  L041A
         lda   <u0017,u
         sta   <u0028,u
         lda   <u0018,u
         sta   <u0029,u
         lda   #$2F
         sta   <u002A,u
         ldb   >u00F4,u
         clra  
         leax  <u0014,u
         lbsr  L041A
         lda   <u0017,u
         sta   <u002B,u
         lda   <u0018,u
         sta   <u002C,u
         lda   #$0D
         sta   <u002D,u
         leax  <u0025,u
L02F6    lda   ,x+
         cmpa  #$20
         beq   L02F6
         leax  -$01,x
         ldy   #$00C8
         lda   #$01
         os9   I$WritLn 
         lbcs  L03A6
         leax  >L00EE,pcr
         ldy   >L00F7,pcr
         lda   #$01
         os9   I$Write  
         leax  >u00D6,u
         ldy   #$001E
         os9   I$WritLn 
         lbcs  L03A6
         bra   L032A
L032A    leax  >L00F9,pcr
         ldy   #$0040
         lda   #$01
         os9   I$WritLn 
         lda   u0001,u
         ldx   >u00BE,u
         pshs  u
         ldu   >u00C0,u
         os9   I$Seek   
         lbcs  L03A6
         puls  u
L034C    lda   u0001,u
         leax  <u006E,u
         ldy   #$0050
         os9   I$ReadLn 
         lda   #$01
         os9   I$WritLn 
         cmpy  #$0001
         bhi   L034C
         leax  >L00F9,pcr
         ldy   #$0040
         lda   #$01
         os9   I$WritLn 
         leax  >L0194,pcr
         ldy   #$00C8
         lda   #$01
         os9   I$WritLn 
         leax  u0005,u
         ldy   #$0001
         clra  
         os9   I$Read   
         leax  >L0139,pcr
         ldy   #$0001
         lda   #$01
         os9   I$WritLn 
         lda   u0005,u
         cmpa  #$79
         lbeq  L032A
         cmpa  #$59
         lbeq  L032A
         lbra  L01FE
L03A5    clrb  
L03A6    pshs  b
         ldy   u000C,u
         os9   F$SUser  
         puls  b
         os9   F$Exit   
         pshs  y
L03B5    lda   ,x+
         cmpa  #$0D
         lbeq  L0488
         cmpa  #$30
         bcs   L03B5
         cmpa  #$39
         bhi   L03B5
         leax  -$01,x
L03C7    lda   ,x+
         cmpa  #$30
         bcs   L03D3
         cmpa  #$39
         bhi   L03D3
         bra   L03C7
L03D3    pshs  x
         leax  -$01,x
         clr   u0008,u
         clr   u0009,u
         ldd   #$0001
         std   u000A,u
L03E0    lda   ,-x
         cmpa  #$30
         bcs   L0414
         cmpa  #$39
         bhi   L0414
         suba  #$30
         sta   u0003,u
         ldd   #$0000
L03F1    tst   u0003,u
         beq   L03FB
         addd  u000A,u
         dec   u0003,u
         bra   L03F1
L03FB    addd  u0008,u
         std   u0008,u
         lda   #$0A
         sta   u0003,u
         ldd   #$0000
L0406    tst   u0003,u
         beq   L0410
         addd  u000A,u
         dec   u0003,u
         bra   L0406
L0410    std   u000A,u
         bra   L03E0
L0414    ldd   u0008,u
         puls  x
         puls  pc,y
L041A    pshs  x
         std   u0008,u
         lda   #$30
         sta   ,x
         sta   $01,x
         sta   $02,x
         sta   $03,x
         sta   $04,x
         ldd   #$2710
         std   u000A,u
         ldd   u0008,u
         lbsr  L0479
         ldd   #$03E8
         std   u000A,u
         ldd   u0008,u
         bsr   L0479
         ldd   #$0064
         std   u000A,u
         ldd   u0008,u
         bsr   L0479
         ldd   #$000A
         std   u000A,u
         ldd   u0008,u
         bsr   L0479
         ldd   #$0001
         std   u000A,u
         ldd   u0008,u
         bsr   L0479
         lda   #$0D
         sta   ,x
         puls  x
         ldb   #$20
L0460    lda   ,x
         cmpa  #$30
         bne   L046A
         stb   ,x+
         bra   L0460
L046A    lda   ,x+
         cmpa  #$30
         bcs   L0476
         cmpa  #$39
         bhi   L0476
         bra   L046A
L0476    leax  -$01,x
         rts   
L0479    subd  u000A,u
         bcs   L0481
         inc   ,x
         bra   L0479
L0481    addd  u000A,u
         std   u0008,u
         leax  $01,x
         rts   
L0488    ldd   #$FFFF
         puls  pc,y
         emod
eom      equ   *
         end