Compaq ECQD2KCTE manual Case, Div, Loadlocked

Models: ECQD2KCTE

1 371
Download 371 pages 20.35 Kb
Page 48
Image 48

Table 3–7: Operators (Continued)

Operator

Meaning

 

 

CASE

The CASE construct selects one of several actions based

 

on the value of its argument. The form of a case is:

 

CASE argument OF

 

argvalue1: action_1

 

argvalue2: action_2

 

...

 

argvaluen:action_n

 

[otherwise: default_action]

 

ENDCASE

 

If the value of argument is argvalue1 then action_1 is exe-

 

cuted; if argument = argvalue2, then action_2 is executed,

 

and so forth.

 

Once a single action is executed, the code stream breaks

 

to the ENDCASE (there is an implicit break as in Pascal).

 

Each action may nonetheless be a sequence of

 

pseudocode operations, one operation per line.

 

Optionally, the last argvalue may be the atom ‘otherwise’.

 

The associated default action will be taken if none of the

 

other argvalues match the argument.

DIV

Integer division (truncates)

LEFT_SHIFT(x,y)

Logical left shift of first operand by the second operand.Y

 

is an unsigned shift value. Zeros are moved into the

 

vacated bit positions, and shifted out bits are discarded.

LOAD_LOCKED

The processor records the target physical address in a per-

 

processor locked_physical_address register and sets the

 

per-processor lock_flag.

lg

Log to the base 2.

MAP_x

F_float or S_float memory-to-register exponent mapping

 

function.

MAXS(x,y)

Returns the larger of x and y, with x and y interpreted as

 

signed integers.

MAXU(x,y)

Returns the larger of x and y, with x and y interpreted as

 

unsigned integers.

MINS(x,y)

Returns the smaller of x and y, with x and y interpreted as

 

signed integers.

MINU(x,y)

Returns the smaller of x and y, with x and y interpreted as

 

unsigned integers.

x MOD y

x modulo y

 

 

3–8Alpha Architecture Handbook

Page 48
Image 48
Compaq ECQD2KCTE manual Case, Div, Loadlocked