• Keine Ergebnisse gefunden

Ipopcell,dal

Im Dokument Internal Reference Manual (Seite 51-58)

Ipopcell,dal

popcell

Popcell address supplied when the activity was created

dal

Returned address of the message DAL

Example:

This example shows how a slave activity created by an ALERT request

checks if any OALs, representing work to do, have been sent by the master activity.

ILocation !Result

I I

I I ASLEEP

I Operand

I

IR!PO,R!OAL

2.9.4.3 AWAKE function (16)

AWAKE passes parameters to an activity created earlier with an ALERT service function by sending i t a Disk Activity Link (DAL). A DAL is a 32-parcel message. The Kernel uses the first 8 parcels for control purposes; parcels 8 through 31 may contain messages or data. The target activity receives messages by issuing the ASLEEP request.

The stepflow for the AWAKE service function (shown in figure 2-4) is as follows:

1. The originating activity builds a DAL with a message for the target activity and performs an AWAKE service function, specifying the target lOP, the popcell address, and the OAL address.

2. The Kernel in the originating lOP sends the DAL to the Kernel in the target lOP by way of Buffer Memory, using the interprocessor message facility.

3. The Kernel in the originating lOP idles the originating activity.

4. The Kernel in the target lOP places the DAL on the popcell DAL queue.

Originating lOP Target

rop

Activity Activity

~~

5

~~ 6

1 3 8

I

popcelll

4

"

~~

Kernel Kernel

Buffer Memory

1870 Figure 2-4. AWAKE Stepflow

5. The target activity processes the DAL returned by the ASLEEP request.

6. The target activity performs a RESPOND service function, and the Kernel in the target rop places a status code in the message.

7. The Kernel in the target lOP sends the message to the Kernel in the originating lOP by way of Buffer Memory.

8. The Kernel in the originating rop returns the status code to the originating activity in the A register and places the activity on its central processor queue.

I

,-Format:

ILocation !Result !Operand

I I

I I AWAKE

I

liop,popcell,dal

iop 1/0 Processor designator:

0 IOP-O 1 IOP-1 2 IOP-2 3 IOP-3

popcell Popcell address returned on the ALERT call dal Message packet (DAL) address

Example:

This example executes in MIOP and shows how a master activity notifies the slave activity that there is work to do. The master created the slave by issuing an ALERT service request; then a DAL is sent to a specific slave in the BIOP.

ILocation !Result

I I

I I AWAKE

!Operand

I

12,R!XFR,R!DAL

2.9.4.4 A13001 function (24)

The A13001 function performs as a readlwrite operation to a front end that is connected through an NSC A130 adapter. Control returns to the caller after the specified interrupt occurs.

Format:

ILocation !Result !Operand

I I

I

IA13001

I

lint,inl,in,chan,outl,out,q

int

inl in

Interrupt control; A '0' specifies an output channel

interrupt, and a '1' specifies an input channel interrupt.

Input buffer length (in parcels) Input buffer starting address

chan Physical lOP input channel number outl Output buffer length (in parcels) out Output buffer starting address

q A 2-parcel queue address for Kernel queuing

Example:

This example shows one way to issue a read command to the A130 adapter.

The constant value 1, signifies an input channel interrupt. The output buffer length is specified by using a table field name; NSB is the Input Status Buffer used to hold information relevant to the A130 adapter. LE represents the field name for the length of each entry in the table.

ILocation IResult

I I

I

IA13001

I Operand I

11,R!LEN,R!IN,R!CHAN,NSB@LE,R!OUT,R!Q

2.9.4.5 BGET function (32)

The BGET function allows an activity to get a fixed-size Local Memory buffer of 2048 parcels. The request is satisfied from the pool of IIO buffers. The first address of the buffer is a multiple of 512.

The error response, EC$BUFF, is returned in the A register if the

function is unsuccessful. If successful, the address is returned in the specified register, and the A register is

O.

The BGET call does not require a register save.

Format:

ILocation IResult

I I

I IBGET

I Operand

I

Ireg

reg Operand register in which the buffer address is returned

Example:

This example shows that a 2-character register designator may be used to receive the address of the local 1/0 buffer.

ILocation IResult

I I

I IBGET

10perand

I

I~

2.9.4.6 BRET function (33)

The BRET function returns an IIO buffer of 2048 parcels to the pool of available buffers. The BRET call does not require a register save.

Format:

/Location !Result !Operand

