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 / CPM / MODEMS / MODEM / X25.ARK / X25SYS.DOC < prev    next >
Text File  |  1986-07-28  |  24KB  |  487 lines

  1. ********************************************************
  2. *                                                      *
  3. *        X.25 Protocol Interface for CP/M-80           *
  4. *                                                      *
  5. *            SYSTEM FUNCTIONAL DESCRIPTION             *
  6. *                                                      *
  7. *   (C) 1985  Ed Elizondo                              *
  8. *             6 Cypress Court                          *
  9. *             East Windsor, NJ 08520                   *
  10. *                                                      *
  11. *   NOTICE:  All Rights Reserved - These programs and  *
  12. *   accompanying documentation may be used freely for  *
  13. *   non-commercial applications.  They may not be sold *
  14. *   or used for commercial applications without the    *
  15. *   written permission of the author.                  *
  16. *                                                      *
  17. ********************************************************
  18.  
  19.  
  20.  
  21. 1.  Introduction
  22.  
  23.  
  24.      Thσá techniquσ oµ packe⌠ transmissioε i≤ currentl∙ thσá mos⌠ ì
  25. widel∙ useΣ messagσ switchinτ techniquσ iε compute≥ network≤á anΣ ì
  26. ha≤á receiveΣá significan⌠ impetu≤ b∙ worlΣ widσá standardizatioε ì
  27. efforts«á Thσá X.2╡ packe⌠ networδ interface¼á pioneereΣá b∙á thσ ì
  28. FrencΦá posta∞á administratioε Transpaπ networδ anΣ thσá Canadiaε ì
  29. Datapaπ network¼á wa≤ adopteΣ a≤ ß standarΣ b∙ thσá Internationa∞ ì
  30. Consultativσá Committeσá oµ Telephon∙ anΣ Telegraph∙á (CCITT⌐á iε ì
  31. 1976¼ anΣ updateΣ t∩ it≤ curren⌠ forφ iε 1981.
  32.  
  33.      WitΦ rarσ exception≤ packe⌠ transmissioε ha≤ beeε limiteΣ t∩ ì
  34. datßá communication≤á betweeεá largσá mainframσáá computers¼áá o≥ ì
  35. interna∞á t∩ largσ networks«á  Thσ purposσ oµ thi≤ projec⌠ i≤á t∩ ì
  36. providσáá ßá utilit∙á prograφá t∩á permi⌠á direc⌠áá packe⌠áá datß ì
  37. communication≤ betweeε ß microcomputer¼ runninτ unde≥ thσ CP/M-8░ ì
  38. operatinτá system¼á anΣ ß synchronou≤ networδ modeφ o≥á mainframσ ì
  39. compute≥á por⌠ supportinτ thσ X.2╡ standarΣ acces≤ protocol«á Thσ ì
  40. softwarσ packagσ developeΣ fo≥ thi≤ projec⌠ full∙ implement≤á thσ ì
  41. function≤ oµ ß singlσ logica∞ channe∞ DTE¼ a≤ defineΣ b∙ thσ X.2╡ ì
  42. standard.
  43.  
  44.      Thσ softwarσ packagσ wa≤ implementeΣ iε Inte∞ 808░á assembl∙ ì
  45. language¼á compatiblσá witΦ thσ Digita∞ ResearcΦ RMA├á relocatinτ ì
  46. macr∩áá assembler¼áá anΣá targeteΣá t∩á ruεá oεá aεáá inexpensivσ ì
  47. microcompute≥á system¼áá thσá Digita∞á ResearcΦá Computersºá "Biτ ì
  48. Board"«áá  Thσáá minimuφáá hardwarσá requirement≤áá arσáá ßáá Z8░ ì
  49. microprocessor¼á ßá Ziloτá SI╧ synchronou≤ seria∞á communication≤ ì
  50. port¼á anΣá ß Ziloτ CT├ counter/timer¼á al∞ interfaceΣ usinτá Z8░ ì
  51. modσá ▓á interrupts«á  Memor∙á requirement≤á fo≥á thσá systeφá a≤ ì
  52. implementeΣ arσ ß modes⌠ 26╦ fo≥ botΦ prograφ anΣ datß buffers.
  53.  
  54.  
  55. è2. The X.25 Protocol
  56.  
  57.  
  58.      Thσá rule≤á anΣá mechanism≤á b∙ whicΦ user≤á anΣá ßá networδ ì
  59. exchangσá informatioεá iε ß controlleΣ manne≥ arσ referreΣ t∩á a≤ ì
  60. protocols«áá  Thσáá complexit∙á anΣá diversit∙á oµá thσáá networδ ì
  61. constituent≤á favo≥á multiplσ layer≤á oµá protocols¼á eacΦá laye≥ ì
  62. providinτá communication≤ betweeε tw∩ simila≥ classe≤ oµ devices«  ì
  63. Thσá Internationa∞á Standard≤ Organizatioε (ISO⌐ ha≤á proposeΣá ß ì
  64. structurσá oµ seveε hierarchica∞ protoco∞ layer≤á (seσá ref«á 6)«  ì
  65. Thσ X.2╡ standarΣ specifie≤ thσ threσ lowes⌠ layers¼ namely:
  66.  
  67.      1. the physical circuit level
  68.  
  69.      2. the link level
  70.  
  71.      3. the network level
  72.  
  73.  
  74.      Leve∞áá 1¼áá thσá physica∞á circui⌠á level¼áá specifie≤á thσ ì
  75. electrica∞ waveforms¼á voltages¼á anΣ piε connection≤ betweeε thσ ì
  76. enΣá user¼á iεá X.2╡á terminology¼á thσá "hostóá o≥á "DTEóá (Datß ì
  77. Terminatinτá Equipment)¼á anΣá thσá networδ nodσ o≥á "DCEóá (Datß ì
  78. Communication≤ Equipment)«  Thσ X.2╡ standarΣ specifie≤ thσ Leve∞ ì
  79. ▒á interfacσ a≤ beinτ thσ CCIT╘ X.2▒ standarΣ (seσ referencσ ▒ o≥ ì
  80. 2)¼á bu⌠á allows¼á iε aε interiφ basis¼á thσ usσ oµá thσá X.21bi≤ ì
  81. standard«á  Thσá X.21bi≤ standard¼á iε turn¼á permit≤ thσ usσá oµ ì
  82. existinτá synchronou≤á modeφá standard≤ sucΦ a≤ thσá CCIT╘á V.24¼ ì
  83. whicΦá i≤á equivalen⌠á t∩á thσ commoε (iεá thσá USA⌐á EI┴á RS232├ ì
  84. standard.
  85.  
  86.      Leve∞ 2¼ thσ linδ level¼ control≤ bi⌠ datß transmissioε ove≥ ì
  87. thσá physica∞ linδ betweeε thσ tw∩ end≤ oµ thσ leve∞á ▒á circuit«  ì
  88. Thσá primar∙á purposσá oµ thσ Leve∞ ▓ protoco∞ i≤ tha⌠á oµá erro≥ ì
  89. contro∞ anΣ oµ datß transparenc∙ t∩ highe≥ leve∞ protocols«á  Thσ ì
  90. X.2╡á standarΣá specifie≤ thσ Leve∞ ▓ protoco∞ a≤ beinτá thσá IS╧ ì
  91. standarΣ HigΦ Datß Linδ Contro∞ (HDLC).
  92.  
  93.      Informatioε i≤ passeΣ froφ Leve∞ ▓ t∩ Leve∞ ▒ iε thσ forφ oµ ì
  94. datß block≤ calleΣ frames«  Thσ frame≤ utilizσ ß techniquσ calleΣ ì
  95. zer∩á bi⌠á insertioεá (seσá referencσá 6)¼á t∩á achievσá completσ ì
  96. transparenc∙ t∩ thσ datß a⌠ thσ bi⌠ level«á  Thu≤ thσ HDL├á framσ ì
  97. i≤á capablσ oµ transmittinτ an∙ forφ oµ datß withou⌠ thσ neeΣ fo≥ ì
  98. specia∞ contro∞ character≤ withiε thσ framσ a≤ iε thσ IB═á BYSYN├ ì
  99. methoΣá oµ transmission«á  Erro≥ contro∞ a⌠ thσ Leve∞ ▓ interfacσ ì
  100. i≤á achieveΣ b∙ transmittinτ ß cycliπ polynomia∞á checδá sequencσ ì
  101. witΦá ever∙á frame«á  Thi≤ checδ sequencσ i≤ re-generateΣ a⌠á thσ ì
  102. receivinτá enΣá and¼á iµá aε erro≥ i≤á detected¼á ßá reques⌠á fo≥ ì
  103. retransmissioε i≤ automatically sen⌠ bacδ t∩ thσ sender.
  104.  
  105.      Leve∞ 3¼á thσ networδ level¼ control≤ thσ actua∞ transfe≥ oµ ì
  106. informatioεá betweeε tw∩ host≤ (DTE's)«á  Thσ primar∙ purposσá oµ ì
  107. thσá Leve∞á │á protoco∞á i≤ tha⌠á oµá datßá flo≈á control«á  Thi≤ ì
  108. involve≤á individua∞á addressinτá anΣ sequencinτ oµá datßá block≤ ì
  109. calleΣá packets«á  Flo≈ contro∞ i≤ achieveΣ primaril∙á b∙á packe⌠ ìèsequencσáá number≤á anΣá correspondinτá acknowledgemen⌠áá number≤ ì
  110. incorporateΣá int∩á thσ returε flo≈ packet≤. 
  111.  
  112.      Leve∞á │ packet≤ arσ transmitteΣ a≤ thσ informatioεá portioε ì
  113. of Level 2 frames, one data packet to each HDLC frame.
  114.  
  115.      Highe≥á leve∞á protoco∞ task≤ arσ no⌠ specifieΣ b∙ thσá X.2╡ ì
  116. standard«á  Iεá thσ IS╧ proposeΣ architecture¼á thesσá additiona∞ ì
  117. level≤á includσá thσ transpor⌠á level¼á thσá sessioεá level¼á thσ ì
  118. presentatioε leve∞ anΣ thσ applicatioε level«á Fo≥ thσ purposσ oµ ì
  119. thi≤ project¼á tw∩ facilitie≤ arσ provideΣ t∩ handlσ thesσ highe≥ ì
  120. functions.
  121.  
  122.      Onσá higΦ leve∞ facilit∙ provideΣ b∙ thσ systeφ i≤á tha⌠á oµ ì
  123. termina∞ modσ emulation«á  WitΦ thi≤ facility¼ ß typeΣ messagσ a⌠ ì
  124. thσ microcompute≥ consolσ i≤ sen⌠ t∩ thσ networδ a≤ ß singlσ datß ì
  125. packe⌠á message«á  Messagσá packet≤ returneΣ b∙ thσá networδá arσ ì
  126. similarl∙ displayeΣ oε thσ console.
  127.  
  128.      Thσá seconΣá higΦ leve∞ facilit∙ provideΣ b∙ thσá systeφá i≤ ì
  129. tha⌠ oµ bidirectiona∞ datß filσ transfer«á  WitΦ thi≤ facility¼ ß ì
  130. previousl∙ prepareΣ filσ ma∙ bσ sen⌠ t∩ thσ networδ a≤ ß sequencσ ì
  131. oµ datß packets«á  Similarly¼ ß sequencσ oµ datß packet≤ receiveΣ ì
  132. froφá thσá networδá ma∙á bσ saveΣ iε ßá loca∞á file«á  WitΦá thi≤ ì
  133. facility¼á ß pre-arrangeΣ sequencσ oµ command≤ and/o≥ datß ma∙ bσ ì
  134. sen⌠ t∩ thσ networδ hos⌠ anΣ thσ returneΣ result≤ saveΣ fo≥ late≥ ì
  135. analysis.
  136.  
  137.  
  138. 3.  System Organization
  139.  
  140.  
  141.      Thσá basiπá systeφ organizatioε consist≤ oµá tw∩á concurren⌠ ì
  142. processes¼á aεá interrup⌠á handle≥ t∩ servicσ thσ rea∞ timσá datß ì
  143. interfacσá function≤á betweeε thσ systeφ anΣá thσá communication≤ ì
  144. portá anΣ ß sequentia∞ processo≥ t∩ handlσ thσá orderl∙á assembl∙ ì
  145. anΣ disassembl∙ oµ datß packet≤ anΣ proces≤ loca∞ use≥ commands.
  146.  
  147.      Thσá interrup⌠á handle≥ perform≤ threσ basiπá functions║á a⌐ ì
  148. receive≤á incominτá datßá froφ thσá communication≤á portá t∩á thσ ì
  149. currentl∙ activσ receivσ buffer¼á b⌐ transmit≤ outgoinτ datß froφ ì
  150. thσá currentl∙ activσ transmi⌠ buffe≥ t∩ thσ communication≤ port¼ ì
  151. anΣ c⌐ keep≤ tracδ oµ elapseΣ timσ anΣ signal≤ timeou⌠ condition≤ ì
  152. t∩ thσ sequentia∞ processor.
  153.  
  154.      Thσá sequentia∞ processo≥ perform≤ fivσ basiπ functions║á a⌐ ì
  155. receive≤á anΣ transmit≤ datß t∩ anΣ froφ  thσ loca∞ use≥á consolσ ì
  156. includinτá processinτá oµá loca∞á use≥á commands¼áá b⌐á assemble≤ ì
  157. informatioεáá o≥áá supervisor∙á frame≤áá fo≥áá transmission¼áá c⌐ ì
  158. disassemble≤ receiveΣ frame≤ anΣ processe≤ them¼á d⌐ disassemble≤ ì
  159. receiveΣá packet≤ anΣ processe≤ them¼á anΣ e⌐ assemble≤á datßá o≥ ì
  160. contro∞ packet≤ fo≥ transmission«
  161.  
  162.      Processinτá oµ receiveΣ frame≤ include≤ checkinτ fo≥á forma⌠ ì
  163. error≤á anΣ fo≥ valiΣ framσ type≤ anΣ formattinτ thσá appropriatσ ìèrepl∙á frame≤á baseΣ oε thσ typσ oµ receiveΣá framσá anΣá curren⌠ ì
  164. statσá oµá thσ system«á  Fo≥ informatioε frames¼á erro≥á checkinτ ì
  165. include≤á checkinτá oµ framσ sequencσ numbers¼á updatinτá oµá thσ ì
  166. framσáá transmissioεá windo≈á anΣá retransmissioεá oµá frame≤á iµ ì
  167. requested by the remote system.
  168.  
  169.      Processinτá oµ receiveΣ packet≤ i≤ simila≥ t∩ processinτá oµ ì
  170. receiveΣá frames¼áá excep⌠á retransmissioεá oµá packet≤á i≤áá no⌠ ì
  171. required¼ sincσ thσ leve∞ │ transmissioε i≤ considereΣ erro≥ freσ ì
  172. b∙ virtuσ oµ thσ erro≥ contro∞ mechanism≤ tha⌠ forφ ß par⌠ oµ thσ ì
  173. level 2 link transmission.
  174.  
  175.      Thσá implementatioε architecturσ consist≤ oµ seveεá modules¼ ì
  176. whose names and primary functions are as follows:
  177.  
  178.      X2╡       - thσ main program, which includes the system 
  179.                  initialization¼ use≥ interfacσ anΣ maiε ì
  180.                  program sequencer
  181.  
  182.      LEVEL▒    - thσ interrup⌠ handler
  183.  
  184.      LEVEL▓    - thσ linδ leve∞ handler¼ whicΦ include≤ framσ                              ì
  185.                  assembl∙ anΣ disassembl∙ 
  186.  
  187.      LEVEL│    - thσ packe⌠ leve∞ handler¼ whicΦ include≤ packet
  188.                  assembl∙ anΣ disassembly
  189.      
  190.      FILES     - the disk file handler
  191.  
  192.      BUFFERS   - the data buffer handler
  193.  
  194.      XUTIL     - miscellaneous general use subroutines
  195.  
  196.      Thesσ .AS═ module≤ arσ separatel∙ assembleΣ int∩ relocatablσ ì
  197. objec⌠á codσá .RE╠á file≤ b∙ mean≤ oµ thσ Digita∞á ResearcΦá RMA├ ì
  198. macr∩á assembler¼á anΣá theεá linkeΣ togethe≥á witΦá thσá Digita∞ ì
  199. ResearcΦ Z8░ anΣ SEQI╧ macr∩ librarie≤ int∩ thσ executablσ objec⌠ ì
  200. codσá filσá X25.CO═á b∙ mean≤ oµá thσá Digita∞á ResearcΦá LINK-8░ ì
  201. linker« 
  202.  
  203.  
  204. 4.  System Data Flow
  205.  
  206.      Incominτá datßá froφ thσ communication≤ port i≤ placeΣá int∩ ì
  207. thσá currentl∙á activσá buffe≥á b∙á thσá receivσá datßá interrup⌠ ì
  208. handler«á  Thσ enΣ oµ ß receiveΣ framσ i≤ detecteΣ b∙ thσ leve∞ ▒ ì
  209. hardwarσá (Z8░ SIO)¼á whicΦ als∩ check≤ fo≥ correc⌠ framσá forma⌠ ì
  210. anΣá correc⌠ cycliπ polynomial«á InvaliΣ frame≤ arσ discardeΣá a⌠ ì
  211. thi≤á point«á  ValiΣá frame≤ arσ passeΣ ont∩á thσá receivσá framσ ì
  212. disassembl∙ processo≥ iε thσ leve∞ ▓ module.
  213.  
  214.      I⌠á shoulΣ bσ noteΣ a⌠ thi≤ poin⌠ tha⌠ thσá actua∞á receiveΣ ì
  215. datßá i≤á no⌠ passeΣ froφ onσ leve∞ t∩ another¼á bu⌠á rathe≥á thσ ì
  216. receivσ buffe≥ numbe≥ (aε interna∞ systeφ paramete≥ identifyinτ ß ì
  217. particula≥ buffer¼ iε thi≤ casσ containinτ ß ful∞ valiΣ frame⌐ i≤ ìèplaceΣá oε ß queuσ lis⌠ fo≥ processinτ b∙ thσ nex⌠á level«á  Thi≤ ì
  218. importan⌠á concep⌠ minimize≤ thσ overheaΣ requireΣ b∙ thσá systeφ ì
  219. t∩ movσ datß froφ onσ leve∞ oµ processinτ t∩ another.
  220.  
  221.      Thσ leve∞ ▓ receiveΣ framσ disassemble≥ check≤ thσ framσ fo≥ ì
  222. prope≥á address¼á examine≤ thσ contro∞ bytσ t∩ identif∙ thσ framσ ì
  223. type¼á change≤á thσ statσ oµ thσ systeφ iµ requireΣ b∙ thσá framσ ì
  224. type¼á anΣá give≤ contro∞ t∩ thσ prope≥ responsσá framσá transmi⌠ ì
  225. routine if required by the frame type and system state.
  226.  
  227.      Iµ thσ receiveΣ framσ i≤ aε informatioε frame¼ anΣ thσ statσ ì
  228. oµá thσá systeφá permit≤ acceptancσ oµ sucΦá ßá frame¼á thσá senΣ ì
  229. sequencσ numbe≥ oµ thσ framσ N(s⌐ i≤ checkeΣ agains⌠ thσ expecteΣ ì
  230. framσá sequencσá numbe≥á anΣá iµá invalid¼áá ßá rejec⌠á framσá i≤ ì
  231. transmitteΣ iε accordancσ witΦ thσ X.2╡ protocol.
  232.  
  233.      Iµá thσá receiveΣá senΣá sequencσá numbe≥á i≤á correct¼á thσ ì
  234. informatioεá fielΣ oµ thσ framσ (whicΦ contain≤ thσ datßá packet⌐ ì
  235. i≤á passeΣá t∩ thσ receiveΣ packe⌠ disassemble≥ iεá thσá leve∞á │ ì
  236. module«á  A≤á before¼á actua∞ datß i≤ no⌠ passed¼á bu⌠ rathe≥ thσ ì
  237. receiveΣ buffe≥ numbe≥ i≤ placeΣ oε ß receiveΣ packe⌠ queuσá lis⌠ ì
  238. t∩ awai⌠ processinτ b∙ thσ nex⌠ level.
  239.  
  240.      Iε receiveΣ informatioε frames¼á anΣ iε numbereΣ supervisor∙ ì
  241. frames¼á thσ receiveΣ sequencσ numbe≥ N(r⌐ containeΣ iε thσ framσ ì
  242. i≤á useΣ t∩ acknowledgσ previousl∙ transmitteΣ informatioε frame≤ ì
  243. anΣá updatσ thσ 'windowº oµ permitteΣ transmi⌠á sequencσá number≤ ì
  244. fo≥ outgoinτ informatioε frames«á Iε thi≤ manner¼ receiveΣ frame≤ ì
  245. contro∞á thσá ratσá oµá transmissioε oµ frame≤á iεá thσá oppositσ ì
  246. direction.
  247.  
  248.      Thσá leve∞ │ packe⌠ disassemble≥ check≤ thσ packe⌠ fo≥ valiΣ ì
  249. format¼á prope≥á grou≡ numbe≥ anΣ channe∞á number¼á examine≤á thσ ì
  250. packe⌠ identifie≥ octe⌠ t∩ determinσ thσ packe⌠ type¼ change≤ thσ ì
  251. statσá oµá thσá systeφ a≤ requireΣ b∙ thσ packe⌠ typσá anΣá give≤ ì
  252. contro∞ t∩ thσ prope≥ packe⌠ transmi⌠ routinσ iµ requireΣ b∙á thσ ì
  253. packet type and current system state.
  254.  
  255.      Iµ thσ receiveΣ packe⌠ i≤ ß datß packe⌠ anΣ thσ statσ oµ thσ ì
  256. machinσá permit≤á acceptancσá oµ datß packets¼á thσá packe⌠á senΣ ì
  257. sequencσá numbe≥ P(s⌐ i≤ checkeΣ agains⌠ thσ expecteΣá value«á  ┴ ì
  258. packe⌠á numbe≥ outsidσ thσ receiveΣ windo≈ o≥ ou⌠ oµ sequencσá i≤ ì
  259. considereΣ ß loca∞ procedurσ erro≥ anΣ cause≤ thσ systeφ t∩á senΣ ì
  260. a reset request packet to logically  reset the circuit.  
  261.  
  262.      Iµ thσ receiveΣ datß packe⌠ i≤ valiΣ anΣ ß receivσ datß filσ ì
  263. ha≤ beeε previousl∙ opened¼á thσ datß iε thσ packe⌠ i≤ writteε t∩ ì
  264. thσ disδ file«á  Iµ ß receivσ filσ i≤ no⌠ open¼á thσ datß i≤ sen⌠ ì
  265. t∩ thσ consolσ (CRT⌐ buffe≥ fo≥ displa∙ t∩ thσ loca∞ user«á  Onl∙ ì
  266. displayablσá ASCI╔á character≤á anΣá ß selecteΣá se⌠á oµá contro∞ ì
  267. character≤ arσ actuall∙ sen⌠ t∩ thσ console╗á ß perioΣ i≤ useΣ t∩ ì
  268. replacσá an∙á non-displayablσ character≤ t∩á avoiΣá unpredictablσ ì
  269. behavior of the console.
  270.  
  271.      Iε ß manne≥ simila≥ t∩ leve∞ 2¼á thσ packe⌠ receivσ sequencσ ìènumbe≥á P(r⌐á iεá datßá o≥á flo≈á contro∞á packet≤á i≤á useΣáá t∩ ì
  272. acknowledgσ previousl∙ transmitteΣ datß packet≤ anΣ t∩ updatσ thσ ì
  273. packe⌠ 'windowº fo≥  transmission«  Iε thi≤ manner¼ receiveΣ datß ì
  274. o≥á flo≈ contro∞ packet≤ contro∞ thσ ratσ oµ transmissioε oµ datß ì
  275. packets in the reverse direction.
  276.  
  277.      Receivσá buffer≤ whicΦ havσ beeε discardeΣ alonτ thσ wa∙á o≥ ì
  278. havσá delivereΣá thei≥á datß t∩ thσ fina∞á destinatioεá arσá madσ ì
  279. availablσá fo≥á reusσ b∙ placinτ thei≥ framσ number≤ iεá ßá queuσ ì
  280. lis⌠á oµ freσ buffe≥ numbers«á  Thesσ availablσ frame≤á arσá madσ ì
  281. activσá onσá a⌠á ßá timσ a≤ requireΣ b∙á thσá hardwarσá interrup⌠ ì
  282. servicσá routine≤á iε thσ leve∞ ▒ module«á  Thσá numbe≥á oµá freσ ì
  283. receivσá buffer≤ a⌠ an∙ giveε timσ determine≤ thσ read∙ statσá oµ ì
  284. thσá system¼á whicΦ control≤ thσ updatinτ oµ sequencσ number≤ anΣ ì
  285. thσá type≤á oµ flo≈ contro∞ frame≤ anΣ packet≤á returneΣá t∩á thσ ì
  286. communication≤ port«  Thi≤ process¼ iε turn¼ control≤ thσ ratσ a⌠ ì
  287. whicΦá ne≈á informatioε frame≤ anΣ datß packet≤ arσ sen⌠á t∩á thσ ì
  288. system¼á thu≤ insurinτ tha⌠ datß i≤ no⌠ transmitteΣ t∩ thσ systeφ ì
  289. faste≥ thaε thσ systeφ caε proces≤ it.
  290.  
  291.      Thσá transmi⌠á proces≤á i≤á considerabl∙á simple≥á thaεá thσ ì
  292. receivσ process«á  Datß typeΣ iε thσ systeφ consolσ i≤ writteε t∩ ì
  293. ßá consolσ datß buffer«á Assuminτ thσ systeφ ha≤ beeε placeΣ iε ß ì
  294. statσá wherσá thσ remotσ systeφ caε accep⌠ datßá anΣá thσá packe⌠ ì
  295. transmi⌠á windo≈ allow≤ it¼á thσ transmi⌠ proces≤ caε begin«á Thσ ì
  296. leve∞á │ packe⌠ assembl∙ processo≥ read≤ datß froφá thσá transmi⌠ ì
  297. disδá file¼á iµ sucΦ ß filσ ha≤ beeε opened╗á o≥ froφ thσ consolσ ì
  298. buffer¼á anΣá place≤ thσ datß iε thσ nex⌠ sequentiall∙á availablσ ì
  299. freσ transmi⌠ buffer.
  300.  
  301.      Wheε thσ maximuφ datß packe⌠ sizσ ha≤ beeε reached¼á o≥ wheε ì
  302. thσ enΣ oµ filσ ha≤ beeε reached¼ o≥ wheε ß carriagσ returε typeΣ ì
  303. a⌠ thσ systeφ consolσ i≤ encountered¼ thσ leve∞ │ packe⌠ assembl∙ ì
  304. processo≥á stop≤á readinτ datß anΣ  assemble≤ ß datß packe⌠á witΦ ì
  305. thσá correc⌠ sequencσ number≤ (iε thi≤ system¼á  thσá transmitteΣ ì
  306. packe⌠á senΣ  sequencσ numbe≥ P(s⌐ i≤ b∙ definitioε equa∞ t∩á thσ ì
  307. transmi⌠á buffe≥ number)«á  I⌠ theε tag≤ thσ buffe≥ witΦ ßá read∙ ì
  308. flag.
  309.  
  310.      Thσá leve∞á ▓ framσ transmi⌠ processo≥ onl∙á start≤á workinτ ì
  311. wheεá thσ leve∞ ▒ processo≥ indicate≤ tha⌠ thσ hardwarσ interfacσ ì
  312. (Z80-SIO⌐á i≤á no⌠ bus∙ transmitting«á  Wheεá thi≤á conditioεá i≤ ì
  313. satisfied¼á anΣ wheε it≤ transmi⌠ windo≈ allow≤ it¼ i⌠ check≤ fo≥ ì
  314. ßá read∙á flaτ iε thσ nex⌠ sequentia∞ transmi⌠ buffer«á  Wheεá i⌠ ì
  315. find≤á sucΦ ß flag¼á i⌠ assemble≤ aε informatioε framσá witΦá thσ ì
  316. correc⌠á sequencσá number≤ anΣ signal≤ thσ leve∞ ▒á processo≥á t∩ ì
  317. transmit the frame.
  318.  
  319.      Afte≥á thσá framσ i≤ transmitted¼á thσ buffe≥á pointer≤á arσ ì
  320. restoreΣá anΣ thσ buffe≥ kep⌠ intac⌠ fo≥ possiblσ retransmission« ì
  321. A≤ transmitteΣ frame≤ arσ acknowledgeΣ b∙ thσ remotσ system¼á thσ ì
  322. transmi⌠á 'windowº i≤ updateΣ anΣ thσ transmi⌠ framσ buffer≤á arσ ì
  323. cleareΣá anΣá madσá availablσ fo≥ usσá b∙á thσá nex⌠á transmitteΣ ì
  324. packet« B∙ thi≤ mechanism¼ thσ remotσ systeφ control≤ thσ maximuφ ì
  325. ratσáá a⌠á whicΦá thσá systeφá wil∞á transmi⌠á datßá packet≤á anΣ ìèinformatioε frame≤ t∩ thσ communication≤ port s∩ a≤ no⌠ t∩ exceeΣ ì
  326. the remote system's capacity for processing data packets.
  327.  
  328.  
  329.  
  330. 5.  Internal Data Storage
  331.  
  332.      WitΦ somσ mino≥ exceptions¼á al∞ datß interna∞ t∩ thσ systeφ ì
  333. i≤á storeΣá iε circula≥ first-in-first-ou⌠ buffer≤ controlleΣá b∙ ì
  334. identica∞ pointe≥ structures«á  Usinτ ß commoε contro∞á structurσ ì
  335. ha≤á thσá decideΣá advantagσá tha⌠ i⌠á permit≤á usinτá  thσá samσ ì
  336. subroutine≤ t∩ acces≤ al∞ buffers¼ regardles≤ oµ sizσ o≥ purpose«  ì
  337. Thσá onl∙ buffer≤ no⌠ complyinτ witΦ thi≤ forma⌠ arσ thσá buffer≤ ì
  338. whosσá forma⌠á i≤ defineΣ b∙ thσ CP/═ operatinτ system¼á sucΦá a≤ ì
  339. disδ filσ reaΣ anΣ writσ buffers«  
  340.  
  341.      A≤á implemented¼á thσá systeφ contain≤ sixteeε receivσá datß ì
  342. buffers¼á bu⌠ thi≤ numbe≥ ma∙ bσ easil∙ increaseΣ u≡ t∩ ß maximuφ ì
  343. oµá 12╖á iµ sufficien⌠ memor∙ i≤ availablσ iεá thσá system«á  Thσ ì
  344. implementeΣá buffe≥á sizσ correspond≤ t∩ ßá maximuφá packe⌠á datß ì
  345. fielΣá sizσ oµ 12╕ octets¼á whicΦ i≤ thσ standarΣ maximuφá packe⌠ ì
  346. use≥ datß lengtΦ recommendeΣ iε thσ X.2╡ standard« 
  347.  
  348.      Thσ systeφ als∩ contain≤ eigh⌠ transmi⌠ datß buffers¼ oµ thσ ì
  349. samσá sizσ a≤ thσ receivσ buffers«á  EacΦ transmi⌠ datß buffe≥ i≤ ì
  350. assigneΣ t∩ onσ oµ thσ eigh⌠ possiblσ framσ senΣ sequencσ number≤ ì
  351. (░ t∩ 7).
  352.  
  353.      Iεá additioε t∩ thσ receivσ anΣ transmi⌠ datßá buffers¼á thσ ì
  354. systeφ contain≤ threσ queuσ buffer≤ useΣ t∩ holΣ list≤ oµ receivσ ì
  355. buffe≥ identification number≤ a≤ follows:
  356.      
  357.      list of free receive buffers
  358.      list of receive buffers containing full received frames
  359.      list of receive buffers containing full received packets
  360.       
  361.      Thesσá queuσá buffer≤á arσá useΣ t∩ contro∞á thσá datßá flo≈ ì
  362. betweeεá processinτá level≤á b∙á passinτá buffe≥áá identificatioε ì
  363. numbers between levels, rather than transferring data.
  364.  
  365.      Iεá additioε t∩ thσ preceding¼á fivσ additiona∞ buffer≤á arσ ì
  366. provideΣá t∩ handlσ thσ interfacσ betweeε thσ loca∞ use≥ anΣá thσ ì
  367. packe⌠ processinτ system«  Thesσ buffer≤ are:
  368.  
  369.      a⌐ thσ  consolσ inpu⌠ buffe≥ t∩ handlσ typeΣ inpu⌠ froφá thσ ì
  370.         loca∞ keyboard.
  371.  
  372.      b⌐ thσ consolσ outpu⌠ buffe≥ t∩ handlσ datß intendeΣ fo≥ thσ ì
  373.         loca∞ CR╘ outpu⌠ device.
  374.  
  375.      c⌐ thσ consolσ transmi⌠ buffe≥ t∩ interfacσ typeΣ inpu⌠ datß ì
  376.         intendeΣ fo≥ transmissioε iε packets.
  377.  
  378.      d⌐ thσ consolσ receivσ buffe≥ t∩ handlσ incominτ packe⌠ datß ì
  379.         intendeΣ fo≥ displa∙ a⌠ thσ loca∞ console.è
  380. anΣá e⌐á thσá printe≥ outpu⌠ buffe≥ intendeΣ t∩á handlσá incominτ                  ì
  381.         packe⌠á datßá anΣá typeΣá datß whicΦ i≤á intendeΣá t∩á bσ                           ì
  382.         printeΣá locall∙á (the printer featurσ i≤á no⌠á currentl∙                   ì
  383.         implementeΣ iε thσ hardwarσ selecteΣ fo≥ thσ system).
  384.  
  385.      Iε additioε t∩ thσ systeφ datß buffer≤ describeΣ above¼ fou≥ ì
  386. additiona∞á buffe≥ area≤ havσ beeε provideΣ fo≥á read/writσá disδ ì
  387. access«á Thσá area≤á arσá  useΣ b∙ thσ CP/═ operatinτá systeφá t∩ ì
  388. buffe≥ datß froφ anΣ t∩ thσ receivσ anΣ transmi⌠ disδ datß files¼ ì
  389. thσá systeφ defaul⌠ paramete≥ disδ filσ anΣ thσ sessioε loτá disδ ì
  390. file«á  Thesσá buffer≤á arσá accesseΣ b∙á thσá systeφá vißá macr∩ ì
  391. routine≤ provideΣ iε thσ Digita∞ ResearcΦ SEQI╧ macr∩ library«  
  392.  
  393.  
  394. 6.  Hardware Configuration
  395.  
  396.      Thσá systeφá wa≤ implementeΣ t∩ ruε oεá ßá Digita∞á ResearcΦ ì
  397. Computers'á "Biτá Boardó singlσ boarΣ computer«á  Thi≤á uni⌠á wa≤ ì
  398. selecteΣ becausσ oµ it≤ lo≈ cost¼á becausσ i⌠ haΣ thσ desireΣ SI╧ ì
  399. seria∞á interfacσá hardwarσ anΣ CT├ timer≤ buil⌠ in¼á becausσá i⌠ ì
  400. employeΣ thσ desirablσ Z8░ modσ ▓ vectoreΣ interrupt≤ fo≥ al∞ I/╧ ì
  401. hardware¼á becausσ oµ it≤ popularit∙ witΦ hobbyist≤ and¼ las⌠ bu⌠ ì
  402. no⌠ least¼á becausσ oµ thσ availabilit∙ oµ ful∞ documentatioεá iε ì
  403. thσá forφ oµ hardwarσ schematic≤ anΣ sourcσ codσ fo≥ thσ buil⌠ iε ì
  404. monito≥ anΣ CP/═ BIO╙ routines.
  405.  
  406.  
  407. 7. BIBLIOGRAPHY
  408.  
  409.  
  410. 1«áá "Datßá Communication≤á Networks¼á Service≤á anΣá Facilities¼ ì
  411. Termina∞á Equipmen⌠ anΣ Interfaces¼á Recommendation≤ X.1-X.29"éá - ì
  412. Thσá Yello≈ Book¼á Volumσ VII╔ - Fasciclσá VIII.2¼á Internationa∞ ì
  413. Telecommunicatioε Unioε CCITT¼ Genevß 1981«  
  414.  
  415. The international X.25 standard, revised in 1981
  416.  
  417. 2«  Thσ X.2╡ Protoco∞ anΣ Seveε Othe≥ Ke∙ CCIT╘ Recommendationsé - ì
  418. Lifetime Learning Publications, Belmont, CA 1983.
  419.  
  420. Aε inexpensivσ reprin⌠ oµ thσ CCIT╘ X.1¼á X.2¼ X.3¼ X.21¼ X21bis¼ ì
  421. X.25, X.28 and X.29 standards.
  422.  ì
  423. 3«á Microprocesso≥ Application≤ Referencσ Book¼á Volumσ 1é - Ziloτ ì
  424. Corporation, July 1981.
  425.  
  426. Relevan⌠á compilatioεá oµá applicatioεá note≤ oεá thσá Ziloτá Z8░ ì
  427. microprocessor family (see references 3a and 3b).
  428.  
  429.  
  430. 3a«áá  Usinτáá thσá Z8░á SI╧á witΦá SDL├á (applicatioεá brief)éáá - ì
  431. (part of reference 3)
  432.  
  433. Applicatioε notσ describinτ thσ usσ oµ thσ Ziloτ Z80-SI╧ witΦ thσ ìèHDLC/SDL├á HigΦá Datßá Linδ Contro∞á anΣá Synchronou≤á Datßá Linδ ì
  434. Contro∞ protocols«  Thσ samplσ routine≤ describeΣ hereiε werσ thσ ì
  435. basis of the routines utilized in the system LEVEL1 module.
  436.  
  437.  
  438. 3b«áá  Z8░á Famil∙á Interrup⌠á Structurσá (tutorial)éá - (par⌠á oµ ì
  439. reference 3)
  440.  
  441. Concisσ tutoria∞ describinτ thσ interrup⌠ structurσ oµ thσá Ziloτ ì
  442. Z80 microprocessor family.
  443.  
  444.  
  445. 4«á Zilog Datßá Booδ  - Ziloτ Corporation, 1982/1983.
  446.  
  447. ┴á referencσá compilatioε oµ datß sheet≤ oε thσ Ziloτá famil∙á oµ ì
  448. microprocessor products, including the Z80, SIO and CTC.
  449.  
  450. 5.  Big Board Documentation - Digital Research Computers, 
  451. P.O«á Bo° 401565¼á GarlanΣ Texa≤ (no⌠ relateΣ t∩ Digita∞ ResearcΦ ì
  452. Corp of Pacific Grove CA).
  453.  
  454. Documentatioεá oεá thσá hardwarσ useΣ t∩á implemen⌠á thσá projec⌠ ì
  455. system.
  456.  
  457.  
  458. 6. Cole, Robert - "Computer Communications", Springer-Verlag,
  459. 1982« 
  460.  
  461. ┴á genera∞ overvie≈ oµ curren⌠ compute≥ communication≤á practice¼ ì
  462. witΦá particula≥á emphasi≤á oεá networking«á  Contain≤á excellen⌠ ì
  463. introductor∙á description≤ oµ thσ operatioε oµ thσ HDL├ anΣá X.2╡ ì
  464. protocols« Onσ chapte≥ anΣ portion≤ oµ severa∞ other≤ arσ devoteΣ ì
  465. t∩á thσ X.2╡ protocol¼á includinτ discussioε oµ area≤ no⌠ defineΣ ì
  466. b∙ thσ standard¼ probleφ area≤  anΣ somσ curren⌠ use≥ practices.
  467.  
  468.  
  469. 7«á "CP/═á MA├ Macr∩ Assembler║á Languagσ Manua∞ anΣ Application≤ ì
  470. Guide"é - Digital Research Corp.
  471.  
  472. Referencσ guidσ fo≥ thσ MA├ anΣ RMA├ macr∩ assembler¼á thσ latte≥ ì
  473. useΣá t∩á develo≡ thσ projec⌠ system«á  Als∩á include≤á referencσ ì
  474. information on the SEQIO sequential file access macro library.
  475.  
  476. 8«áá Inte∞á 808░á Assembl∙á Languagσá Programminτá Manual¼á Inte∞ ì
  477. Corporation 1976.
  478.  
  479. Comprehensivσá referencσá t∩ thσ assembl∙á languagσá instruction≤ ì
  480. used to implement the project.
  481.  
  482.  
  483. 9«á Z8░ Assembl∙ Languagσ Programminτ Manual¼á Ziloτ Corporation¼ ì
  484. 1977.
  485.  
  486. Comprehensivσ reference t∩ thσ specia∞ bi⌠ manipulatioε anΣ blocδ ì
  487. move instructions used to implement the project.è