home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / cpm / 22rsx / rxmd.ark.2 / RXMD03.MAC < prev    next >
Text File  |  1985-12-08  |  2KB  |  116 lines

  1. ;
  2. ; Check on what drive/user area the file(s) will go into
  3. ;
  4. ducheck:
  5.     call    logdu;        Select drive/user for upload
  6.     lda    prvtfl
  7.     ora    a
  8.     rz;            Not receiving to a private area
  9.     mvi    a,gprdrv
  10.     call    dorsx;        Private area takes precedence
  11.     sui    '@';        Convert to binary
  12.     sta    fcb;        Store drive to be used
  13.     ret
  14. ;
  15. ; Check for wheel status (or local operation).
  16. ; Z flag if restrictions apply, NZ for wheel status
  17. ; a,f
  18. qwheel:    call    getstatus
  19.     ani    whlbit+remon;    IF whlbit OR NOT remon
  20.     xri    remon;          THEN unrestricted
  21.     ret
  22. ;
  23. ; Changes the name of certain type of files such a .COM to .OBJ, etc.
  24. ; Actions depend on the structure of "comtyp" table and systatus.
  25. ; Uses the fcblock FCB
  26. ; a,f,h,l
  27. cktyp:    call    qwheel
  28.     rnz;            Wheel, don't change file types
  29.     push    d
  30.     call    qtyp;        returns pointer to replacement
  31.     jnc    cktyp1;        not found, no restrictions
  32.     call    ilprt;        Print renaming message
  33.  db    'Auto-renaming file to ".',0
  34.     lxi    h,fcb+9;    jam file type to de^
  35.     ldax    d
  36.     mov    m,a
  37.     call    ctype;        display new type
  38.     inx    h
  39.     inx    d
  40.     ldax    d
  41.     mov    m,a
  42.     call    ctype
  43.     inx    h
  44.     inx    d
  45.     ldax    d
  46.     mov    m,a
  47.     call    ctype
  48.     call    ilprt
  49.  db    '"',cr,lf,0
  50. cktyp1:    pop    d
  51.     ret
  52. ;
  53. ; Check for restricted file types (in FCB).  Carry if not found,
  54. ; else de points to replacement file type string.
  55. ; a,f,h,l,d,e
  56. qtyp:    lxi    d,comtyp-5
  57. ;    "    "
  58. ; Entry to use table (de+5)^
  59. ; a,f,h,l,d,e
  60. qtype:    inx    d
  61. qtype1:    inx    d
  62. qtype2:    inx    d
  63.     inx    d
  64.     inx    d
  65.     ldax    d
  66.     ora    a
  67.     rz;            table end, exit with no carry
  68.     lxi    h,fcb+9;    Check filetype at FCB+9
  69.     ldax    d;        against table
  70.     inx    d
  71.     cmp    m
  72.     jnz    qtype;        not this
  73.     inx    h
  74.     ldax    d
  75.     inx    d
  76.     cmp    m
  77.     jnz    qtype1;        no match
  78.     inx    h
  79.     ldax    d
  80.     inx    d
  81.     cmp    m
  82.     jnz    qtype2;        no match
  83.     stc;            signal no match
  84.     ret
  85. ;
  86. ; Some special filetypes, and their replacements
  87. comtyp:    db    'COM', 'OBJ'
  88.     db    'PRL', 'prl'
  89.     db    'SYS', 'sys'
  90.     db    'PCD', 'pcd'
  91.     db    0;        table end marker
  92. ;
  93. ; Displays where file(s) will go, opens the file and shows the name
  94. ;
  95. display:
  96.     call    ilprt
  97.  db    'File will be received on ',0
  98.     call    showdu
  99.     call    crlf
  100.     lda    actdrv
  101.     adi    'A'
  102.     call    kshow;        Show available space remaining
  103.     call    crlf
  104.     call    ilprt
  105.  db    'File open - ready to receive',cr,lf,0
  106.     lda    bchflg
  107.     ora    a
  108.     rnz;            In batch mode now
  109.     mvi    a,1;        Show only on the local CRT
  110.     sta    remoff
  111. ;    "    "
  112. ; Waiting message
  113. waitms:    call    ilprt
  114.  db    cr,lf,'Waiting.....',0
  115.     ret
  116. 1$