home *** CD-ROM | disk | FTP | other *** search
/ kermit.columbia.edu / kermit.columbia.edu.tar / kermit.columbia.edu / test / pdp11 / krtdat.mac < prev    next >
Text File  |  1996-10-17  |  11KB  |  237 lines

  1.     .title    KRTDAT    Global read/write data
  2.     .ident    "V04.64"
  3.  
  4. ; /E64/    10-May-96  John Santos
  5. ;
  6. ;    Conditionalize out RT11-only data and restore RSTS/E data from
  7. ;    K11DAT.MAC
  8.  
  9. ; /63/     8-Feb-94  Billy Youdelman
  10. ;
  11. ;    add rem.ack
  12. ;    dpmumber conformed to its current 16-bit max value
  13.  
  14. ; /62/    27-Jul-93  Billy Youdelman  V03.62
  15. ;
  16. ;    use erbfsiz to size errtxt buffer
  17. ;    add pkrate buffer
  18.  
  19. ; /BBS/     1-Dec-91  Billy Youdelman  V03.61
  20. ;
  21. ;    added a general use buffer, some flags and variables
  22. ;    SL editor insert mode default is set on here in edists
  23.  
  24.     .include "IN:KRTMAC.MAC"
  25.     .iif ndf  KRTINC  .error    <; .include for IN:KRTMAC.MAC failed>
  26.  
  27.  
  28.     .sbttl    Global read/write data
  29. .if df    RSTS            ; /E64/
  30.     .psect    usermd    ,rw,d,gbl,rel,con    ; force this psect into root
  31. .endc    ;RSTS            ; /E64/
  32.     .psect    $rwdata    ,rw,d,lcl,rel,con
  33.  
  34. RWDATA    == .            ; top of this list
  35. $image:: .blkw    1        ; for temp mods to image flag
  36. albuff:: .blkw    1        ; /51/ malloc start of free memory pointter
  37. answer:: .blkw    1        ; /62/ for SET PHONE [NO]ANSWER
  38. argbuf:: .blkw    1        ; /53/ pointer to argument bufferin hi memory
  39. argpnt:: .blkw    1        ; pointer used with argument buffer
  40. .if df    RSTS            ; /E64/
  41. at$cdt:: .blkw    1
  42. at$fab:: .blkw    15
  43. at$klu:: .blkw    4        ; /54/ Creation date in 'Kluncks'
  44. .endc    ;RSTS            ; /E64/
  45. .if df    RT11            ; /E64/
  46. at$len:: .blkw    1        ; current file length in blocks
  47. .endc    ;RT11            ; /E64/
  48. .if df    RSTS            ; /E64/
  49. at$len:: .blkw    2        ; /E64/ current file length in blocks
  50. at$pro:: .blkw    1        ; /E64/
  51. .endc    ;RSTS            ; /E64/
  52. at$sys:: .blkw    1        ; machine and os type from rec'd attributes
  53. .if df    RSTS            ; /E64/
  54. at$val:: .blkw    1
  55. .endc    ;RSTS            ; /E64/
  56. b4speed::.blkw    1        ; /BBS/ speed before fallback
  57. blind::     .blkw    1        ; /54/ SET PHONE BLIND
  58. blip::     .blkw    1        ; display stats every "blip" number of packets
  59. break::     .blkw    2        ; /BBS/ break duration (for .mrkt)
  60. cc$max:: .blkw    1        ; /BBS/ number of ^Cs needed to abort
  61. cccnt::     .blkw    1        ; number of ^Cs typed so far
  62. charin:: .blkw    2        ; /43/ total data bytes in
  63. charou:: .blkw    2        ; /43/ total data bytes out
  64. chksiz:: .blkw    1        ; current checksum size (length in bytes)
  65. chktyp:: .blkw    1        ; current checksum type
  66. .if df    RT11            ; /E64/
  67. cl.pri:: .blkw    1        ; /BBS/ run TSX handler at this priority
  68. .endc    ;RT11            ; /E64/
  69. clkflg:: .blkw    1        ; /BBS/ store the clock rate here
  70. cmdadr:: .blkw    1        ; saved address of command routine
  71. cmdbuf:: .blkw    1        ; /53/ pointer to command line input buffer
  72. cmdlun:: .blkw    1        ; current command file lun
  73. cmdnum:: .blkw    1        ; index into the current command list
  74. con8bi:: .blkw    1        ; if <> we pass eight bits to console
  75. conesc:: .blkw    1        ; escape character for CONNECT
  76. conmsg:: .blkw    1        ; /BBS/ flag to hold CONNECT sign-on
  77. conpar:: .blkb    20        ; other Kermit's sinit parameters
  78. csi.fak::.blkw    1        ; /62/ if <> use fake CSI comma parser
  79. ctlflgs::.blkb    <1.+32.+1.+32.>    ; /63/ DEL&200 ,NUL..US ,DEL ,<NUL..US>&200
  80. datauk:: .blkw    1        ; /62/ data unknown loop counter
  81. defpri:: .blkw    1        ; /BBS/ TSX priority when Kermit was started
  82. diatmo:: .blkw    1        ; /46/ SET DIAL TIME-OUT
  83. do8bit:: .blkw    1        ; if <> doing 8-bit prefixing
  84. .if df    RSTS            ; /E64/
  85. doallo:: .blkw    1        ; /58/ Device allocation flag
  86. .endc    ;RSTS            ; /E64/
  87. doattr:: .blkw    1        ; if 0 don't send attribute packets
  88. doauto:: .blkw    1        ; if <> check list for binary file type match
  89. dolong:: .blkw    1        ; /42/ if <> do long packets
  90. dorpt::     .blkw    1        ; if <> do repeat counts
  91. ;doslid::.blkw    1        ; /42/ if <> do sliding windows
  92. dowild:: .blkw    1        ; /63/ if 0 wildcarding must be explicit
  93. dpnumb:: .blkw    1        ; /63/ serial number of data packet
  94. duplex:: .blkw    1        ; if 0, full (default), else half
  95. ebquot:: .blkw    1        ; 8-bit prefixing quote char
  96. edilen:: .blkw    1        ; SL current command line length
  97. edipos:: .blkw    1        ; SL current cursor position
  98. errtxt:: .blkb    erbfsiz+2    ; /62/ buffer for syserr(errnum,errtxt)
  99. exieof:: .blkw    1        ; /45/ SET EOF [NO]EXIT
  100. exstal:: .blkw    1        ; /41/ take file current line number pointer
  101. filein:: .blkw    2        ; /43/ file data bytes in
  102. fileou:: .blkw    2        ; /43/ file data bytes out
  103. filpro:: .blkw    1        ; if <> don't overwrite files
  104. getcro:: .blkw    1        ; alternate address for get char routine
  105. handch:: .blkw    1        ; handshake char (for IBM systems)
  106. image::     .blkw    1        ; if <> in image mode
  107. incfile::.blkw    1        ; /BBS/ set <> to keep incomplete file
  108. incpar:: .blkw    1        ; /56/ parity was found in rec'd SOH char
  109. index::     .blkw    1        ; index into directory, for wildcarded lookups
  110. infoms:: .blkw    1        ; /41/ if <> display information messages
  111. initry:: .blkw    1        ; /BBS/ number of retries for init packet only
  112. inopn::     .blkw    1        ; did sensw ever open anything?
  113. inprog:: .blkw    1        ; /BBS/ packets in progress flag
  114. inserv:: .blkw    1        ; currently we are a server
  115. jobtyp:: .blkw    1        ; /45/ 0 for interactive, <> for batch
  116. lastcmd::.blkw    1        ; /BBS/ last command's dispatch address
  117. lastli:: .blkw    ln$cnt+1    ; /BBS/ SL previous commands pointers
  118. linkst:: .blkw    1        ; if <> the link device is active
  119. locase:: .blkw    1        ; /BBS/ if <> pass lower case file name
  120. logini:: .blkw    1        ; if <> cursor is not on a newline at column 1
  121. maxtry:: .blkw    1        ; maximum number of retries for data packets
  122. mcrcmd:: .blkw    1        ; if <> it's a MCR/CCL command line
  123. milnet:: .blkw    1        ; /BBS/ if <> send XONs when first CONNECTing
  124. modem::     .blkb    40        ; /37/ ascii modem name
  125. modtype::.blkw    1        ; /BBS/ address of modem data structure
  126. mready:: .blkw    1        ; /BBS/ if <> modem is initialized to dial out
  127. msgtim:: .blkw    1        ; /43/ warning message already done flag
  128. nakrec:: .blkw    1        ; /BBS/ anti-resonating NAK shift register
  129. nextone::.blkw    1        ; /62/ pointer to the next filespec in argbuf
  130. numtry:: .blkw    1        ; number of retries currently attempted
  131. outlun:: .blkw    1        ; zero for TT, else lun.ou
  132. outopn:: .blkw    1        ; did recsw ever create anything?
  133. paknum:: .blkw    1        ; current packet serial number mod 64
  134. parity:: .blkw    1        ; save parity setting here
  135. pauset:: .blkw    1        ; wait before sending each packet
  136. pcnt.n:: .blkw    2        ; /43/ NAKs received count
  137. pcnt.r:: .blkw    2*34        ; rpack packet counts by type
  138. pcnt.s:: .blkw    2*34        ; spack packet counts by type
  139. pcnt.t:: .blkw    2        ; /44/ time-out count
  140. pf2$ok:: .blkw    1        ; /BBS/ if <> off PF2 can't overlay HELP
  141. phnum::     .blkw    1        ; /40/ last phone number dialed
  142. pkrate:: .blkw    4        ; /62/ last packet start & duration
  143. pnhead:: .blkw    1        ; /45/ listhead for SET PHONE numbers
  144. ports::     .blkb    ln$max        ; /BBS/ store TSX ports to try here
  145. prexon:: .blkw    1        ; /53/ if <> prefix packets with an XON
  146. .if df    RSTS            ; /E64/
  147. procty:: .blkw    1        ; /45/ See K11MAC.MAC
  148. .endc    ;RSTS            ; /E64/
  149. pulse::     .blkw    1        ; /54/ SET PHONE PULSE/TONE
  150. qedtst:: .blkw    1        ; /63/ # .gtim loops to find clock ticking
  151. qu.ini:: .blkw    1        ; /BBS/ store SET TT [NO]QUIET here
  152. ranerr:: .blkw    1        ; if <> generate random checksum errors
  153. rawfil:: .blkw    1        ; /54/ SET FILE NAMING
  154. rdrate:: .blkw    3        ; /56/ exec I/O stats /62/ 3 words
  155. recbit:: .blkw    1        ; /43/ find out if parity was on
  156. .if df    RSTS            ; /E64/
  157. recdlm:: .blkw    1        ; /56/ Record delimiter (cr,lf,...)
  158. .endc    ;RSTS            ; /E64/
  159. reclng:: .blkw    1        ; /42/ max size I can read
  160. recsop:: .blkw    1        ; SET RECEIVE START-OF-PACKET
  161. rectim:: .blkw    1        ; /62/ SET RECEIVE TIME-OUT
  162. rem.ack::.blkw    1        ; /63/ if <> ACK rec'd for REMOTE command
  163. remote:: .blkw    1        ; if <> we are remote
  164. restof:: .blkw    1        ; /BBS/ pointer to rest of args in argbuf
  165. rptcou:: .blkw    1        ; number of repeated chars in a string
  166. rptini:: .blkw    1        ; repeat init, meaning first time through proc
  167. rptlas:: .blkw    1        ; the last char when checking repeats
  168. rptquo:: .blkw    1        ; prefix char for repeat quoting
  169. rptsav:: .blkw    1        ; save failed char in repeat encoding
  170. rtvol::     .blkw    1        ; if <> do dir disk volume id test
  171. seed::     .blkw    1        ; to generate random errors for debugging
  172. senlen:: .blkw    1        ; /62/ save SET SEND p.spsiz
  173. senlng:: .blkw    1        ; /42/ max size I am allowed to send
  174. sendly:: .blkw    1        ; wait before sending sinit
  175. senpar:: .blkb    20        ; our sinit parameters vector
  176. sensop:: .blkw    1        ; SET SEND START-OF-PACKET
  177. sentim:: .blkw    1        ; /62/ SET SEND TIME-OUT
  178. senwin:: .blkw    1        ; /42/ sliding windows not yet here..
  179. sertim:: .blkw    1        ; time-out waiting for server command
  180. serwai:: .blkw    1        ; SET SERVER TIME-OUT
  181. set8bi:: .blkw    1        ; if <> set bit seven on char
  182. setchk:: .blkw    1        ; /62/ save SET BLO here
  183. setrpt:: .blkw    1        ; used to set repeat encoding on/off
  184. settle:: .blkw    1        ; /BBS/ modem settle ticks on reset
  185. signon:: .blkw    1        ; /BBS/ if <> sign-on text has been displayed
  186. size::     .blkw    1        ; size of last call to buffer_fill
  187. skipfil::.blkw    1        ; /BBS/ copy of inc-file-disp to file closer
  188. skipfl:: .blkw    1        ; should we send a eof$discard packet?
  189. sl.ked:: .blkw    1        ; /BBS/ make <> for SL's KED mode
  190. sl.on::     .blkw    1        ; /BBS/ make <> to turn on SL
  191. snd8bi:: .blkw    1        ; local do 8-bit prefixing flag
  192. spare1:: .blkb    256.        ; /BBS/ temp buffer, max SVID filespec
  193.  SP1SIZ     ==    <.-spare1>    ; /63/ size of above spare1 buffer
  194. sparsz:: .blkw    1        ; size of our sinit packet
  195. state::     .blkw    1        ; current recsw or sensw state
  196. summary::.blkw    1        ; /BBS/ if <> do dir summary only
  197. sy.ini:: .blkw    1        ; init file is executing flag
  198. tgetad:: .blkw    1        ; get text address for textsrc macro
  199. times::     .blkw    10        ; /43/ time stamp stats
  200. tk.err:: .blkw    1        ; /BBS/ format init file error message display
  201. .if df    RSTS            ; /E64/
  202. tmperr:: .blkw    1
  203. .endc    ;RSTS            ; /E64/
  204. trace::     .blkw    1        ; file and packet logging status word
  205. tsxcl::     .blkw    1        ; if <> it's TSX and CL
  206. tt$io::     .blkw    1        ; /62/ if <> do I/O through TT
  207. ttname:: .blkb    16        ; our current link device ascii name
  208. ttpar2:: .blkw    1        ; /BBS/ $tcfig saved here
  209. ttparm:: .blkw    1        ; /BBS/ jsw stored here
  210. undchr:: .blkb    2        ; /BBS/ SL undel char buffer
  211. undlin:: .blkb    ln$max+2    ; /BBS/ SL undel word/line buffer
  212. units::     .blkb    16.        ; /BBS/ store CL unit numbers to try here
  213. vttype:: .blkw    1        ; the terminal type
  214. warn8d:: .blkw    1        ; /BBS/ 8-bit quote warning has been done flag
  215. wasmore::.blkw    1        ; /62/ flag for multiple arguments display
  216. wasnul:: .blkw    1        ; /45/ for "?" processing in the command line
  217. xgottn:: .blkw    1        ; server got an "X" packet
  218. xmode::     .blkw    1        ; if <> doing text output to TT
  219. xredial::.blkw    1        ; /BBS/ if <> redial (retry) a failed call
  220. xresult::.blkb    4        ; /BBS/ SET PHONE XMODE
  221. RWSIZE     == <.-rwdata>        ; end of r/w data zero'd by start-up init
  222.  
  223.  
  224.     .sbttl    Data to be preserved at start-up
  225.  
  226. edicmd::.word    -1        ; SL hasn't saved anything yet
  227. edists::.word    1        ; /BBS/ SL insert mode is init'd on here
  228. xprint::.word    0        ; /62/ if <> dump TT to LP, here for safety..
  229. prompt::.asciz    "KRT> "        ; /63/ say this is a special version
  230.     .even            ; /62/ prompt buffer = 32. bytes total
  231.     .blkb    26.        ; /62/ if stack overflows, make it obvious!
  232. stklim::.blkw    400+<$allsiz/2>    ; /62/ the stack, allowing for max long packet
  233. stack::    .word    0        ; stack starts here..
  234. STKSIZ    == <.-stklim>        ; /62/ for debugger display
  235.  
  236.     .end
  237.