User Tools

Site Tools


cdc:nos2.source:nam5871:hpnon

Table of Contents

HPNON

Table Of Contents

  • [00020] PRGM HPNON
  • [00107] PROC BLINK
  • [00108] PROC HWRAVAL
  • [00109] PROC MRELS
  • [00110] PROC MGETS
  • [00111] PROC OSCCALL
  • [00112] PROC OSCHAPP
  • [00113] PROC OVLCALL
  • [00114] PROC XTRACE

Source Code

HPNON.txt
  1. *DECK HPNON
  2. USETEXT NIPDEF
  3. USETEXT ACB
  4. USETEXT ACNT
  5. USETEXT AHEADER
  6. USETEXT APPSTAT
  7. USETEXT AT
  8. USETEXT DRHDR
  9. USETEXT FLIST
  10. USETEXT LLCB
  11. USETEXT MSGIDX
  12. USETEXT NWLHEAD
  13. USETEXT OVERLAY
  14. USETEXT PARAMP
  15. USETEXT PARAMS
  16. USETEXT PT
  17. USETEXT SCPCOM
  18. USETEXT SUPMSG
  19. USETEXT TNT
  20. PRGM HPNON; # PROCESS A *NET ON* WORK LIST ENTRY #
  21. *CALL ON
  22. STARTIMS;
  23. #
  24. *1DC HPNON
  25. *
  26. * 1. PROC NAME AUTHOR DATE
  27. * HPNON E. GEE 78/01/25
  28. *
  29. * 2. FUNCTIONAL DESCRIPTION
  30. * PROCESS AIP NETON WORKLIST ENTRY
  31. *
  32. * 3. METHOD USED.
  33. * SET UP SF.CPID SCP FUNCTION TO CHECK
  34. * APPLICATION PRIVILEDGES AND ACCESS LEVEL.
  35. * ISSUE SCP FUNCTION
  36. * PROCESS SCP FUNCTION RETURN CODE
  37. * VALIDATE MINACN/MAXACN VALUES.
  38. * CHECK IF NVF NETTING ON
  39. * IF NVF NETTING ON, CHECK IF LEGITIMATE NVF BY MAKING SURE
  40. * NVF HAS NOT ALREADY NETTED ON OR NIP IS WAITING FOR
  41. * NET/OFF/R OR FAIL/APPL/R
  42. * IF LIBRES NOT DEFINED, NVF MUST ALSO BE SYSTEM
  43. * RESIDENT
  44. * OTHERWISE, ABORT MALICIOUS APP TRYING TO MASQUERADE AS NVF
  45. * IF IN SHUTDOWN MODE OR NVF HAS NOT NETTED ON, REJECT NETON
  46. * IF NOT IN SHUTDOWN MODE, THEN CREATE ACB
  47. * IF ACB CREATED, FINISH PROCESSING NETON
  48. * IF APP IS NVF OR NETON IS BEING REJECTED, THEN CREATE SCP
  49. * FUNCTION LIST TO WRITE NETON AWL TO APP FL AND CLEAR
  50. * SCP SHORT TERM CONNECTION
  51. * ISSUE SCP FUNCTION
  52. * PROCESS SCP FUNCTION RETURN CODE
  53. *
  54. * 4. ENTRY PARAMETERS.
  55. * NWLADDR ADDRESS OF NWL FOR APP NETTING ON
  56. *
  57. * 5. EXIT PARAMETERS.
  58. * ABTAPPF ABORT FLG SET IF NIP GET SCP RC = RCUCPAOOR
  59. * OR (NON-SUP) APP TRIED TO NETON AS NVF
  60. *
  61. * 6. COMDECKS CALLED AND SYMPL TEXTS USED.
  62. * ACB APPSTAT AT DRHAT
  63. * FLIST NSGIDX NIPDEF NWLHEAD ON
  64. * OPSIZE OVERLAY PARAMP PARAMS PT
  65. * SCPCOM SUPMSG
  66. *
  67. * 7. ROUTINES AND OVERLAYS CALLED.
  68. * BLDACB OVL BUILD ACB AND ACNT FOR APPLICATION
  69. * HCNONFL OVL CREATE NETON FUNCTION LIST
  70. * HPNONAP OVL COMPLETE PROCESSING NETON OF (NON-SUP) APP
  71. * HPNONSR OVL PROCESS SF.STAT FUNCTION RETURN CODE
  72. * MRELS RELEASE BUFFER SACBE
  73. * OSCCALL ISSUE SCP FUNCTION
  74. * OSCHAPP SCHEDULE APPLICATION
  75. * OSCPSI OVL SWAPIN (NO-ACB) APPLICATION
  76. * OVLCALL LOAD AND EXECUTE OVERLAY
  77. * RELACB OVL RELEASE ACB AND ACNT FROM APPLICATION
  78. * XERRMSG OVL ISSUE ERROR DAYFILE MESSAGE
  79. * XTRACE RECORD PROCEDURE CALLS
  80. *
  81. * 8. DAYFILE MESSAGES.
  82. * SECURITY VIOLATION. THIS MESSAGE IS PUT OUT IF THE
  83. * APPLICATION ATTEMPTING TO NETON SAYS IT IS A NVF THAT
  84. * NIP HAS ALREADY NETTED-ON.
  85. *
  86. * ADDRESS OUT OF RANGE. IF THE RETURN CODE FROM THE OPERATING
  87. * SYSTEM CALL SF.LIST REQUEST IS RCUCPAOOR.
  88. *
  89. * BAD MINACN/MAXACN VALUE JOBID = . INVALID MINACN
  90. * OR MAXACN ON NETON.
  91. *
  92. * THIS PROGRAM IS A PRIMARY OVERLAY LOADED BY SUBROUTINE OVLCALL.
  93. * WHEN EXECUTION HAS COMPLETED, A JUMP IS MADE TO LOCATION RJMAIN
  94. * TO RETURN TO THE CALLING PROGRAM.
  95. *
  96. * W A R N I N G - THIS PROGRAM CANNOT EXCEED THE PRIMARY
  97. *CALL OPSIZE
  98. *
  99. * THIS OVERLAY IS CALLED BY HHIR.
  100. *
  101.  #
  102. STOPIMS;
  103. #
  104.   EXTERNAL VARIABLES
  105. #
  106. XREF BEGIN
  107. PROC BLINK ; # LINK MESSAGE TO NVF ACB #
  108. PROC HWRAVAL; # WRITE DATA AVAILABLE WORD #
  109. PROC MRELS; # RELEASE BUFFER SACBE #
  110. PROC MGETS ; # GET BUFFER FOR CR/SLL #
  111. PROC OSCCALL; # SET LONG TERM CONNECTION #
  112. PROC OSCHAPP; # SCHEDULE AN APPLICATION #
  113. PROC OVLCALL; # LOAD OVERLAY #
  114. PROC XTRACE; # TRACE CALLS #
  115. LABEL RJMAIN; # RETURN ADDRESS IN OVLCALL #
  116. END
  117. #
  118.   INTERNAL VARIABLES
  119. #
  120. ITEM CRADR I ; # ADDRESS OF CR/SLL #
  121. ITEM DELACB B; # TRUE = DELETE ACB AND FORGET ABOUT NETON#
  122. ITEM SCPADDR; # ADDR OF SCP FUNC LIST TO REJECT NETON #
  123. ITEM PRIVU B; # PRIVILEGED USER BIT #
  124. ITEM PRIVP B; # PRIVILEGED PROGRAM BIT #
  125. ITEM AAL; # APPLICATION ACCESS LEVEL #
  126. ITEM INDEX; # INDEX FOR SCANNING SUP NAME TABLE #
  127. ITEM ANAME C(WC); # APPLICATION NAME #
  128. ITEM NVFNETON B; # NVF NETON FLAG #
  129. ITEM MAXACN; # MAXIMUM ACN VALUE #
  130. ITEM MINACN; # MINIMUM ACN VALUE #
  131. ITEM NUMRCN ; # NUMBER OF RESERVED OUTGOING CONN. #
  132. ITEM RELADDR; # ADDR OF NEXT EMPTY WORD IN NWL #
  133. ITEM RELSIZE; # SIZE OF UNUSED AREA IN NWL #
  134. ITEM AN; # APPLICATION PROCESS NUMBER #
  135. ITEM ONADDR; # TEMP VAR TO SAVE DATA AVAIL ADDR #
  136. ITEM RRC ; # RESPONSE CODE #
  137. ARRAY SCPAWD [0:0] P(2);
  138. BEGIN
  139. ITEM SCPAWD0 U(0,0,60);
  140. ITEM SCPAWD1 U(1,0,60);
  141. END
  142. #**************** E X E C U T A B L E C O D E *****************#
  143. BEGIN
  144. CONTROL IFEQ DEBUG,1 ;
  145. XTRACE("HPNON") ;
  146. CONTROL FI;
  147. #
  148.   C L E A R A P P L I C A T I O N N U M B E R
  149. #
  150. AN = 0;
  151.  
  152. CONTROL OVERLAP NWLHEADER, SCPCALL;
  153.  
  154. P<NWLHEADER> = NWLADDR; # ADDR OF NWL BUFFER #
  155. JOBID = NWLJOBID[0]; # APPLICATION JOB ID WORD #
  156. CBA = NWLHADDR[0]; # UCP COMPLETION BIT ADDRESS #
  157. AWLA = NWLAWLADDR[0]; # UCP APPLICATION WORKLIST ADDRESS #
  158.  
  159. # SET ABORT PARAMS IN CASE APP IS TO BE ABORTED #
  160. ABTJOBID = JOBID; # JOB ID WORD #
  161.  
  162. P<NTON> = NWLADDR + NWLHSIZE; # ADDR OF NETON WORKLIST ENTR #
  163. ANAME = ONANAME[0]; # APPLICATION NAME #
  164. MINACN = ONMINACN[0]; # MININUM ACN VALUE #
  165. NUMRCN = B<36,12>ONMAXACN[0] ; # NUMBER OF RESERVED OUTGOING CN#
  166. MAXACN = B<48,12>ONMAXACN[0] ; # THE MAX ACN FROM APPLICATION #
  167. ONADDR = ONDAWADR[0]; # SAVE DATA AVAIL ADDR #
  168. RELADDR = NWLADDR; # ADDR OF BUF TO REL AT END OF NETON PROC #
  169. RELSIZE = SIZENWL; # SIZE OF BUF TO REL AT END OF NETON PROC #
  170. #
  171.   CREATE SF.CPID SYSTEM CONTROL POINT FUNCTION LIST
  172. #
  173. P<SCPCALL> = NWLADDR;
  174. SCPWD0[0] = 0;
  175. SCPID[0] = NAFLIDVALUE; # (NO ACB) SCP FUNCTION LIST ID VALUE #
  176. SCPBS[0] = SCPSIZE; # SIZE OF (NO ACB) SCP FUNCTION LIST #
  177. SCPFW[0] = 0;
  178. SCPJOBID[0] = JOBID; # APPLICATION JOB ID WORD #
  179. P<FLE> = LOC(SCPFW[0]);
  180. SCPFC[0] = SFCPID; # SCP SF.CPID FUNCTION CODE #
  181. SCPFP[0] = 1; # TO GET ACCESS LEVEL #
  182. SCPSCPA[0] = LOC(SCPAWD1[0]);
  183. #
  184.   ISSUE SYSTEM CONTROL POINT CALL
  185. #
  186. OSCCALL(FLE);
  187. #
  188.   PROCESS SYSTEM CONTROL POINT CALL RETURN CODE
  189. #
  190. RRC = SCPRC[0];
  191. IF RRC NQ 0
  192. THEN # SCP FUNCTION NOT COMPLETED #
  193. BEGIN # PROCESS NONZERO SF.STAT RETURN CODE #
  194. OVLNAME = HPNONSRP; # NAME OF OVERLAY TO LOAD #
  195. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  196. SCPADDR = PARAMS4; # ADDR OF SCP FUNC LIST TO REJECT NETON #
  197. IF RRC EQ RCSWAPPEDOUT
  198. THEN # APP WAS SWAPPED OUT #
  199. BEGIN # SWAPIN APP SO SCP FUNC CAN BE ISSUED #
  200. PARAMS1 = SCPADDR; # ADDR OF ORIGINAL SCP FUNCTION LIST #
  201. PARAMS2 = SCPADDR + SCPSIZE + 2*FLESIZE; #SWPIN ENTRY BUF ADR#
  202. PARAMS3 = NWLADDR; # ADDR OF NETON AWL TO WRITE TO APP FL #
  203. OVLNAME = OSCPSIP; # NAME OF OVERLAY TO LOAD #
  204. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  205. INDEX = AWLNSIZE + SCPSIZE + 2*FLESIZE + SWPISIZE;
  206. RELADDR = RELADDR + INDEX;
  207. RELSIZE = RELSIZE - INDEX;
  208. END
  209. END
  210. ELSE # SF.CPID SCP FUNCTION COMPLETED #
  211. BEGIN
  212. P<SCPCALL> = LOC(SCPAWD0[0]);
  213. PRIVP = SCPPP[0]; # SAVE PRIVILEGED PROGRAM BIT #
  214. PRIVU = SCPPU[0]; # SAVE PRIVILEGED USER BIT #
  215. AAL = SCPAAL[0]; # SAVE APPLICATION ACCESS LEVEL #
  216. RRC = 0;
  217. #
  218.   SET PARAMETERS TO BUILD ACN FOR APPLICATION
  219. #
  220. PARAMS1 = MINACN; # MINIMUM ACN VALUE #
  221. PARAMS2 = MAXACN; # MAXIMUM ACN VALUE #
  222. PARAMS3 = ANAME; # APPLICATION NAME #
  223. PARAMS4 = ONADDR; # DATA AVAILABLE ADDRESS #
  224. #
  225.   CHECK FOR LEGAL MINACN/MAXACN VALUES
  226. #
  227. IF (MINACN LS 0) OR
  228. (MAXACN GR ACNMAX) OR
  229. (MAXACN LS MINACN) OR
  230. (MINACN EQ 0 AND MAXACN NQ 0)
  231. THEN
  232. BEGIN
  233. NWLBS[0] = NWLSIZE; # RESTORE NWL BUFFER SIZE #
  234. PARAMS1 = DFMSG20 ; # ILLEGAL VALUE #
  235. PARAMS2 = JOBID ;
  236. OVLNAME = XERRMSGP; # SEND ERROR MESSAGE TO THE DAYFILE #
  237. OVLCALL ;
  238. ABTAPPF = XBADMMACN;# FLAG TO ABORT THE APPLICATION #
  239. GOTO EXIT ;
  240. END
  241. #
  242.   C H E C K I F N V F N E T O N
  243. #
  244. NVFNETON = FALSE;
  245. IF ANAME EQ "NVF"
  246. THEN # APP NETTING ON IS NVF #
  247. BEGIN
  248. NVFNETON = TRUE; # NVF IS NETTING ON #
  249.  
  250. CONTROL IFEQ LIBRES,1; # DO NOT CHECK IF NVF IS SYS RESIDNT #
  251. IF ATACBA[NVFAN] NQ 0
  252. THEN # NVF HAS ALREADY NETTED ON SO #
  253. BEGIN # ABORT THIS MALICIOUS APPLICATION #
  254. NWLBS[0] = NWLSIZE; # RESTORE NWL BUFFER SIZE #
  255. PARAMS1 = DFMSG02; # *SECURITY VIOLATION* #
  256. PARAMS2 = JOBID; # JOB ID OF JOB WHICH VIOLATED SECURITY #
  257. OVLNAME = XERRMSGP; # NAME OF OVERLAY TO LOAD #
  258. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  259. ABTAPPF = XRESAPPNM; # REASON CODE FOR ABORTING APP #
  260. GOTO EXIT;
  261. END
  262. CONTROL FI;
  263.  
  264. CONTROL IFNQ LIBRES,1; # CHECK IF NVF IS SYSTEM RESIDENT #
  265. IF ATACBA[NVFAN] NQ 0 OR NOT PRIVU
  266. THEN # THIS IS A SECURITY VIOLATION #
  267. BEGIN # SO ABORT MALICIOUS APP #
  268. PARAMS1 = DFMSG02; # *SECURITY VIOLATION.* #
  269. PARAMS2 = JOBID; # JOB ID OF JOB WHICH VIOLATED SECURITY #
  270. OVLNAME = XERRMSGP; # NAME OF OVERLAY TO LOAD #
  271. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  272.  
  273. ABTAPPF = XRESAPPNM; # SET ABORT-APPLICATION FLAG #
  274. GOTO EXIT;
  275. END
  276. CONTROL FI;
  277.  
  278. ATK[NVFAN] = TRUE; # SET K-DISPLAY BIT #
  279.  
  280. #
  281.   B U I L D N V F ( A C B AND A C N T )
  282.  
  283.   PARAMETERS REQUIRED...
  284.   PARAMS1 MINIMUM ACN VALUE
  285.   PARAMS2 MAXIMUM ACN VALUE
  286.   PARAMS3 APPLICATION NAME
  287.   PARAMS4 DATA AVAILABLE ADDRESS
  288.   JOBID JOB IDENTIFCATION WORD
  289.   PROGRAM NAME TO CALL
  290.   BLDACB -- S Y M P L --
  291. #
  292. OVLNAME = BLDACBP; # NAME OF OVERLAY TO LOAD #
  293. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  294. AN = PARAMS1; # SAVE APPLICATION NUMBER #
  295. #
  296.   LOOP THROUGH TNT TO SEND CR/SLL TO EXITING LLCB.
  297. #
  298.  
  299. FOR INDEX = TNTHSIZE STEP 1 UNTIL TNTBS - TNTHSIZE
  300. DO # LOOP THROUGH ALL ENTRY IN TNT #
  301. BEGIN
  302. IF TNTLLAD[INDEX] NQ 0
  303. THEN
  304. BEGIN # EXITING LLCB #
  305. P<LLCB> = TNTLLAD[INDEX] ; # FIRST LLCB IN CHAIN #
  306. CRLLS:
  307. IF LLCBHN[0] NQ 0
  308. AND LLCBTN[0] NQ 0
  309. THEN
  310. BEGIN # SEND CR/SLL FOR THIS ONE #
  311. #
  312.   GET A BUFFER FOR MESSAGE TO INFORM NVF
  313. #
  314. MGETS( LCRSLL + ABHSIZE + BLKHSIZE , CRADR , TRUE ) ;
  315. #
  316.   SET UP APPLICATION HEADER
  317. #
  318. P<AHEADER> = CRADR + BLKHSIZE ;
  319. ABHABT[0] = APPCMD ;
  320. ABHACT[0] = CT60TRANS ;
  321. ABHTLC[0] = LCRSLL ;
  322. #
  323.   SET-UP THE MESSAGE ITSELF
  324. #
  325. P<SUPMSG> = CRADR + ABHSIZE + BLKHSIZE ;
  326. # #
  327. PFCSFC[0] = CRSLL ;
  328. P<SMNVF> = P<SUPMSG> ;
  329. # #
  330. CRSLDN [0] = LLCBTN[0] ; # DESTINATION NODE NUMBER #
  331. CRSLSN [0] = LLCBHN[0] ; # SOURCE NODE NUMBER #
  332. CRSLST [0] = 1 ; # LOGICAL LINK UP SIGNAL#
  333. #
  334.   AND LINK MESSAGE TO NVF
  335. #
  336.  
  337. BLINK ( CRADR,ATACBA[NVFAN]) ; # QUEUE TO NVF #
  338. END # SEND CR/SLL FOR THIS ONE #
  339. IF LLCBFP[0] NQ 0
  340. THEN
  341. BEGIN # NEXT LLCB EXITED #
  342. P<LLCB> = LLCBFP[0] ; # NEXT LLCB THEN #
  343. GOTO CRLLS ;
  344. END
  345. END # EXITING LLCB #
  346. OSCHAPP(ATACBA[NVFAN]) ;
  347.  
  348. END # SEND CR/SLL TO ALL LLCB #
  349. END
  350. P<ACB> = ATACBA[NVFAN]; # NVF ACB ADDRESS #
  351. IF SHUTDOWN OR (P<ACB> EQ 0 AND NOT NVFNETON)
  352. THEN # REJECT NETON CAUSE NETWORK SHUTTING DOWN#
  353. BEGIN # OR NVF HAS NOT NETTED ON YET #
  354. RRC = TRYAGAIN; # NETON RETURN CODE #
  355. END
  356. ELSE # NETWORK NOT SHUTTING DOWN #
  357. BEGIN
  358. IF NOT NVFNETON
  359. THEN # (NOT NVF) APPLICATION NETTING ON #
  360. BEGIN
  361. #
  362.   B U I L D ( A C B AND A C N T ) FOR APPLICATION.
  363.  
  364.   PARAMETERS REQUIRED...
  365.   PARAMS1 MINIMUM ACN VALUE
  366.   PARAMS2 MAXIMUM ACN VALUE
  367.   PARAMS3 APPLICATION NAME
  368.   PARAMS4 DATA AVAILABLE ADDRESS
  369.   JOBID JOB IDENTIFCATION WORD
  370.   PROGRAM NAME TO CALL
  371.   BLDACB -- S Y M P L --
  372. #
  373.  
  374. OVLNAME = BLDACBP; # NAME OF OVERLAY TO LOAD #
  375. OVLCALL; # LOAD AND EXECUTE OCERLAY #
  376. AN = PARAMS1; # APPL NUMBER FOR APP NETTING ON #
  377. IF AN NQ 0
  378. THEN # ACB CREATED #
  379. BEGIN
  380. IF ANAME EQ "RBF" # IF APPLICATION IS RBF #
  381. THEN
  382. ATPRU[AN] = TRUE; # SET PRU ALLOWED FLAG #
  383. #
  384.   SWAP APPLICATION OUT AND SEND NET/ON SUP MSG TO NVF
  385. #
  386. PARAMS0 = NUMRCN ; # NUMBER OF RESERVED OUTGOING CONNS. #
  387. PARAMS1 = MAXACN - MINACN + 1; # MAXIMUM ACN VALUE #
  388. IF PARAMS1 EQ 1 AND MINACN EQ 0 # NO CONN WANTED #
  389. THEN
  390. PARAMS1 = 0 ;
  391. PARAMS2 = ANAME; # APPLICATION NAME #
  392. PARAMS3 = ONADDR; # DATA AVAIL WORD ADDR #
  393. PARAMS4 = AN; # APPLICATION NUMBER #
  394. PARAMS5 = PRIVU; # PRIVILEGED USER BIT #
  395. PARAMS8 = PRIVP; # PROGRAM PRIVILEGED BIT #
  396. PARAMS7 = AAL; # APPLICATION ACCESS LEVEL #
  397. OVLNAME = HPNONAPP; # NAME OF OVERLAY TO LOAD #
  398. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  399. DELACB = PARAMS5; # TRUE = APP NO LONGER IN SYSTEM #
  400. IF DELACB
  401. THEN # NEED TO DELETE ACB AND FORGET ABOUT THIS#
  402. BEGIN # APPLICATION #
  403. PARAMS1 = AN; # APPLICATION NUMBER #
  404. PARAMS2 = NETONR; # FUNCTION CODE FOR NET/ON/R #
  405. OVLNAME = RELACBP; # NAME OF OVERLAY TO LOAD. #
  406. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  407. END
  408. GOTO EXIT;
  409.  
  410. END
  411. ELSE # COULD NOT CREATE ACB SO REJECT NETON #
  412. RRC = RNO"DUP" ; # NO AN FOUND IN AT #
  413. END
  414. END
  415. #
  416.   IF APPLICATION NOT NVF, THEN CREATE SCP FUNCTION LIST TO
  417.   REJECT NETON
  418.   IF NVF, THEN CREATE SCP FUNCTION LIST TO ACCEPT NETON
  419. #
  420. PARAMS1 = AN; # AN NON - ZERO = NVF. #
  421. PARAMS4 = RRC; # REASON CODE FOR REJECTING NETON #
  422. OVLNAME = HCNONFLP; # NAME OF OVERLAY TO LOAD #
  423. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  424. P<FLHEAD> = PARAMS7; # ADDR OF SCP FUNCTION LIST #
  425. #
  426.   ISSUE SCP FUNCTION
  427. #
  428. P<FLE> = LOC(FLFW[0]);
  429. FLFC[0] = SFLIST; # SCP SF.LIST FUNCTION CODE #
  430. OSCCALL(FLE);
  431. #
  432.   PROCESS SCP FUNCTION RETURN CODE
  433. #
  434. RRC = FLRC[0];
  435. IF RRC EQ RCUCPAOOR
  436. THEN # APP GAVE US BAD ADDR TO WRITE NETON #
  437. BEGIN # RESPONSE TO SO ABORT APPLICATION #
  438. ABTAPPF = XFLERR; # REASON CODE FOR ABORTING APP #
  439. END
  440. ELSE
  441. BEGIN
  442. IF RRC NQ 0
  443. THEN
  444. BEGIN
  445. IF RRC EQ RCSWAPPEDOUT
  446. THEN # APP WAS SWAPPED OUT #
  447. BEGIN
  448. IF NOT NVFNETON
  449. THEN # NON-NVF APP WAS SWAPPED OUT #
  450. BEGIN
  451. #
  452.   CREATE (NO ACB) SWAPIN ENTRY AND SWAP IN APP
  453. #
  454. PARAMS1 = P<FLHEAD>; # ADDR OF SCP FUNCTION LIST #
  455. PARAMS2 = P<FLHEAD> + SCPSIZE + 2*FLESIZE; #SWP BUF ADR#
  456. PARAMS3 = NWLADDR; # ADDR OF AWL TO WRITE TO APP FL #
  457. OVLNAME = OSCPSIP; # NAME OF OVERLAY TO LOAD #
  458. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  459. INDEX = SCPSIZE + 2*FLESIZE + AWLNSIZE + SWPISIZE;
  460. END
  461. ELSE # NVF WAS SWAPPED OUT #
  462. BEGIN
  463. #
  464.   SWAP IN NVF
  465. #
  466. P<ACB> = ACBADDR;
  467. ACBFLIST[0] = P<FLHEAD>; # STORE FUNC LIST ADR IN ACB #
  468. ATASBS[ACBAN[0]] = TRUE; # APP-SWAPPED-OUT-BY-OS FLAG #
  469. ACBWRADDR[0] = NWLADDR;# ADDR OF AWL TO WRITE TO APP FL#
  470. OSCHAPP(ACBADDR); # SCHEDULE NVF #
  471. INDEX = AWLNSIZE + FLSIZE + 3*FLESIZE;
  472. END
  473. RELADDR = NWLADDR + INDEX;
  474. RELSIZE = SIZENWL - INDEX;
  475. END
  476. ELSE # APP NO LONGER IN SYSTEM #
  477. BEGIN
  478. IF NVFNETON
  479. THEN
  480. BEGIN
  481. PARAMS1 = AN; # AN = NVF, ABORT NVF NETON #
  482. PARAMS2 = RRC; # REASON CODE FOR ABORTING NVF #
  483. #
  484.   R E L E A S E A C B AND A C N T
  485.   B U F F E R S ..
  486.  
  487. #
  488. OVLNAME = RELACBP; # NAME OF OVERLAY TO LOAD #
  489. OVLCALL; # LOAD AND EXECUTE -RELACB- #
  490. END
  491. END
  492. END
  493. END
  494. END
  495. IF ABTAPPF EQ 0
  496. THEN # NOT ABORTING APP SO REST OF NWL NOT NEED#
  497. BEGIN
  498. #
  499.   RELEASE REST OF NWL
  500. #
  501. P<DRHDRWD> = RELADDR; # ADDR OF REMAINS OF NWL TO RELEASE #
  502. BLKBS[0] = RELSIZE; # SIZE OF BUF TO RELEASE #
  503. MRELS(RELADDR);
  504. END
  505. EXIT:
  506. GOTO RJMAIN; # RETURN TO CALLING PROGRAM #
  507. END
  508. TERM
cdc/nos2.source/nam5871/hpnon.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator