EPRF@SNYCENVM.BITNET (Peter Flass) (05/26/88)
When you issue a $QIO with the "astprm" argument, how is the parameter passed to the completion AST? I can't seem to find this in the orange books. - Pete Flass Empire State College
jeh@crash.cts.com (Jamie Hanrahan) (05/29/88)
In article <8805280702.AA03906@ucbvax.Berkeley.EDU> EPRF@SNYCENVM.BITNET (Peter Flass) writes: > > When you issue a $QIO with the "astprm" argument, how is the parameter >passed to the completion AST? It's passed exactly as you passed it. That is, the longword that you put in the ASTPRM position in the argument list for the $QIO call is copied verbatim into the second longword of the argument list that's passed to your AST procedure (making it the first argument, the first longword being the number-of-arguments longword). So, for instance, if you pass something by value, your AST procedure can pick it up by value, and etc. $QIO does not check the argument in any way, so if you intend to pass something by reference or by descriptor, but get it wrong somehow, your AST procedure (and not the $QIO call) will incur an access violation. Does that help?
EPRF%SNYCENVM.BITNET%CORNELLC.CCS.CORNELL.EDU%KL.SRI.COM%lbl%sfsu1.hepnet@LBL.GOV (05/29/88)
Received: from KL.SRI.COM by LBL.Gov with INTERNET ; Sat, 28 May 88 22:10:51 PDT Received: from CORNELLC.CCS.CORNELL.EDU by KL.SRI.COM with TCP; Thu 26 May 88 07:36:04-PDT Received: from SNYCENVM.BITNET by CORNELLC.CCS.CORNELL.EDU ; Thu, 26 May 88 10:36:05 EDT Received: by SNYCENVM (Mailer X1.25) id 3833; Thu, 26 May 88 10:34:31 GMT Date: Thu, 26 May 88 10:32:08 EDT From: Peter Flass <EPRF%SNYCENVM.BITNET@CORNELLC.CCS.CORNELL.EDU> Subject: QIO Question To: INFO-VAX@KL.SRI.COM When you issue a $QIO with the "astprm" argument, how is the parameter passed to the completion AST? I can't seem to find this in the orange books. - Pete Flass Empire State College
nagy%warner.hepnet@LBL.GOV (Frank J. Nagy, VAX Wizard & Guru) (05/30/88)
> When you issue a $QIO with the "astprm" argument, how is the parameter > passed to the completion AST? I can't seem to find this in the orange books. The AST calling sequence is described in Section 5.4 of the System Services Reference Manual. Basically the "astprm" argument is passed by value as the first argument of the AST. I normally declare my AST routines as having a single argument (and don't play around with the saved R0/R1 values, etc.). If your AST parameter is the address of an array or other structure, then your AST routine will look fairly normal in any high level language. If your AST parameter is a scaler value, then your AST routine will need to play some games if written in FORTRAN: Subroutine AST(astprm) Integer*4 astprm c If (%LOC(astprm) .EQ. ... where the %LOC is needed since astprm is passed by-value. = Frank J. Nagy "VAX Guru & Wizard" = Fermilab Research Division EED/Controls = HEPNET: WARNER::NAGY (43198::NAGY) or FNAL::NAGY (43009::NAGY) = BitNet: NAGY@FNAL = USnail: Fermilab POB 500 MS/220 Batavia, IL 60510
GG.SPY@ISUMVS.BITNET ("John Hascall") (05/31/88)
> Date: Thu, 26 May 88 10:32:08 EDT > Sender: INFO-VAX Discussion <INFO-VAX@UBVM> > From: Peter Flass <EPRF%SNYCENVM.BITNET@CORNELLC.CCS.CORNELL.EDU> > Subject: QIO Question > To: John Hascall <GA.JPH@ISUMVS> > > When you issue a $QIO with the "astprm" argument, how is the parameter > passed to the completion AST? I can't seem to find this in the orange books. > - Pete Flass > Empire State College It is passed "as is", by value, immediate mode,...