*DECK NS$BRK USETEXT COM$NS USETEXT ERR$NS USETEXT KDS$NS USETEXT LIN$NS PROC NS$BRK(ERRCODE); # PROCESS HOP/BRK # # TITLE NS$BRK - PROCESS HOP/BRK. # BEGIN # NS$BRK # # ** NS$BRK - PROCESS HOP/BRK. * * J.C. LEE 1981 * * THIS ROUTINE PROCESSES THE "BREAK" COMMAND FROM THE HOP. * * PROC NS$BRK(ERRCODE) * * ENTRY: * NONE. * * EXIT: * ERRCODE - IF ILLEGAL HOP SM IS DETECTED. * * METHOD: * IF K-DISPLAY IS ASSIGNED: * REDUCE TSB SIZE FOR PAGE-WAIT BUFFER TO 1 WORD(HDR WORD). * SET K-DISPLAY LINE COUNT TO 0. * SEND "READY.." TO K-DISPLAY. * ELSE * SET ERRCODE TO "ILLEGAL HOP SM". * # ITEM ERRCODE U; # ERROR CODE # $BEGIN XREF BEGIN PROC NS$DBG; # TRACE PROC CALL # END $END XREF BEGIN PROC EXREDUC; # REDUCE TSB SIZE FOR PAGE WAIT BUFFER # PROC MOVEOK; # ALLOW MOVES # FUNC NS$FEC U; # FORMAT ERROR CODE # PROC TSBINFO; # GET TSB INFO # END ITEM TSBN U; # TSB NUMBER # ITEM TSBFWA U; # TSB FIRST WORD ADDRESS # ITEM TSBSIZE U; # TSB SIZE# CONTROL EJECT; $BEGIN NS$DBG("BRK"); # TRACE CALL # $END IF DCW$F$ASS[0] THEN # K-DISPLAY ASSIGNED # BEGIN TSBN = DCW$PWBTSB[0]; TSBINFO(TSBSIZE,TSBFWA,TSBN); # LOCATE PAGE WAIT BUFFER # P = 0; IF PWB$LC[TSBFWA] NQ 0 THEN # LINES QUEUED IN PAGE WAIT BUFFER # BEGIN # DISCARD ALL LINES QUEUED IN PAGE WAIT BUFFER # EXREDUC(PWB$WC[TSBFWA]-PWB$HDRL,TSBN,FALSE,TSBFWA); PWB$LC[TSBFWA] = 0; PWB$WC[TSBFWA] = PWB$HDRL; END MOVEOK(TSBN); # ALLOW PAGE WAIT BUFFER TO MOVE # DCW$F$PAGE[0] = FALSE; # CLEAR PAGE FULL FLAG # DCW$LC[0] = 0; END ELSE # NAM ERROR # ERRCODE = NS$FEC(EC"ERR$SM", SMEC"HSM$HOPSM"); RETURN; END # NS$BRK PROC # TERM