home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / JSAGE / ZSUS / TCJ / TCJ40.WS < prev    next >
Text File  |  2000-06-30  |  30KB  |  517 lines

  1.                                Z-System Corne≥ (c)
  2.                                  by Jay Sage
  3.                         The Computer Journal, Issue 40
  4.                           Reproduced with permission
  5.                            of author and publisher
  6.  
  7. > [Note to Art Carlson and others reading this file: The lines
  8. > beginning with a control-F are formatting commands for my PMATE text
  9. > editor.  They should be dropped from the text after the text has
  10. > been reformatted for publication.  PMATE handles formatting in a
  11. > WordStar-compatible way except for hyphens at line breaks (they
  12. > have their high bit set, just as soft returns do).  For readers of
  13. > this file who want to print it, running the text through one of the
  14. > high bit filters should fix those lines up.]
  15.  
  16. R76;set right margin to 76
  17.  
  18.  
  19.    For some time I have been planning to discuss issues connected withì
  20. setting up a remote access system (RAS), such as a Z-Node.  There is still aì
  21. great need for new nodes, and I think there are quite a few people toyingì
  22. with the idea of setting one up; they just aren't sure they know how to doì
  23. it.
  24.  
  25.    In fact, I am going to take up only a very small part of this questionì
  26. here -- and not even the part that would really help someone implement aì
  27. system.  After thinking about it, I realized that I am not the best personì
  28. to talk about the procedures.  I may not even be a good person.  In fact,ì
  29. I'm not even sure that I know any longer how to do it!
  30.  
  31.    To solve this problem, I am going to try to take the approach I have beenì
  32. taking more and more recently -- recruit someone else to write a TCJì
  33. article.  Specifically, I hope to get the sysop(s) of one or more of theì
  34. newer nodes to document the procedures they went through.  After all, theyì
  35. are the real experts on the subject.  My discussion here will instead coverì
  36. only theoretical issues.  I hope that even those who have no interest inì
  37. setting up their own RAS will find such a discussion interesting.
  38.  
  39.    As usual, before I get to the main technical topic, I have a number ofì
  40. other matters to cover first.  Here is my list for this issue: Z-Nodeì
  41. update, Z-Helpers, GEnie, and BDS C.
  42.  
  43.  
  44.                                Z-Node Update
  45.  
  46.    It has been three issues since the last update on the Z-Node roster, andì
  47. there have been quite a few changes.  The complete list is reproduced inì
  48. Listing 1.  Many inactive nodes have been dropped, and four new nodes haveì
  49. been added.
  50.  
  51.    Chris McEwen's Socrates board in New Jersey is now Z-Node #32.  Theì
  52. system is running under NZCOM on a Xerox 16/8 computer.  Besides offeringìègeneral support to the 8-bit community, Chris is a special resource forì
  53. owners of Xerox computers.  Unfortunately, the recent changes in the Newarkì
  54. outdial of PC-Pursuit have cut ZN32 off from a lot of its regular callers. ì
  55. As a result, Chris has switched to an alternative low-cost data transferì
  56. service called StarLink.
  57.  
  58.    Briefly, StarLink provides much wider geographical access and fullì
  59. support for 2400 bps connections without the packet-switching delaysì
  60. encountered on PCP.  It is more expensive than PCP at higher monthly usageì
  61. rates but cheaper at lower usage levels.  In the future we want to includeì
  62. in the Z-Node roster the StarLink addresses as well as PCP outdials.  I'dì
  63. appreciate it if anyone with such information would could get it to me usingì
  64. any of the methods indicated in the sidebar to my column.
  65.  
  66.    The NYOUG (New York Osborne User Group) Fog #15 node (sysop Livingstonì
  67. Hinckley) has become a Z-Node as well, with the same number 15.  The systemì
  68. is running on an Osborne Executive (CP/M-Plus) with the Z3PLUS version of Z-System.  It is, thus, the first Z-Node -- though, I believe, not the firstì
  69. RAS -- to run under Z3PLUS.  The board supports data rates up to 9600 bpsì
  70. using a USR Courier HST modem.
  71.  
  72.    Dave Trainor in Cincinnati, Ohio, has signed up as Z-Node #7.  His NZCOM-based system has many of the Z-System tools, such as VLU and VFILER,ì
  73. available for use on-line.
  74.  
  75.    Greg Miner established a new frontier for Z-System as he became Z-Nodeì
  76. #11 in Port Williams, Nova Scotia.  Greg is fairly new to the Z-System butì
  77. has already made a significant contribution as a programmer.  He realizedì
  78. that on properly aliased Z-Systems, a "DIR *.COM" command does not reallyì
  79. indicate to the user the commands that are available.  So, he wrote ADIRì
  80. (Alias DIRectory).  It examines the ALIAS.CMD file, figures out the names ofì
  81. all the ARUNZ aliases (allowing for the multiply named scripts), andì
  82. displays a sorted listing of them.  A very fine program!
  83.  
  84.    Finally, Ludo VanHemelryck, with assistance from Michael Broschat, willì
  85. be setting up a new Z-Node in Seattle to replace Norm Gregory's system,ì
  86. which has gone over to MS-DOS.  Recently, while on a business trip toì
  87. Portland, Oregon, I had the pleasure of meeting Ludo and Michael (frankly, Iì
  88. was rather flattered that they were willing to drive all the way down fromì
  89. Seattle), and I think they will do a lot to boost Z-System interest in theì
  90. Seattle area.
  91.  
  92.  
  93. ============================================================================
  94. R85;set right margin to 85
  95.  
  96. Listing 1.  Z-Node List
  97.  
  98.                               Z-Node List #53
  99.                      Sorted by State/Area Code/Exchange
  100.  
  101.  
  102. Revised Z-Node list as of May 30, 1989.  An "R" in the left column
  103. indicates a node that has registered with Z Systems Associates.  Report anyèchanges or corrections to Z-Node Central (#1) or to Jay Sage at Z-Node #3 in
  104. Boston (or by mail to 1435 Centre St., Newton Centre, MA 02159-2469).
  105.  
  106.  
  107.   NODE      SYSOP         CITY        STATE  ZIP    RAS Phone      PCP     Verified
  108.  
  109. Z-Node Central
  110. --------------
  111.  
  112. R   1 Richard Jacobson  Chicago         IL  60606  312/649-1730  ILCHI/24  05/20/89
  113. R   1 Richard Jacobson  Chicago         IL  60606  312/664-17330 ILCHI/24  05/20/89
  114.  
  115. Satellite Z-Nodes:
  116. ------------------
  117.  
  118. R   2 Al Hawley         Los Angeles     CA  90056  213/670-9465  CALAN/24  05/20/89
  119. R   9 Roger Warren      San Diego       CA  92109  619/270-3148  CASDI/24  02/01/89
  120. R  66 Dave Vanhorn      Costa Mesa      CA  92696  714/546-5407  CASAN/12  10/30/88
  121. R  81 Robert Cooper     Lancaster       CA  93535  805/949-6404            12/29/88
  122. R  36 Richard Mead      Pasadena        CA  91105  818/799-1632            11/01/88
  123.  
  124. R  17 Bill Biersdorf    Tampa        FL  33618  813-961-5747  FLTAM/24   (down)
  125.       (node 17 expected to be up beginning of summer)
  126.  
  127. R   3 Jay Sage          Newton Centre   MA  02159  617/965-7259  MABOS/24  05/20/89
  128.  
  129. R  32 Chris McEwen    Plainfield    NJ  07080  201-754-9067  NJNEW/24  05/20/89
  130.  
  131. R  15 Liv Hinckley    Manhattan    NY  10129  212-489-7370  NYNYO/24  05/20/89
  132.  
  133. R   7 Dave Trainor    Cincinnati    OH  45236  513-791-0401            05/20/89
  134.  
  135. R  33 Jim Sands         Enid            OK  73703  405/237-9282           11/01/88
  136. R  58 Kent R. Mason     Oklahoma City   OK  73107  405/943-8638
  137.  
  138. R   4 Ken Jones         Salem           OR  97305  503/370-7655            09/15/88
  139.    60 Bob Peddicord     Selma           OR  97538  503/597-2852            11/01/88
  140. R   8 Ben Grey          Portland        OR  97229  503/644-4621  ORPOR/12  05/20/89
  141.  
  142. R   6 Robert Dean       Drexel Hill     PA  19026  215-623-4040  PAPHI/24  05/20/89
  143. R  38 Robert Paddock    Franklin        PA  16323  814/437-5647            11/01/88
  144.  
  145. R  77 Pat Price         Austin          TX  78745  512/444-8691            10/31/88
  146. R  45 Robert K. Reid    Houston         TX  77088  713/937-8886  TXHOU/24  05/20/89
  147.  
  148.    10 Ludo VanHemelryck    Seattle        WA  (new node being set up)
  149. R  78 Gar K. Nelson     Olympia         WA  98502  206/943-4842            09/10/88
  150.  
  151. R  65 Barron McIntire   Cheyenne        WY  82007  307/638-1917            12/12/88
  152.  
  153. R   5 Christian Poirier Montreal Quebec   H1G 5G5 CANADA  514/324-9031     12/10/88
  154. R  40 Terry Smythe  Winnipeg    Manitoba  R3N 0T2 CANADA  204/832-4593     11/01/88è
  155. R  62 Lindsay Allen  Perth, Western AUSTRALIA 6153       61-9-450-0200     12/21/88
  156.    50 Mark Little    Alice Springs, N.T. AUSTRALIA 5750  61-089-528-852
  157.  
  158. R76;set right margin back to 76
  159. ============================================================================
  160.  
  161.  
  162.                                  Z-Helpers
  163.  
  164.    In the early days, getting ZCPR3 installed on a computer was a veryì
  165. arcane process, beyond the capability of most potential users.  Echelon hadì
  166. the wisdom to compile a list of people all over the country (actually aroundì
  167. the world) who were willing to help other users get through the process. ì
  168. These people were called Z-Helpers.
  169.  
  170.    Today, thanks to NZCOM and Z3PLUS, getting the Z-System installed is veryì
  171. easy.  It's even easy to get started using it, since it can be run just likeì
  172. CP/M.  Taking full advantage of its capabilities, however, is another story. ì
  173. With a richness of function comparable to that of Unix, the Z-System can beì
  174. daunting, but when one remains ignorant of its capabilities, one misses outì
  175. on a lot of its utility and fun.
  176.  
  177.    In looking over the Z-Helper list that is posted on the Z-Nodes andì
  178. included with the NZCOM and Z3PLUS packages, I realized that this list hasì
  179. not been updated for many, many years, and most of its information isì
  180. obsolete.  It's high time that the list be rebuilt!
  181.  
  182.    My plan is to discard the current list and start over, keeping only theì
  183. few people I know to be active still.  I would like to expand that listì
  184. greatly.  If you feel that you could be of some assistance to new Z-Systemì
  185. users, please send me a post card or short note with the followingì
  186. information: name and address, voice phone number and hours, EMAILì
  187. addresses, if any (BBSs, GEnie, Compuserve, ARPAnet, BITNET, etc.), specialì
  188. areas of expertise, if any (specific computers, Z3PLUS).  Remember, you doì
  189. not have to be a Z-System know-it-all -- none of us is.  Willingness andì
  190. eagerness to help are the most important qualifications of a Z-Helper, andì
  191. by working with others, you will end up learning a lot yourself.
  192.  
  193.  
  194.                            GEnie CP/M Roundtable
  195.  
  196.    Some of you may have noticed the change in the sidebar to my articleì
  197. listing a GEnie mailbox for me (JAY.SAGE).  GEnie has been making aì
  198. determined effort to provide support to the CP/M community.  Theì
  199. indefatigable Keith Petersen is the main force behind it, and he recruitedì
  200. me several months ago to join the staff as a sysop specializing in the ZCPR3ì
  201. and Z-System areas.
  202.  
  203.    A system like GEnie offers a significant advantage over individual Z-Nodes: universal connection.  With the Z-Nodes, if you want to leave me aì
  204. message, you have to call one of the Z-Nodes that I call into regularly, andì
  205. then you have to call around again to see if and where I might have left aìèresponse.  Systems like GEnie and Compuserve offer central communicationì
  206. points readily accessible from most places in the US and Canada (and withì
  207. worldwide access developing rapidly -- Japan is on-line already).
  208.  
  209.    One of the activities on GEnie is called a real-time conference (RTC), inì
  210. which users can communicate interactively.  These conferences are held onì
  211. many subjects.  The CP/M RTC takes place every Wednesday evening at 10 pmì
  212. eastern time, with the first Wednesday session of each month generally ledì
  213. by me and earmarked for Z-System discussion.  So, if you have questions orì
  214. suggestions that you would like to discuss with me and other Z-System users,ì
  215. please consider joining us on the GEnie RTC.  If you don't already belong toì
  216. GEnie, check BBS systems near you for information on a special GEnie signupì
  217. offering that gives you $20 of free connect time as a new registrant.
  218.  
  219.  
  220.  
  221.                                 BDS C Update
  222.  
  223.    A couple of issues back I announced that a special Z-System version ofì
  224. BDS C would soon be available, and a number of people have been asking meì
  225. about its status.  The standard CP/M version 1.60 of BDS C has beenì
  226. available about a year already, and a working Z-System version is now beingì
  227. sold.  We will probably eventually make a few more changes (such as addingì
  228. support for type-3 program generation).  In that case, everyone who orderedì
  229. the earlier version will be offered an update at a price not to exceed theì
  230. cost of media and shipping.
  231.  
  232.    Some people have criticized the $90 price, comparing it to Turbo Pascal,ì
  233. which sells for only $60.  What they don't realize is how much more one getsì
  234. with BDS C for the extra $30.  Listing 2 shows the contents of the four DSDDì
  235. diskettes in the release, comprising well over 100 files and more than aì
  236. megabyte of material!
  237.  
  238.    First there are the core COM files you would expect: the compilerì
  239. (CC.COM), the code generator (CC2.COM), the linker (CLINK.COM), and aì
  240. librarian (CLIB.COM).  CC, CC2, and CLINK come in both standard CP/M and Z-System versions, with separate run-time packages.
  241.  
  242.    Then there is the stuff that almost no one gives you -- the source code. ì
  243. True, you don't get the source for the core items, but you do get sourceì
  244. code for everything else.  Assembly-language source is included for the run-time package, and C source is provided for the collection of standardì
  245. libraries.  Some of the items are provided only in C source code; you haveì
  246. to compile them to produce COM files configured for your system and tastes. ì
  247. This includes two assemblers -- one that uses Intel mnemonics (CASM) and oneì
  248. that uses Zilog mnemonics (ZCASM) -- and a symbolic debugger (CDB).  Andì
  249. while you don't get the source for CLINK, you do get the source for anotherì
  250. linker, L2, that has even more capability (such as handling code that won'tì
  251. all fit in memory at one time).
  252.  
  253.    RED, an editor with special hooks into the C error listing, is alsoì
  254. provided, again in source form.  You also get a number of sample programs,ì
  255. ranging from simple ones like CP (copy files) to an implementation of theì
  256. MODEM7 file-transfer protocol (CMODEM.C).  [P.S. If you absolutely andìèirresistibly crave the assembly-language source code to the BDS C coreì
  257. components (for personal use, not resale, of course), they can be purchasedì
  258. as an extra option for $200.]
  259.  
  260.    Support is another important issue.  Who supports Turbo Pascal?  The sameì
  261. people who when asked about Turbo Modula 2 vigorously deny that they everì
  262. offered such a product at all!  [Alpha Systems, unfortunately, acquired onlyì
  263. the right to sell Turbo Pascal; Borland did not give them the source codeì
  264. and does not allow them to maintain it.]  With BDS C, the situation is quiteì
  265. the opposite.  On page 1 of the BDS C manual, at the top of the page, authorì
  266. Leor Zolman's personal phone number is listed, and he not only invites youì
  267. to call him, day or evening, he actually is happy when you do!
  268.  
  269.    In short, BDS C is a remarkable product from a remarkable programmer.
  270.  
  271.  
  272. ============================================================================
  273.  
  274. Listing 2.  Files that comprise the four DSDD diskettes in the Z version ofì
  275. BDS C (directories captured using the BGii SCREEN command).
  276.  
  277. XD III  Version 1.2      Standard BDS C, Version 1.60
  278. Filename.Typ Size K RS  Filename.Typ Size K RS  Filename.Typ Size K RS
  279. -------- --- ------ --  -------- --- ------ --  -------- --- ------ --
  280. CCC     .ASM     34     NOBOOT  .C        2     DEFF2B  .CSM     24
  281. BUILD   .C        6     RM      .C        2     DEFF2C  .CSM      8
  282. CASM    .C       24     STDLIB1 .C        8     WILDEXP .CZ       6
  283. CCONFIG .C       12     STDLIB2 .C        8     CDBUPDAT.DOC      6
  284. CCONFIG2.C        8     STDLIB3 .C        6     FILES   .DOC      4
  285. CDB     .C        6     TAIL    .C        2     CCONFIG .H        2
  286. CHARIO  .C        4     UCASE   .C        2     CDB     .H        4
  287. CLOAD   .C        4     C       .CCC      2     CDB1    .H        2
  288. CMODEM  .C       12     CC      .COM     16     CMODEM  .H        2
  289. CMODEM2 .C        8     CC2     .COM     18     DIO     .H        2
  290. CP      .C        6     CDB     .COM     16     HARDWARE.H        4
  291. DATE    .C        4     CLIB    .COM      6     STDIO   .H        2
  292. DI      .C        4     CLINK   .COM      6     BDS     .LIB      6
  293. DIO     .C       10     DEFF    .CRL     12     READ    .ME       4
  294. L2      .C       26     DEFF2   .CRL      6     C       .SUB      2
  295. LPR     .C        4     DEFF2A  .CSM     20     CASM    .SUB      2
  296.      F  1:  --   48 Files Using   384K (   18K Left)
  297.  
  298. XD III  Version 1.2      Standard BDS C, Version 1.60
  299. Filename.Typ Size K RS  Filename.Typ Size K RS  Filename.Typ Size K RS
  300. -------- --- ------ --  -------- --- ------ --  -------- --- ------ --
  301. ATBREAK .C        4     RED3    .C       26     BCD2    .CSM     24
  302. BMATH   .C       22     RED4    .C       20     DASM    .CSM      2
  303. BREAK   .C        4     RED5    .C        4     BUGS    .DOC      2
  304. CDB2    .C        2     RED6    .C        2     CRCK    .DOC      2
  305. CDBCONFG.C        6     RED7    .C        4     BDSCIO  .H        4
  306. COMMAND .C        6     RED8    .C       14     CDB2    .H        4
  307. DEMO1   .C        2     RED9    .C        2     MCONFIG .H        2èLMATH   .C        2     TARGET  .C        4     RED     .H        6
  308. LONG    .C        4     TSTINV  .C        2     RED1    .H        2
  309. PARSE   .C       12     UTIL    .C        2     REDBUF  .H        4
  310. PRINT   .C       10     CRCK    .COM      2     RED-READ.ME       4
  311. RED10   .C       14     RCONFIG .COM     24     CDB2    .OVL     20
  312. RED11   .C       18     CRCKLIST.CRC      4     CRED    .SUB      2
  313. RED12   .C       16     BCD     .CRL     16     L2RED   .SUB      2
  314. RED13   .C        6     DASM    .CRL      2     LRED    .SUB      2
  315. RED14   .C        6     DEFF15  .CRL     10     NULL    .SYM      0
  316. RED2    .C       14     BCD1    .CSM      8
  317.      F  2:  --   50 Files Using   376K (   18K Left)
  318.  
  319. XD III  Version 1.2      Special Z-System Files
  320. Filename.Typ Size K RS  Filename.Typ Size K RS  Filename.Typ Size K RS
  321. -------- --- ------ --  -------- --- ------ --  -------- --- ------ --
  322. -BDSZ   .         0     CC2     .COM     18     DEFF2A  .CSM     20
  323. CCC     .ASM     50     CCONFIG .COM     20     DEFF2B  .CSM     24
  324. CP      .C        6     CLINK   .COM      6     ZUTIL   .CSM      2
  325. DI      .C        4     TAIL    .COM      6     STDIO   .H        2
  326. ECH     .C        2     DEFF    .CRL     12     BDS     .LIB      8
  327. TAIL    .C        2     DEFF2   .CRL      6     READ    .ME      18
  328. WILDEXP .C        8     DEFF3   .CRL      4     CASM    .SUB      2
  329. C       .CCC      4     TAIL    .CRL      2     NDEFF2  .SUB      2
  330. CC      .COM     16
  331.      F  1:  --   25 Files Using   244K (  420K Left)
  332.  
  333. XD III  Version 1.2      Zilog-Mnemonic Version of Assembler
  334. Filename.Typ Size K RS  Filename.Typ Size K RS  Filename.Typ Size K RS
  335. -------- --- ------ --  -------- --- ------ --  -------- --- ------ --
  336. -ZCASM  .         0     ZCASM   .DOC      8     READ    .ME       2
  337. ZCASM   .C       24     --READ--.ME       2     ZCASM   .SUB      2
  338. ZCASM   .COM     18
  339.      F  2:  --    7 Files Using    56K (  420K Left)
  340.  
  341. ============================================================================
  342.  
  343.  
  344.                            Remote Access Systems
  345.  
  346.    I had hoped by now to have gone through the process of completelyì
  347. revamping the RAS software on my Z-Node.  It has been many years since Iì
  348. designed that system, and I really do not remember all the details of what Iì
  349. went through.  Being the sort I am, I made a great number of customì
  350. modifications to all the programs, and, as a result, I have been stuck usingì
  351. old versions of everything.  I use a derivative of BYE503 when the latestì
  352. version is BYE520; I run a modified KMD09 when KMD has not only advanced toì
  353. a much higher version number but has really been superceded by Robertì
  354. Kramer's excellent ZMD.  Admittedly, I already incorporated a number of theì
  355. improvements that these versions offer; nevertheless, my node is quiteì
  356. outmoded.
  357.  
  358.    With the TCJ column as an excuse to look into all these new developments,ìèI thought I would be able to modernize Z-Node #3 and be able to tell you howì
  359. to go about creating a new Z-Node in the easiest possible way.  Alas, asì
  360. usual, I have been too busy with other things.  As I said earlier, I hope toì
  361. get one or more of the new Z-Node sysops to contribute articles to TCJ onì
  362. this subject.
  363.  
  364.    Since I can't give a prescription for creating a standard remote accessì
  365. system (RAS) using the current software, I will instead discuss some of theì
  366. basic concepts behind a remote access system and the ways in which Z-Systemì
  367. facilities can be used to advantage.  The standard RAS software is designedì
  368. to work under standard CP/M and is far less efficient than it could be.
  369.  
  370. I/O Redirection
  371.  
  372.    Once you have a secure Z-System running, as we described last time, theì
  373. next step is to make it possible for the system to be operated via theì
  374. modem.  The standard software that does this is called BYE, and it tracesì
  375. its roots all the way back to the work of Keith Petersen and others from theì
  376. days of Ward Christensen's first remote CP/M (or RCPM) system in the lateì
  377. 1970s.
  378.  
  379.    A great deal of development has occurred since that time, and BYE nowì
  380. provides a rich array of services.  Its essential function, however, is toì
  381. provide redirection of the console input/output functions.  Program input isì
  382. allowed to come not only from the local keyboard but also from the modem;ì
  383. program output is sent not only to the local screen but also to the modem. ì
  384. In this way, either the local operator or the person connected via the modemì
  385. can operate the computer.  With a secure Z-System, this alone would beì
  386. enough for a rudimentary RAS.
  387.  
  388.    BYE works by installing itself as an RSX, or resident system extension,ì
  389. generally just below the command processor.  It patches the data in page 0ì
  390. of memory (this is where programs find out how to request services from theì
  391. operating system) and in the actual BIOS.  These patches do two things. ì
  392. They protect BYE so that a warmboot will not result in its removal fromì
  393. memory, and they allow BYE to intercept software calls to the BIOS and DOSì
  394. from any running programs.  BYE can then substitute its own additional orì
  395. special functions.
  396.  
  397.    In a Z-System, the extended character I/O functions of BYE could properlyì
  398. be implemented using an IOP (Input/Output Package).  The IOP is aì
  399. generalization of the concept from early CP/M of the so-called IOBYTE, whichì
  400. was controlled by the STAT command and used to select from a fixed set ofì
  401. I/O devices (up to four possibilities in the case of the console).  Richardì
  402. Conn conceived of the IOP module as a way to handle just the kind of I/Oì
  403. operations needed for a RAS, and his book, "ZCPR3, The Manual," has someì
  404. examples of this.  Alternatively, the BIOS functions could be implementedì
  405. directly in an NZCOM VBIOS (virtual BIOS), which could be loaded as needed.
  406.  
  407.    Consider the case where the console is an external terminal connected toì
  408. an RS232 serial port.  The standard BIOS CONOUT (console output) functionì
  409. takes the character in register C and sends it to that serial port.  For aìèremote system, the BIOS would send the character first to the terminal'sì
  410. serial port and then to the modem's serial port.
  411.  
  412.    Similarly, the standard BIOS CONST (console status) function checks theì
  413. terminal's serial port to see if a character has been received.  If so, itì
  414. returns with a nonzero value in register A; otherwise it returns a zeroì
  415. value.  For a remote system, the CONST routine would check both serial portsì
  416. and return a nonzero value if either one has a character ready.  CONINì
  417. (console input) would poll the two serial ports alternately until it got aì
  418. character from one or the other of them.
  419.  
  420.    Conceptually, this is really all pretty straightforward.  The biggestì
  421. problem is that the code depends on the specific computer hardware, so noì
  422. universal routines can be supplied.  The BYE program has been cleverlyì
  423. designed, like an operating system, with the hardware-specific codeì
  424. separated from the hardware-independent code.  As a result, customizedì
  425. versions of BYE can be assembled easily by putting source code inserts forì
  426. one's specific hardware at designated places in the master file.  There areì
  427. two collections of inserts, one for many computer types and one for manyì
  428. types of real-time clocks (more about this later).
  429.  
  430.    There are also some fine points about how the console redirection isì
  431. handled.  BYE, of course, knows the difference between the local console andì
  432. the modem and can treat them differently where appropriate.  For example,ì
  433. since modems commonly produce certain noise characters that rarely appear inì
  434. intended input (such as the left curly brace), these can be filtered outì
  435. (i.e., ignored).  Also, some special functions can be assigned to localì
  436. control codes.  For example, pressing control-N at the local console willì
  437. immediately end the callers session (used when the sysop doesn't like what aì
  438. user is doing); on the other hand, control-U removes any connect time limit,ì
  439. and control-A allows special access by turning on the wheel byte (togglingì
  440. it, actually).
  441.  
  442.    The screen output can likewise be handled differently.  Pressing control-W locally causes a local display of the current caller's name.  Something Iì
  443. added to my version of BYE was a filter that prevents escape sequences fromì
  444. going to the local console.  I allow (encourage) users to take advantage on-line of virtually all Z-System capabilities, including the full-screenì
  445. utilities like ZFILER, ZMANAGER, and VLU.  When I first started to do this,ì
  446. I found that the escape sequences going to the users' terminals sometimesì
  447. did very bad things to my own terminal (the smartest terminals, like theì
  448. Wyse and Televideo models, have the worst problems; they have sequences --ì
  449. that cannot be disabled -- that lock out the keyboard!).  I simply borrowedì
  450. the code used in BYE for the incoming-character filter.
  451.  
  452. Modem Initialization and Call Detection
  453.  
  454.    The first real complication we have to face is that the actions describedì
  455. above make sense only after the local modem is in communication with aì
  456. remote modem.  Consequently, BYE has traditionally been given the additionalì
  457. task of initializing the modem and monitoring it for an incoming call.  Aì
  458. 'smart modem' (one that processes the Hayes "AT" commands and returns theì
  459. Hayes result codes) is generally assumed, though BYE apparently will workì
  460. with other modems to some extent.è
  461.    The standard procedure today for answering calls (unless it has changedì
  462. again since my BYE503) is not, as one might have expected, to set the modemì
  463. to auto-answer mode.  There are some subtle reasons why this is lessì
  464. desirable.  Instead, BYE monitors the modem port for an output string fromì
  465. the modem indicating that it has detected a ring signal.  This string willì
  466. be "RING" if the modem is in verbose mode or "2" if it is in terse mode. ì
  467. BYE then sends the command "ATA" to the modem so that it will answer theì
  468. call.  Then BYE waits for another string that indicates the data rate of theì
  469. connection; in terse mode these are "1" for 300 bps, "5" for 1200 bps, "10"ì
  470. for 2400 bps, and other values for higher speed or error-correcting modems. ì
  471. Finally, the serial port is synchronized to the modem's data rate.
  472.  
  473.    If no connect indication is received within a prescribed time, BYEì
  474. recycles the modem to make it ready for another call.  Once a connection hasì
  475. been established, BYE generally displays a welcome message, and it may askì
  476. for a password.  Then it loads an initial program, typically the bulletinì
  477. board program.
  478.  
  479.    The functions we just described do not really have to be handled in BYEì
  480. at all, and TPA could be saved (remember, the BYE code remains resident inì
  481. high memory at all times) if they were performed by a transient program. ì
  482. With a Z-System there is also no need for BYE itself to load a program fileì
  483. into memory.  All it has to do is place a command line into the multipleì
  484. command line buffer.  This requires much less code and is faster and moreì
  485. flexible.  Moreover, the full power of the command processor is available toì
  486. locate and load the program code.  Resident, type-3, and type-4 programs canì
  487. be used.  I modified my BYE to load the simple command line STARTRAS, which,ì
  488. as you probably guessed, is an alias (it can be an ARUNZ alias, in fact). ì
  489. This makes it very easy to make changes and experiment.
  490.  
  491. Carrier Monitoring
  492.  
  493.    There is one further function of BYE that cannot easily be performedì
  494. anywhere else.  That is monitoring the carrier-detect line for a loss ofì
  495. connection.  After all, a caller might hang up or become disconnected at anyì
  496. time.  Some special clean-up functions must then be performed.  Theì
  497. currently running program must be aborted, any system maintenance functionsì
  498. performed (such as updating the database of caller information), and theì
  499. modem must be reset and readied for another call.  Without going into anyì
  500. detail, I do want to point out that terminating a running program can beì
  501. tricky, especially if file I/O is in progress.
  502.  
  503.    Besides detecting when a user disconnects, either voluntarily orì
  504. accidentally, BYE can also enforce a time limit on the caller.  For many ofì
  505. its timing functions, BYE requires a real-time clock.  As I mentionedì
  506. earlier, there is a library of clock inserts that can be installed in theì
  507. BYE source before it is assembled.
  508.  
  509.    This completes the discussion for this issue.  So far we have touched onì
  510. the BIOS and modem-control functions of BYE; next time I plan to take up theì
  511. DOS services that BYE provides.è
  512. [This article was originally published in issue 40 of The Computer Journal,
  513. P.O. Box 12, South Plainfield, NJ 07080-0012 and is reproduced with the
  514. permission of the author and the publisher. Further reproduction for non-
  515. commercial purposes is authorized. This copyright notice must be retained.
  516. (c) Copyright 1989, 1991 Socrates Press and respective authors]
  517.