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