home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / cpm / 22rsx / rxmd.ark / RXMD.MAC next >
Text File  |  1985-12-15  |  6KB  |  170 lines

  1. title ;RXMD - CP/M File Transfer Program under BYERSX - 85/12/2
  2. ; developed from KMD08 by Irv. Hoff
  3. ;
  4.     aseg;        Needed by M80 assemblers, ignore if using MAC
  5. ;
  6. ;    NOTE: This version assembles with ASM, LASM, MAC, M80 or SLRMAC
  7. ;        (ASM requires the include files be incorporated here)
  8. ;
  9. ;    NOTE: Carrier loss recovery must reset write-protection modes
  10. ;
  11. ; Verbiage, revision info, credits, etc.
  12. include    rxmdhdr.mac
  13. ;
  14. ; Customization and definitions
  15. ;
  16. ; *   *   *   *   *   *   *   *   *   *   *   *   *   *   *   *   *
  17. ;
  18. vers    equ    0;        0 is debug only
  19. modlev    equ    0
  20. fixlvl    equ    9;        16 up debugs 0..9 fixlvl
  21. ;
  22. ; Define ASCII characters used
  23. soh    equ    01h;    Start of header
  24. stx    equ    02h;    Start of 1k header
  25. eot    equ    04h;    end of transmission
  26. ack    equ    06h;    acknowledge
  27. bs    equ    08h
  28. lf    equ    0ah
  29. cr    equ    0dh
  30. nak    equ    15h;    Negative acknowledge
  31. cancel    equ    18h;    CTL-X for cancel
  32. crc    equ    'C';    CRC request character
  33. ksnd    equ    'K';    1k block request character
  34. ;
  35. ;
  36. ; ===================================================================
  37. ;
  38. ; Conditional equates - change to suit your system, then assemble
  39. ;
  40. ; ===================================================================
  41. ;
  42. ; Normal disk systems can transfer 16k from computer to disk in 2-3-4
  43. ; seconds and less.  Some very slow 5-1/4" floppy systems (such as
  44. ; North Star) may take up to 20-30 seconds to transfer 16k. This would
  45. ; cause several timeouts at 10 seconds each.  If you experience any
  46. ; timeouts, change BUFSIZ to somethng smaller, perhaps 8k or even 4k.
  47. ;
  48. bufsiz    equ    16;    File transfer buffer size in Kbytes
  49. ;
  50. ; ===================================================================
  51. ;
  52. ; Some modems will either go onhook immediately after carrier loss or
  53. ; can be set to wait a bit.  A good value with the Smartmodem is five
  54. ; seconds, since it catches all "call forwarding" breaks.  Not all is
  55. ; lost after timeout in RXMD - BYE will still wait some more, but the
  56. ; chance of someone slipping in is less now.
  57. ;
  58. timout    equ    2;    Seconds to abort after carrier loss
  59. ;
  60. ; ===================================================================
  61. ;
  62. ; Many main frames are not live to input immediately after a send. If
  63. ; this programs responds immediately the response will be lost and
  64. ; errors result.  Allows a small delay for main from process awaken.
  65. ;
  66. pausetm    equ    0;    up to 255 Millisecs pause at line turn-around
  67. ;
  68. ; ===================================================================
  69. ;
  70. ; When a transmission is complete, in RCPM mode, the remote station
  71. ; usually flushes buffers and closes files.  If this program exits
  72. ; immediately the system prompt will be lost.  Set the delay time
  73. ; to avoid this in most cases.  Depends on remote, so not positive
  74. ;
  75. waitime    equ    40;    * 0.1 secs wait at exit. 0 means 25.5 secs
  76. ;
  77. ; ===================================================================
  78. ;
  79. ;
  80. ; BDOS equates
  81. ;
  82. wrcon    equ    2;        Output to console
  83. print    equ    9;        Print string function
  84. cpmver    equ    12;        CPM version running
  85. seldsk    equ    14;        Select drive
  86. open    equ    15;        0FFH = not found
  87. close    equ    16;        "      "
  88. srchf    equ    17;        "      "
  89. srchn    equ    18;        "      "
  90. delet    equ    19;        Delete file
  91. read    equ    20;        0=OK, 1=EOF
  92. write    equ    21;        0=OK, 1=ERR, 2=?, 0FFH=no dir. space
  93. make    equ    22;        0FFH=bad
  94. curdrv    equ    25;        Get current drive
  95. stdma    equ    26;        Set DMA
  96. galloc    equ    27;        Disk allocation vector
  97. curdpb    equ    31;        Current disk parameter blk
  98. setusr    equ    32;        Set user area to receive file
  99. rrdm    equ    33;        Read random
  100. filsiz    equ    35;        Compute file size
  101. getfre    equ    46;        Free space on disk, CPM 3 only
  102. ;
  103. bdos    equ    0005h;        Address for BDOS jump vectors
  104. tbuf    equ    0080h;        Default DMA address
  105. fcb    equ    005CH;        System FCB
  106. fcb1    equ    006CH;        Secondary FCB area
  107. fcbext    equ    fcb+12;        File extent
  108. fcbrno    equ    fcb+32;        Record number
  109. random    equ    fcb+33;        Random record field
  110. ;
  111. ; BYERSX status byte bits
  112. whlbit    equ    080h;        sysop status
  113. dunochk    equ    040h;        no drv/usr restrictions
  114. devices    equ    020h;        RDR, PUN, LST access
  115. carcks    equ    010h;        carrier checks (off for hard-wired)
  116. conoff    equ    008h;        terminal mode
  117. remon    equ    004h;        remote terminal enabled
  118. echol    equ    002h;        local terminal echoes
  119. echon    equ    001h;        remote terminal echoes
  120. ;
  121. ; some BYERSX extended system calls
  122. sgmaxdrv    equ    69;    set/get max drive allowed
  123. sgmaxusr    equ    70;    set/get max user allowed
  124. systate        equ    84;    system status
  125. delayms        equ    85;    delay de millisec
  126. sgbaud        equ    86;    set/get baud rate. 0 gets
  127. rsxmast        equ    87;    master rsx call
  128. swrtprt        equ    91;    set write protection on drives
  129. ;
  130. ; and subfunctions for rsxmast
  131. resetsecure    equ    4;    reset secure mode (aborts)
  132. setsecure    equ    5;    set secure mode (abort hangs up)
  133. grdrv        equ    14;    get designated rcv drive
  134. grusr        equ    15;    get designated rcv user area
  135. gprdrv        equ    16;    get designated private rcv drive
  136. gprusr        equ    17;    get designated private rcv user area
  137. gpsdrv        equ    18;    get designated private send drive
  138. gpsusr        equ    19;    get designated private send user area
  139. gwrtprt        equ    20;    get current write protection
  140. ;
  141.     org    100h
  142.     jmp    begin
  143. ;
  144. ; -------------------------------------------------------------------
  145. ;
  146. ; Following placed at start for easy patching.
  147. pause    db    pausetm;    Line turn around delay, millisec
  148. waitm    db    waitime;    Pause on exit for remote to flush
  149. ;
  150. include rxmd01.mac
  151. include rxmd02.mac
  152. include rxmd03.mac
  153. include rxmd04.mac
  154. include rxmd05.mac
  155. include rxmd06.mac
  156. include rxmd07.mac
  157. include rxmd08.mac
  158. include rxmd09.mac
  159. include rxmd10.mac
  160. include rxmd11.mac
  161. include rxmd12.mac
  162. include rxmd13.mac
  163. include rxmd14.mac
  164. include rxmd15.mac
  165. include rxmd16.mac
  166. include rxmd17.mac
  167. include    rxmdata.mac
  168. ;
  169.     end
  170. Σ¢