home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 15 / CDACTUAL15.iso / cdactual / program / asm / MSKERMIT.ZIP / MSDEFS.H < prev    next >
Encoding:
Text File  |  1986-05-17  |  8.0 KB  |  270 lines

  1. verdef    macro
  2.     db    ' Kermit-MS V2.26'
  3.     endm
  4.  
  5. BELL    EQU    07Q
  6. TAB    EQU    11Q
  7. LF    EQU    12Q
  8. FF    EQU    14Q
  9. CR    EQU    15Q
  10. XON    EQU    21Q
  11. XOFF    EQU    23Q
  12. ESC    EQU    33Q
  13. DEL    EQU    177Q
  14. BS    EQU    08H
  15. CTLZ    EQU    1AH
  16. SOH    EQU    01H        ; Start of header char.
  17.  
  18. DOS    EQU    21H
  19.  
  20. CONIN    EQU    01H
  21. CONOUT    EQU    02H
  22. RDRIN    EQU    03H
  23. PUNOUT    EQU    04H
  24. LSTOUT    EQU    05H
  25. DCONIO    EQU    06H
  26. CONINQ    EQU    07H        ; quiet console input
  27. PRSTR    EQU    09H
  28. CONSTAT EQU    0BH
  29. SELDSK    EQU    0EH        ; Select disk.    [21a]
  30. OPENF    EQU    0FH
  31. CLOSF    EQU    10H
  32. SFIRST    EQU    11H
  33. SNEXT    EQU    12H
  34. DELF    EQU    13H
  35. READF    EQU    14H        ; Read from the file.
  36. WRITEF    EQU    15H
  37. MAKEF    EQU    16H
  38. GCURDSK EQU    19H        ; Current disk.  [21a]
  39. SETDMA    EQU    1AH
  40. PRSFCB    equ    29H        ; parse an fcb.
  41. DOSVER    equ    30H        ; dos version #
  42. OPEN2    EQU    3DH        ; 2.0 open
  43. CLOSE2    EQU    3EH        ; 2.0 close
  44. READF2    EQU    3FH        ; 2.0 read.
  45. LSEEK    EQU    42H        ; 2.0 lseek
  46. IOCTL    EQU    44H
  47. WRITEF2 EQU    40H        ; 2.0 write
  48. GCD    equ    47H        ; 2.0 get current directory.
  49.  
  50. PAREVN    EQU    00H        ; Even parity.            [10 start]
  51. PARMRK    EQU    01H        ; Mark parity.
  52. PARNON    EQU    02H        ; No parity.
  53. PARODD    EQU    03H        ; Odd parity.
  54. PARSPC    EQU    04H        ; Space parity.
  55.  
  56. CMKEY    EQU    01H        ; Parse a keyword.
  57. CMIFI    EQU    02H        ; Parse an input file spec (can be wild).
  58. CMOFI    EQU    03H        ; Parse an output file spec.
  59. CMCFM    EQU    04H        ; Parse a confirm.
  60. CMTXT    EQU    05H        ; Parse arbitrary text up to CR.   [8]
  61.  
  62. FLOXON    EQU    1113H        ; Use XON/XOFF for flow control.
  63. FLONON    EQU    0        ; Don't do flow control.
  64. DEFHAND EQU    XON        ; Use XON as default handshake.
  65.  
  66. DMASIZ    EQU    80H        ; Size of DMA.
  67. FCBSIZ    EQU    25H
  68.  
  69. MAXTAK    EQU    05H        ; Max number of TAKE's allowed. [25t]
  70. MAXTRY    EQU    05Q        ; Default number of retries on a packet.
  71. IMXTRY    EQU    20Q        ; Default number of retries send initiate.
  72.  
  73. DEFESC    EQU    ']'-100Q        ; The default escape character.
  74. DRPSIZ    EQU    5EH        ; Default receive packet size.
  75. DSPSIZ    EQU    50H        ; Default send packet size.
  76. DSTIME    EQU    08H        ; Default send time out interval.
  77. DRTIME    EQU    0DH        ; Default receive time out interval.
  78. DSRVTM    EQU    30        ; Default server timeout.
  79. DSPAD    EQU    00H        ; Default send padding.
  80. DRPAD    EQU    00H        ; Default receive padding.
  81. DSPADC    EQU    00H        ; Default send padding char.
  82. DRPADC    EQU    00H        ; Default receive padding char.
  83. DSEOL    EQU    CR        ; Default send EOL char.
  84. DREOL    EQU    CR        ; Default receive EOL char.
  85. DSSOH    EQU    SOH        ; Default send start-of-packet char.
  86. DRSOH    EQU    SOH        ; Default receive start-of-packet char.
  87. DSQUOT    EQU    '#'             ; Default send quote char.
  88. DRQUOT    EQU    '#'             ; Default receive quote char.
  89. DQBIN    EQU    '&'             ; Default 8-bit prefix. [21b]
  90. DRPT    EQU    '~'             ; Default repeat prefix.
  91. DCHKLEN EQU    1        ; Default checksum length.
  92. DEFPAR    EQU    PARNON        ; Default parity (none.)
  93. IBMPAR    EQU    PARMRK        ; IBM's parity (mark.)          [10 end]
  94.  
  95.  
  96. bufsiz    equ    2048        ; size of serial input buffer
  97.  
  98. ; baud rate definitions
  99. B00455    EQU    0        ; 45.5 baud
  100. B0050    EQU    1        ; 50 baud
  101. B0075    EQU    2        ; 75 baud
  102. B0110    EQU    3        ; 110 baud
  103. B01345    EQU    4        ; 134.5 baud
  104. B0150    EQU    5        ; 150 baud
  105. B0300    EQU    6        ; 300 baud
  106. B0600    EQU    7        ; 600 baud
  107. B1200    EQU    8        ; 1200 baud
  108. B1800    EQU    9        ; 1800 baud
  109. B2000    EQU    10        ; 2000 baud
  110. B2400    EQU    11        ; 2400 baud
  111. B4800    EQU    12        ; 4800 baud
  112. B9600    EQU    13        ; 9600 baud
  113. B19200    EQU    14        ; 19200 baud
  114. B38400    EQU    15        ; 38400 baud
  115.  
  116. BAUDSIZ EQU    16        ; Number of options for baud rate.
  117.  
  118. ; Structure definitions.
  119.  
  120. ; Modem information.
  121. mdminfo struc
  122. mddat    dw    0        ; Default to port 1. [19b start]
  123. mdstat    dw    0        ; Ditto.
  124. mdcom    dw    0        ; Here too.
  125. mden    db    0
  126. mddis    db    0
  127. mdmeoi    db    0
  128. mdintv    dw    0        ; [19b end]
  129. mdminfo ends
  130.  
  131. ; Command information.
  132. cmdinfo struc
  133. cmstat    db    0        ; What is presently being parsed.
  134. cmaflg    db    0        ; Non-zero when an action char has been found.
  135. cmccnt    db    0        ; Non-zero if a significant char is found.
  136. cmsflg    db    0        ; Non-zero when the last char was a space.
  137. cmostp    dw    0        ; Old stack pointer for reparse.
  138. cmrprs    dw    0        ; Address to go to on reparse.
  139. cmprmp    dw    0        ; Address of prompt.
  140. cmptab    dw    0        ; Address of present keyword table.
  141. cmhlp    dw    0        ; Address of present help.
  142. cmdbuf    db    80H DUP(0)    ; Buffer for command parsing.
  143. cmfcb    dw    0        ; Pointer to FCB.
  144. cmfcb2    dw    0        ; Pointer to position in FCB.
  145. cmcptr    dw    0        ; Pointer for next char input.
  146. cmdptr    dw    0        ; Pointer into the command buffer.
  147. cmsiz    dw    0        ; Size info of user input.
  148. cmkptr    dw    0        ; Pointer to keyword.
  149. cmsptr    dw    0        ; Place to save a pointer.
  150. cmchr    db    0        ; Save char when checking ambiguity.
  151. cmrflg    db    0        ; Assume parsing filename for send. [21a]
  152. cmcr    db    0        ; Say whether bare CR is allowed.
  153. cmdinfo ends
  154.  
  155. ; Flags information.
  156. flginfo struc
  157. belflg    db    1        ; Use bell  [17a -- DT]
  158. comflg    db    1        ; Use COM1 by default. [19b]
  159. abfflg    db    1        ; Discard incoming file if abort. [20d]
  160. debug    db    0        ; Debugging mode (default off).
  161. flwflg    db    1        ; File warning flag (default on). [19c]
  162. ibmflg    db    0        ; IBM flag (default off).
  163. extflg    db    0        ; Exit flag (default off).
  164. vtflg    db    1        ; H-19 emulation.
  165. droflg    db    0        ; Override default disk drive. [21a]
  166. nmoflg    db    0        ; Override name from the F packet. [21a]
  167. wldflg    db    0        ; Assume no "*" in fn.         [7]
  168. cxzflg    db    0        ; ^X/^Z to interrupt file x-fer. [20b]
  169. xflg    db    0        ; Seen "X" packet. [21c]
  170. filflg    db    0        ; Non-zero when nothing in DMA buffer.
  171. eoflag    db    0        ; EOF flag; non-zero on EOF.
  172. getflg    db    0        ; Assume normal RECEIVE (not GET). [21a]
  173. capflg    db    0        ; On if capturing data. [25]
  174. takflg    db    0        ; On if echo commands of TAKE file.
  175. timflg    db    0        ; Say if are timing out or not.
  176. destflg db    1        ; Incoming files destination: disk or printer.
  177. eofcz    db    0        ; ^Z signals eof if non-zero.
  178. remflg    db    0        ; non-zero if in remote mode.
  179. flginfo ends
  180.  
  181. ; Transmission parameters
  182. trinfo    struc
  183. maxdat    db    0        ; Max packet size for send.
  184. chklen    db    1        ; Number of characters in checksum.
  185. seol    db    dseol        ; Send EOL char.
  186. reol    db    dreol        ; Receive EOL char.
  187. ssoh    db    dssoh        ; Send start-of-packet character.
  188. rsoh    db    drsoh        ; Receive start-of-packet character.
  189. squote    db    dsquot        ; Send quote character.
  190. rquote    db    drquot        ; Receive quote character.
  191. spsiz    db    dspsiz        ; Send packet size.
  192. rpsiz    db    drpsiz        ; Receive packet size.
  193. stime    db    dstime        ; Send timeout. (Don't timeout).
  194. rtime    db    drtime        ; Receive timeout.
  195. spad    db    dspad        ; Send padding.
  196. rpad    db    drpad        ; Receive padding.
  197. spadch    db    dspadc        ; Send padding char.
  198. rpadch    db    drpadc        ; Receive padding char.
  199. ebquot    db    'Y'             ; Send 8-bit quote character.
  200. escchr    db    defesc        ; Escape character.
  201. trinfo    ends
  202.  
  203. pktinfo struc
  204. pktnum    dw    0        ; Packet number.
  205. numpkt    dw    0        ; Total number of packets sent.
  206. numrtr    dw    0        ; Total number of retries.
  207. numtry    db    0        ; Number of tries on this packet.
  208. oldtry    db    0        ; Number of tries on previous packet.
  209. state    db    0        ; Present state of the automaton.
  210. argblk    dw    0        ; For subroutine arguments.
  211. argbk1    dw    0
  212. argbk2    dw    0
  213. argbk3    dw    0
  214. pktinfo ends
  215.  
  216. takinfo struc
  217. takfcb    db    fcbsiz dup(0)
  218. takbuf    db    dmasiz dup(0)
  219. takptr    dw    0
  220. takchl    db    0
  221. takcnt    dw    0,0
  222. takinfo ends
  223.  
  224. ; Port Information.
  225. prtinfo struc
  226. baud    dw    0        ; Default baud rate.
  227. ecoflg    db    0        ; Local echo flag (default off).
  228. parflg    db    0        ; Parity flag (default none.)  [10]
  229. floflg    db    0        ; If need flow control during file x-fer.
  230. hndflg    db    0        ; If need handshake during file x-fer.
  231. hands    db    0        ; Default handshake.
  232. flowc    dw    0        ; Do flow control with XON/XOFF.
  233. prtinfo ends
  234.  
  235. mkeyw    macro    key,val
  236.     local    junk,oldval
  237. oldval    equ    $
  238.     db    junk,key,'$'
  239. junk    equ    $-oldval-2
  240.     dw    val
  241.     endm
  242.  
  243.  
  244. ; definitions for terminal handler:
  245.  
  246. termarg struc
  247. flgs    db    ?        ; flags
  248. prt    db    ?        ; port to use (0,1)
  249. cols    db    ?        ; # columns on screen
  250. rows    db    ?        ; # rows on screen
  251. captr    dw    ?        ; routine to call with captured data
  252. belld    dw    ?        ; bell divisor
  253. klen    dw    ?        ; length of key redefinition table
  254. ktab    dw    ?        ; address of key redefinition table
  255. krpl    dw    ?        ; address of key replacement table
  256. escc    db    ?        ; escape character
  257. baudb    db    ?        ; baud rate bits.
  258. parity    db    ?        ; parity
  259. termarg ends
  260.  
  261. ; bits for flag byte
  262. scrsam    equ    80h            ; on if shouldn't redraw screen
  263. capt    equ    40h            ; capture output
  264. emheath equ    20h            ; emulate heath
  265. havtt    equ    10h            ; have translate table
  266. trnctl    equ    08h            ; translate control chars
  267. modoff    equ    04h            ; mode line off
  268. lclecho equ    01h            ; local echo
  269.  
  270.