I I I

I

/BRET

/address

address

Address of buffer to be released

Example:

This example shows that a 2-character register designator may be used when making the service request. Like anywhere else is APML, the R!

register notation could alternatively be used.

/Location IResult

I I

I IBRET

!Operand

I

I~

2.9.4.7 CALL function (50)

The CALL function activates an overlay to perform some service for the caller. The Kernel saves the caller's operand registers in a storage module, pushes the storage module on the software stack, loads the called overlay in Local Memory, and passes the parameters contained in the

caller's operand registers. The number of parameters passed to the called overlay is determined by information the Kernel keeps about each overlay. The parameters are moved from the caller's registers to those of the called overlay.

After the called overlay completes the function for which i t was called, it performs a RETURN function. The Kernel reloads the original caller (if necessary), loads its registers with the contents of the storage module, and returns control to the caller.

Format:

\Location IResult I Operand

I I I

I ICALL

lovl(,pars)

[,TYPE=NUMBER]

ovl

Name of the called overlay if TYPE=NUMBER is not specified;

number of called overlay or register containing the called overlay number if TYPE=NUMBER is specified.

pars

Parameters to be passed to the called overlay. Each

register in which the caller expects a return parameter may be specified in the parameter list using the RO=reg

option. The called overlay returns parameters to the caller through the RETREG macro described in section 14, Program Library and Macros. Blanks and extra commas are not allowed in the parameter list unless they serve as parameter space holders.

TYPE=NUMBER

If specified,

ovl

contains the overlay number or the register holding the overlay number.

Example:

This example shows a call to overlay BTO, by name. Parameters are passed to BTO according to the way the REGDEFS macro was used to define

registers within overlay BTD. Notice that passed parameters may be registers, numeric constants, or symbols.

ILocation IResult

I I

I I CALL

I Operand

I

IBTO,(R!MSGR,D'16,R!MSG,DTOFF,O)

2.9.4.8 CREATE function (55)

An activity can create an independent activity to run under the Kernel.

The new activity is assigned a unique activity number distinguishing i t from other activities. If the new activity is created successfully, the A register is 0 and the descriptor address of the new activity is

returned in AD@P1 of the Activity Descriptor of the creator. If the creation is unsuccessful, the error code is returned in th~ A register.

The activity executing the CREATE function specifies the priority of the new activity, the initial overlay, and parameters for the new activity.

The parameters are loaded into the overlay's specified registers when the new activity is activated.

The activity performing the CREATE function regains control immediately after the CREATE; the new activity is placed on the

rop

central processor queue for later activation.

Format:

ILocation IResult IOperand

I I I

I I CREATE

lovl(,pars)

[,PRI=pril[,DPTR=dptr] [,TYPE=NUMBER]

ovl

Name of the initial overlay in the created activity

pars

Parameters to be passed to the created activity. Blanks and extra commas are not allowed in the parameter list unless they serve as parameter space holders.

PRI=pri Activity priority (0 through 15); the default is 8.

DPTR=dptr Index into Kernel Demons Table (D$name), if a Demon;

default is AD$NODEM (normal activity, not a Demon).

TYPE=NUMBER

If specified,

ovl

contains the overlay number or the register holding the overlay number.

Examples:

This example shows the simplest form of CREATE. The name of the root overlay of the activity must be specified.

ILocation !Result

I I

I I CREATE

!Operand

I

ICLKSNC

This example shows how to specify the overlay number of the root overlay of the activity. Notice that a priority may be specified in a register, and the demon index may be contained in a register. No parameters are being passed to the new activity.

ILocation IResult !Operand

I I

I I CREATE IR!TO"PRI=R!T1,DPTR=R!T2,TYPE=NUMBER

This example shows that passed parameters should be enclosed by

parentheses. If more than one parameter is passed, refer to the CALL example to see that syntax. Priority of the CREATEd overlay can be specified with a numeric constant.

ILocation IResult

I I

IOperand

I

IUCSHL,(R!DAL),PRI=l

2.9.4.9 FIND function (53)

FIND returns the Buffer Memory address and length of an overlay in the registers designated. If the overlay does not exist, the error code EC$FIND is returned in the A register. If the' overlay is found, the A register contains 0, and the specified operand registers contain the requested parameters upon return. The FIND call does not require a register save.

Format:

ILocation !Result !Operand

I I

I IFIND

Im Dokument Internal Reference Manual (Seite 51-58)