home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / cpm / mex / mxo-px8.doc < prev    next >
Encoding:
Text File  |  1994-07-13  |  12.1 KB  |  205 lines

  1. .fo  MXO-PX8 Version 1.0        -#-     (C) Copyright 1985 by David B. Kozinn
  2. .po 0
  3.      This  file will serve to document the MXO-PX8 overlay for MEX  version 
  4. 1.12.  This file is not intended to document MEX itself, but rather some of 
  5. the  peculiarities  inherent in using this overlay.  I'll try not  to  miss 
  6. anything.
  7.  
  8.                                Installation
  9.  
  10.      MXO-PX8  should  only be installed in version 1.12 (or higher) of  MEX 
  11. since  it  relies  on  some variables that were  added  for  that  version, 
  12. specifically the MODE byte for determining when we're in terminal mode  (so 
  13. we  don't  try  to  use XON/XOFF flow control  then)  and  it  specifically 
  14. disables  the  queued  I/O mode since this interferes with the  PX-8's  own 
  15. interrupt  driven  I/O  routines.  No special procedures  are  needed  when 
  16. installing the overlay, and you may install any dialing overlay (which will 
  17. only be used if you are using an external modem) that is ORG'd at 0B00H. If 
  18. you are using an external modem dialing overlay (see the section on Dialing 
  19. Overlays  for  details),  you must have it after the main overlay  in  your 
  20. MLOAD command or it will not be recognized.  A typical MLOAD command  might 
  21. look like this:
  22.  
  23.           MLOAD MEX.COM=MEX112.COM,MXO-PX8.HEX,MXO-SM14.HEX
  24.  
  25.  
  26.                              The SET commands
  27.  
  28.      SET  ?  will  tell  you  what what the  available  SET  commands  are. 
  29. Currently these are SET, SET DELAY, SET OFFHOOK, and SET COMM.
  30.  
  31.      SET by itself will return some information about the current status of 
  32. the RS-232 ports.  The information returned is carrier status,  whether the 
  33. modem is on or off hook,  and what the DELAY value is (see below.) A couple 
  34. of caveats about this information: if you exit MEX then re-enter the on/off 
  35. hook  status will be incorrect if the modem is off-hook when you enter.  If 
  36. you have something plugged into the external RS-232 port that is  providing 
  37. DTR  then  you will always appear to have carrier no matter whether or  not 
  38. there is really carrier present to the modem. 
  39.  
  40.      SET  DELAY  changes  the  delay value that is used  when  a  comma  is 
  41. encountered  in  a dialing string.  (See the section on  dialing  for  more 
  42. information.)  The default value is two seconds,  but any value from 0 to 9 
  43. may be used.
  44.  
  45.      SET  OFFHOOK causes the modem to go off-hook.  This probably  isn't  a 
  46. really useful thing in most cases,  except that if you've disconnected when 
  47. using  the  external  port,  you'll need to say this to make the  port  pay 
  48. attention to you.
  49.  
  50.      SET  COMM is the most useful of the SET commands.  When you  type  SET 
  51. COMM  you'll  get a menu that looks pretty much like the menu that you  get 
  52. from  CONFIG.  The only difference is that on the last line you can  select 
  53. either  the EXTERNAL or INTERNAL modem.  In this case EXTERNAL refers to  a 
  54. device plugged into the RS-232 plug on the back of the PX-8, which INTERNAL 
  55. refers  to an MFU or other direct connect modem connected directly  to  the 
  56. system bus.  (In other words, it's got to be attached to the bottom of your 
  57. PX-8.) The system will not let you select the internal modem if you haven't 
  58. got  one.  When you first start up the system,  the values selected are the 
  59. ones  that  you have set up to be your  default  communications  parameters 
  60. using CONFIG.  The only exception to this is whether to use the internal or 
  61. external  modem (since CONFIG doesn't handle that.) If an internal modem is 
  62. present,  it will be the default,  otherwise external will be assumed. When 
  63. you  exit MEX,  your overlay parameters will be retained as long as you  do 
  64. not do a warm boot (ie.  type control-c or do a jump to 0000H.) A warm boot 
  65. will cause the modem to power off, hanging up the phone line in the process 
  66. (if it was connected.) More about this later.
  67.  
  68.                              Dialing Overlays
  69.  
  70.      If you don't have an MFU (which I use to mean an actual multi-function 
  71. unit  or  a  system-bus connected modem) then you'll  need  to  include  an 
  72. overlay such as MXO-SM14 when you MLOAD to create your MEX.  If you do have 
  73. an  MFU,  you  may  include  such a dialing overlay  as  well  for  maximum 
  74. flexibility,  as  you'll  then be able to dial using both the internal  and 
  75. external modem.  It won't cost you anything else in terms of space since if 
  76. you  don't install the dialing overlay that space is still in the  program, 
  77. though unused.  If you choose to use an external dialing overlay,  you  may 
  78. also choose how you want the modem to disconnect from the line.  If you set 
  79. the  DISC equate to FALSE,  then the modem will disconnect by dropping DTR. 
  80. If you set it to TRUE,  then the character sequence to disconnect the modem 
  81. from the line will be used instead.  (If the preceeding few sentences don't 
  82. mean anything to you just forget about it,  MEX will do the right thing for 
  83. you.I won't discuss the use of the external modem dialing overlay any more, 
  84. as  it  is  documented  elsewhere.  The rest  of  this  section  will  deal 
  85. exclusively with the internal modem dialing routines.
  86.  
  87.      As "delivered",  the MXO-PX8 overlay supports dialing via the built in 
  88. modem  in  a DTMF (tone) mode only.  (Future revisions of this overlay  may 
  89. support  pulse  dialing.)  The modem itself is capable  of  generating  all 
  90. sixteen DTMF tones,  which includes the familiar digits (0-9), #, and *, as 
  91. well as the rarely-seen (or heard) A,B,C,  and D tones.  (If you don't know 
  92. what the A-D tones are used for,  don't worry about it, you're not the only 
  93. one.  I've  included  them since they are supported by the  hardware.)  The 
  94. comma (,) is also specially supported: A comma in the dialing string causes 
  95. the dialing routine to wait approximately DELAY seconds.  DELAY is set with 
  96. the  SET  DELAY  command as previously mentioned,  and  the  default  is  2 
  97. seconds.  You may include several commas in a row if you need to. All other 
  98. characters  are ignored.  The current version of the overlay will not allow 
  99. you to send tones on a line that is already active,  it will hang up  first 
  100. then attempt to dial the tones. 
  101.  
  102.                       Automatic XON/XOFF flow control
  103.  
  104.      The  PX-8  is  a  wonderful piece of  electronics,  but  one  of  it's 
  105. drawbacks is a rather slow LCD display screen.  Because the screen is slow, 
  106. it's  easy  to overrun the internal buffer with characters coming in  while 
  107. the display is trying valiantly to keep up.  (By the way, this is generally 
  108. only  a  problem at speeds at or above about 1200 baud,  but can  occur  at 
  109. lower  speeds if you get a lot of linefeeds in rapid  succession.  This  is 
  110. because  the  screen scrolls even slower than it writes.) Because of  this, 
  111. I've chosen to implement automatic flow control while in terminal mode. 
  112.  
  113.      When  the  internal buffer (which is about 360 bytes) gets  about  3/4 
  114. full,  an  X-OFF (ASCII character 11H) is sent out through the modem  port. 
  115. When  the buffer becomes nearly empty,  an X-ON (ASCII 13H) is  sent.  Many 
  116. computers  (both  mainframes and micros) alike will honor this  signal  and 
  117. will stop sending when told to.  If not, then you'll somehow have to insure 
  118. that  data is sent in small enough chunks so that the buffer does  not  get 
  119. overrun.  You  can  tell if this has happened since you'll the  data  being 
  120. displayed will not look like anything you were expecting.  (In other words, 
  121. you're going to get junk on the screen.) The overlay will only do this kind 
  122. of flow control while in terminal mode,  since it would interfere with file 
  123. transfers  using either file transfer protocol,  and because it just  plain 
  124. isn't needed then.
  125.  
  126.                             File Transfer Speed
  127.  
  128.      A  word  or  two about file transfer speed.  MEX is  a  big,  flexible 
  129. program.  The PX-8 is a small,  powerful,  but not-too-fast  computer.  The 
  130. combination of those two things does have it's price.  The price is that it 
  131. is  not  really possible to get the maximum theoretical speed at any  given 
  132. baud rate.  The higher the baud rate,  the lower the percentage of  maximum 
  133. you'll  get.  What  this  means is that you should not expect  to  get  the 
  134. transfer time that MEX tells you when you start a file transfer.  At higher 
  135. baud  rates,  you'll probably need to multiply that figure by 3-4 times  to 
  136. get the actual transfer time.  The good news is that even though you aren't 
  137. getting  the  theoretical  maximum  rate,  you can still hook  up  to  your 
  138. favorite  computer  at it's maximum speed without  worrying  about  loosing 
  139. characters during file transfer.
  140.  
  141.                          More Speed-related Stuff
  142.  
  143.      It  has  been reported that if you are using a floppy disk drive  with 
  144. your  PX-8 that you may have problems with the other end timing  out  while 
  145. you  write  (or  read) to disk.  This is most likely due to the  fact  that 
  146. normally MEX writes 128 sectors at a time to disk,  which is a fairly  slow 
  147. process with the battery powered external modem.  If you have problems, you 
  148. can  try  telling MEX to buffer smaller amounts between  disk  writes.  The 
  149. simplest  way  to  do  is by using the POKE command then  using  the  CLONE 
  150. command to produce a new working copy of MEX. The procedure is very simple. 
  151. When in MEX, simply type:
  152.                              POKE $D23,n
  153. Replace n with the size of the buffer that you want to use.  I recommend 4, 
  154. which  will cause MEX to save 32 sectors (ie.  4K bytes) in  memory  before 
  155. writing  to disk.  Then simply use the CLONE command to save a new copy  of 
  156. MEX.
  157.  
  158.      Since  it's impossible to tell when a user of MEX might want to return 
  159. to  terminal mode,  I've chosen to implement the overlay in a  manner  such 
  160. that the RS-232 port is always left powered on,  even when exiting to CP/M. 
  161. (This  is so that you can leave MEX then return and pick up right where you 
  162. left off.) Because of this,  there is a constant drain on the batteries. If 
  163. you intend to use your PX-8 for any length of time after using MEX  without 
  164. turning  it  off,  then be sure to do a warm boot (by typing  a  control-C) 
  165. sometime  after exiting MEX.  This will cause the RS-232 port and the modem 
  166. to power off, and will result in extended battery life.
  167.  
  168.                                Miscellaneous
  169.  
  170.      I've found it helpful to do a STAT PAGE 8 then CLONE so that the  STAT 
  171. display  doesn't  roll off my screen before I've had a chance to  read  it. 
  172. You'll  probably want to change the default <ESC> sequence from <LF>  since 
  173. there  is no LF key on the PX-8 keyboard.  (If you don't want to,  remember 
  174. that you can always type control-J to send a linefeed.) Some of the  timing 
  175. values  used for file transfer speed will be less accurate than usual since 
  176. MEX  didn't  define values for some of the baud rates.  See  the  code  for 
  177. specifics. You'll probably want to use CONFIG to set your default baud rate 
  178. to  300 if you're going to be using an MFU.  That makes it possible to  use 
  179. the mode without having to use the SET COMM menu.
  180.  
  181.                         Notes About the Source Code
  182.  
  183.      I've  tried  to make the source code as readable as possible  so  that 
  184. others  can  build upon what I've started.  I ask that if you enhance  this 
  185. overlay,  you let me know so that I can keep my own versions up to date. In 
  186. addition,  I'll  be glad to answer any questions that I can about  how  the 
  187. overlay works.
  188.  
  189.                                   Thanks
  190.  
  191.      Special  thanks  for  the  help they've given me  in  developing  this 
  192. overlay must go to Justin Bell,  Chuck Freeman, and Mike Morra of Epson for 
  193. their help in getting me the information I needed to access the PX-8 system 
  194. information,  to Ron Fowler for tolerating my questions about MEX,  to John 
  195. Kinney and Charlie Strom for helping me to beta-test the overlay, and to my 
  196. wife  Sharon  for putting up with me while I tried to get the  overlay  put 
  197. together.
  198.  
  199.           David B. Kozinn     March 5,1985
  200.  
  201. Compuserve:  [76703,565]  (Preferable method)
  202. CP-MIG (PCS-47), EpsOnline (PCS-19), or Easyplex
  203.  
  204. MCI Mail: dkozinn
  205.