User Tools

Site Tools


cdc:nos2.source:opl871:tcomnd

TCOMND

Table Of Contents

  • [00002] TCOMND - TERMINAL COMMAND PROCESSOR.
  • [00015] TERMINAL COMMAND PROCESSOR.
  • [00054] COMMAND PROCESSORS.
  • [00058] APP - APPLICATION SWITCH PROCESSOR.
  • [00194] SUBROUTINES.
  • [00196] ERR - PROCESS PARAMETER ERROR.
  • [00203] PRS - PRESET PROGRAM.
  • [00220] PZO - PROCESS *Z* OPTION.
  • [00268] TLX - ENTER TELEX SYSTEM REQUEST.

Source Code

TCOMND.txt
  1. IDENT TCOMND,FWA
  2. TITLE TCOMND - TERMINAL COMMAND PROCESSOR.
  3. ABS
  4. ENTRY APPSW
  5. ENTRY ASCII
  6. ENTRY CSET
  7. ENTRY EFFECT
  8. ENTRY PARITY
  9. ENTRY RFL=
  10. *COMMENT TCOMND - TERMINAL COMMAND PROCESSOR.
  11. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  12.  
  13. SYSCOM B1
  14. SPACE 4,2
  15. *** TCOMND - TERMINAL COMMAND PROCESSOR.
  16. * P. D. FARRELL. 74/08/28.
  17. SPACE 4,3
  18. *** TCOMND PROCESSES TIME SHARING TERMINAL COMMANDS.
  19. * THAT HAVE BEEN ENTERED BY MEANS OF CONTROL CARD CALLS
  20. * RATHER THAN DIRECTLY THROUGH A TERMINAL.
  21. SPACE 4,10
  22. *** APPLICATION SWITCH COMMAND FORMATS.
  23. *
  24. * APPSW
  25. *
  26. * APPSW(ANAME[,Z.])
  27. *
  28. * APPSW(AP=ANAME[,Z.])
  29. *
  30. * ANAME = NETWORK APPLICATION NAME. IF NO APPLICATION
  31. * NAME IS SPECIFIED, THE USER WILL BE RETURNED
  32. * TO THEIR PRIMARY APPLICATION.
  33. *
  34. * Z = Z PARAMETER OPTION. IF SPECIFIED, THE REMAINDER
  35. * OF THE COMMAND LINE WILL BE PASSED TO THE NEW
  36. * APPLICATION.
  37. *
  38. * THE APPLICATION SWITCH COMMAND IS PROCESSED AS FOLLOWS-
  39. *
  40. * TLX WILL BE CALLED TO NOTIFY IAF OF THE APPLICATION SWITCH.
  41. * TLX WILL BE CALLED TO RESTART THE JOB WHEN THE CONNECTION
  42. * RETURNS.
  43. SPACE 4,4
  44. *** DAYFILE MESSAGES.
  45. *
  46. * *ERROR IN COMMAND PARAMETERS.* = A COMMAND PARAMETER
  47. * WAS ILLEGAL.
  48. SPACE 4,3
  49. *** OPERATOR MESSAGES.
  50. *
  51. * NONE.
  52. SPACE 4
  53. *CALL COMCMAC
  54. TITLE COMMAND PROCESSORS.
  55. ORG 120B
  56. FWA BSS 0 DEFINE LOAD ADDRESS
  57. APP SPACE 4,10
  58. ** APP - APPLICATION SWITCH PROCESSOR.
  59. *
  60. * THE APPLICATION SWITCH COMMAND CAUSES A USER TO BE SWITCHED
  61. * TO THE SECONDARY APPLICATION SPECIFIED IN THE COMMAND. IF
  62. * THE CURRENT APPLICATION IS A SECONDARY APPLICATION, THE
  63. * *ABORT* OR NULL APPLICATION NAMES MAY BE SPECIFED TO RETURN
  64. * THE USER TO THE PRIMARY APPLICATION.
  65. *
  66. * CALLS PZO, UPC.
  67.  
  68.  
  69. APPSW BSS 0 ENTRY
  70. SB1 1
  71. SA5 CCDR SET COMMAND ADDRESS
  72. SB7 ARGR SET PARAMETER ADDRESS
  73. RJ UPC UNPACK COMMAND
  74. NZ X6,ERR IF PARAMETER ERROR
  75. SA1 ARGR+B1 READ FIRST PARAMETER
  76. MX0 42
  77. BX6 X0*X1
  78. ZR X6,APP2 IF NO PARAMETER SPECIFIED
  79. SA2 =2LAP
  80. BX2 X6-X2
  81. BX6 -X0*X1 CHECK SEPARATOR
  82. NZ X2,APP1 IF NOT *AP* PARAMETER
  83. SA2 =1R=
  84. BX6 X6-X2
  85. NZ X6,ERR IF *AP* NOT EQUATED
  86. SA1 A1+B1 GET APPLICATION NAME
  87. APP1 BX6 X0*X1
  88. SA6 APPA SAVE APPLICATION NAME
  89. SA1 A1+B1 READ NEXT PARAMETER
  90. ZR X1,APP2 IF NO MORE PARAMETERS
  91. SA2 =1LZ
  92. BX6 X0*X1
  93. BX2 X6-X2
  94. NZ X2,ERR IF NOT *Z* PARAMETER
  95. SB7 APPA+B1 SET WRITE BUFFER ADDRESS
  96. SB4 APPB SET END OF WRITE BUFFER
  97. RJ PZO PROCESS *Z* OPTION
  98. APP2 SX7 APPA SET APPLICATION NAME ADDRESS
  99. SX0 22B SET *TLX* REQUEST NUMBER
  100. TLX X0,X7 ENTER *TLX* SYSTEM REQUEST
  101. SX0 23B SET *TLX* REQUEST NUMBER
  102. EQ TLX CALL *TLX*
  103.  
  104.  
  105. APPA BSSZ 6 APPLICATION BUFFER
  106. APPB CON 0 END OF BUFFER
  107. ASCII SPACE 4,10
  108. *** ASCII.
  109. *
  110. * SET EXTENDED (ASCII) MODE.
  111.  
  112.  
  113. ASCII SB2 0 SET PARAMETER LIMIT
  114. RJ PRS
  115. SX0 3 SET FUNCTION CODE = 3
  116. SX7 11B SET ARGUMENT
  117. EQ TLX
  118. CSET SPACE 4,10
  119. *** CSET(M)
  120. *
  121. * SET CHARACTER SET MODE M.
  122. *
  123. * M = *NORMAL*.
  124. * = *ASCII*.
  125. * = *EXTEND*.
  126.  
  127.  
  128. CSET SB2 1 SET PARAMETER LIMIT
  129. RJ PRS CHECK PARAMETERS
  130. SX0 3 SET FUNCTION CODE = 3
  131. SA1 =6LNORMAL
  132. BX7 X5-X1
  133. ZR X7,CST1 IF *NORMAL*
  134. SX7 B1
  135. SA1 =6LEXTEND
  136. SA2 =5LASCII
  137. BX1 X5-X1
  138. ZR X1,CST1 IF *EXTEND*
  139. BX2 X5-X2
  140. NZ X2,ERR IF NOT *ASCII*
  141. CST1 SX7 X7+10B SET ENTRY MODE RESET BIT
  142. EQ TLX
  143. EFFECT SPACE 4,10
  144. *** EFFECT(A)
  145. *
  146. * SET USER OR SYSTEM SUPPLIED FORMAT EFFECTOR MODE.
  147. *
  148. * A = *SYSTEM*, SET SYSTEM SUPPLIED FORMAT EFFECTOR MODE.
  149. * = *USER*, SET USER SUPPLIED FORMAT EFFECTOR MODE.
  150. * = (OMITTED) = *SYSTEM*.
  151.  
  152.  
  153. EFFECT SB2 1 SET PARAMETER LIMIT
  154. RJ PRS
  155. SX0 21B SET FUNCTION CODE = 21B
  156. ZR X5,TLX IF NO PARAMETER
  157. SA1 =6LSYSTEM
  158. SA2 =4LUSER
  159. SA3 =2LON
  160. SA4 =3LOFF
  161. BX1 X5-X1
  162. BX2 X5-X2
  163. BX3 X5-X3
  164. BX4 X5-X4
  165. ZR X1,TLX IF *SYSTEM*
  166. ZR X3,TLX IF *ON*
  167. SX0 20B SET FUNCTION CODE = 20B
  168. ZR X2,TLX IF *USER*
  169. ZR X4,TLX IF *OFF*
  170. EQ ERR IF NONE OF THE ABOVE
  171. PARITY SPACE 4,10
  172. *** PARITY(P)
  173. *
  174. * SET PARITY P.
  175. *
  176. * P = *ODD*.
  177. * = *EVEN*.
  178. * = (OMITTED) = *ODD*.
  179.  
  180.  
  181. PARITY SB2 1 SET PARAMETER LIMIT
  182. RJ PRS
  183. SX0 4 SET FUNCTION CODE = 4
  184. SX7 1 SET ODD PARITY
  185. ZR X5,TLX IF NO PARAMETER
  186. SA1 =3LODD
  187. SA2 =4LEVEN
  188. BX1 X5-X1
  189. IX2 X5-X2
  190. ZR X1,TLX IF *ODD*
  191. NZ X2,ERR IF NOT *EVEN*
  192. SX7 B0 SET EVEN PARITY
  193. EQ TLX
  194. TITLE SUBROUTINES.
  195. ERR SPACE 4,10
  196. ** ERR - PROCESS PARAMETER ERROR.
  197.  
  198.  
  199. ERR BSS 0
  200. MESSAGE (=C* ERROR IN COMMAND PARAMETERS.*)
  201. ABORT
  202. PRS SPACE 4,10
  203. ** PRS - PRESET PROGRAM.
  204. *
  205. * ENTRY (B2) = MAXIMUM NUMBER OF ALLOWABLE PARAMETERS.
  206. *
  207. * EXIT (X5) = FIRST PARAMETER.
  208. * (A5) = ADDRESS OF FIRST PARAMETER.
  209. * (B3) = PARAMETER COUNT.
  210.  
  211.  
  212. PRS SUBR ENTRY/EXIT
  213. SB1 1 SET CONSTANT 1
  214. SA5 ACTR READ PARAMETER COUNT
  215. SB3 X5
  216. GT B3,B2,ERR IF INVALID PARAMETER COUNT
  217. SA5 B1+B1 READ FIRST PARAMETER
  218. EQ PRSX RETURN
  219. PZO SPACE 4,10
  220. ** PZO - PROCESS *Z* OPTION.
  221. *
  222. * ENTRY (A5) = ADDRESS OF *Z* PARAMETER.
  223. * (B7) = BEGINNING ADDRESS OF WRITE BUFFER.
  224. * (B4) = END OF WRITE BUFFER.
  225. *
  226. * EXIT BUFFER CONTAINS THE CHARACTERS FOLLOWING THE *Z*
  227. * PARAMETER.
  228.  
  229.  
  230. PZO SUBR ENTRY/EXIT
  231. SB5 10D INITIALIZE CHARACTERS LEFT IN READ WORD
  232. SB3 B1 INITIALIZE END-OF-LINE FLAG
  233. SX6 B0 CLEAR WRITE WORD
  234. MX0 6
  235. SB6 B5+ INITIALIZE ROOM LEFT IN WRITE WORD
  236. MX1 -12
  237. SA3 =1L.
  238. SA4 =1L)
  239. SA5 A5+ READ FIRST WORD
  240. PZO1 BX2 X0*X5 FIND COMMAND TERMINATOR
  241. LX5 6
  242. SB5 B5-B1
  243. BX7 X2-X3
  244. ZR X7,PZO2 IF COMMAND TERMINATOR
  245. BX7 X2-X4
  246. NZ X7,PZO1 IF NOT COMMAND TERMINATOR
  247. PZO2 BX2 X0*X5 GET NEXT CHARACTER
  248. SB3 B3-B1
  249. ZR X2,PZO3 IF ZERO CHARACTER
  250. SB3 B1 RESET END-OF-LINE FLAG
  251. PZO3 BX6 X6+X2 ADD CHARACTER TO WRITE WORD
  252. SB6 B6-B1
  253. LX6 6
  254. NZ B6,PZO4 IF WRITE WORD NOT FULL
  255. SA6 B7+ WRITE FULL WORD
  256. NG B3,PZOX IF END-OF-LINE FOUND
  257. SB7 B7+1 INCREMENT POINTER
  258. GE B7,B4,PZOX IF END OF WRITE BUFFER
  259. SX6 B0+ RESET REGISTERS
  260. SB6 10D
  261. PZO4 SB5 B5-B1
  262. LX5 6
  263. NZ B5,PZO2 IF READ CHARACTERS LEFT
  264. SB5 10D RESET REGISTERS
  265. SA5 A5+B1 GET NEXT WORD
  266. EQ PZO2 CONTINUE
  267. TLX SPACE 4,10
  268. ** TLX - ENTER TELEX SYSTEM REQUEST.
  269. *
  270. * ENTRY (X0) = FUNCTION CODE.
  271. * (X7) = ARGUMENT.
  272.  
  273.  
  274. TLX BSS 0
  275. TLX X0,X7 ENTER TELEX SYSTEM REQUEST
  276. ENDRUN
  277. SPACE 4
  278. ** COMMON DECKS.
  279.  
  280.  
  281. *CALL COMCSYS
  282. *CALL COMCUPC
  283.  
  284. USE //
  285. RFL= BSS 0
  286.  
  287. END
cdc/nos2.source/opl871/tcomnd.txt ยท Last modified: 2023/08/05 17:24 by Site Administrator