12.07.2015 Views

SDISC Assembler Call - NetEx

SDISC Assembler Call - NetEx

SDISC Assembler Call - NetEx

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

SWAIT <strong>Assembler</strong> <strong>Call</strong>The SWAIT procedure provides a means to wait for current NETEX operations to finish. Unlike the higherlevel language interfaces, this interface does not accept NRB’s to check.Instead, it is the responsibility of the assembly language user to check the status of the NRB’s when control isreturned.When SWAIT is called, it checks if any operations have completed since the last time control was returnedfrom an SWAIT call. If an operation completed, control is immediately returned to the caller. If no operationshave completed, the user is suspended until an operation completes.Because SWAIT “remembers” if any operation has completed since the last call, SWAIT may return with noapparent NRB completions. This occurs if the completion occurred after the user regained control and beforethe NRB’s were checked. The SWAIT code flags the completion and then the user processes the NRB. Onthe next SWAIT call, the completion flag is set and control is returned, but no new NRB’s have completed.The only current error which can be reported from an SWAIT is that NETEX is not currently running. In thiscase, the user can not be suspended and control is returned with the error status. If the user wishes to waituntil NETEX is up, the user should wait and try again until SWAIT returns with a good status. It is possiblefor the user to be aborted with a common bank reload error when NETEX starts up. This is a result of a call(SWAIT, SCONNECT, or SOFFER) reaching the common bank just as the reload occurs.There is only one WAIT request. It waits for completions at any call level. If the user is using SESSION andDRIVER requests, the SWAIT will wait for any SESSION request or any DRIVER request. For coding conveniencethe names SWAIT, TWAIT, NWAIT, and DWAIT are defined.<strong>Call</strong>ParametersSWAITerr-returnSWAITThis is the procedure name.err-returnThis required parameter is the address to transfer control to if the request completes with an error indication.The error status which normally would be returned in NRBSTAT is returned in A0. Currently,the only error is “NETEX is not running”.Multiple ActivitiesNETEX is designed to allow multiple user activities. It is common to have one activity to process all outputrequests and one for all input requests. There is no limit imposed by NETEX on the number of activities.As with the other interfaces, SWAIT allows multiple activities. There is an attempt to process requests in theorder that they were received, but it is common to have the last caller and the first call active if a completionoccurs just as the last caller calls. The assembly language interface and the higher level language interfacesare not compatible. The higher level language interfaces need to receive control on each completion. If boththe assembly and higher level interfaces are to be used, only one activity should be used. That activity shoulduse the SWAIT(-l) type interface and call the user’s assembly language completion routine for the assemblercompletions.Page 46 H307 <strong>Assembler</strong> Interface MAN-REF-H307IP-04

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!