Note:
QUADRUPLE | MEANING | |||
---|---|---|---|---|
Copying and Converting Scalars | ||||
COPYB | b1 | b3 | b3 := b1 | |
COPYI | i1 | i3 | i3 := i1 | |
COPYR | r1 | r3 | r3 := r1 | |
COPYI2R | i1 | r3 | r3 := i1 converted to a real number. | |
COPYR2I | r1 | i3 | i3 := r1 converted to an integer. | |
Reading and Writing Array Elements | ||||
LDB | i1 | b2 | b3 | b3 := b2[i1] |
LDI | i1 | i2 | i3 | i3 := i2[i1] |
LDR | i1 | r2 | r3 | r3 := r2[i1] |
STB | i1 | b2 | b3 | b3[i1] := b2 |
STI | i1 | i2 | i3 | i3[i1] := i2 |
STR | i1 | r2 | r3 | r3[i1] := r2 |
Integer Arithmetic | ||||
ADDI | i1 | i2 | i3 | i3 := i1 + i2 |
SUBI | i1 | i2 | i3 | i3 := i1 - i2 |
MULI | i1 | i2 | i3 | i3 := i1 * i2 |
DIVI | i1 | i2 | i3 | i3 := i1 / i2 |
MOD | i1 | i2 | i3 | i3 := i1 mod i2 |
Real Arithmetic | ||||
ADDR | r1 | r2 | r3 | r3 := r1 + r2 |
SUBR | r1 | r2 | r3 | r3 := r1 - r2 |
MULR | r1 | r2 | r3 | r3 := r1 * r2 |
DIVR | r1 | r2 | r3 | r3 := r1 / r2 |
Relational Operators | ||||
LTI | i1 | i2 | b3 | set b3 to true if i1 < i2, else set b3 false. |
LTEQI | i1 | i2 | b3 | set b3 to true if i1 < i2 or i1 = i2, else set b3 false. |
EQI | i1 | i2 | b3 | set b3 to true if i1 = i2, else set b3 false. |
NEQI | i1 | i2 | b3 | set b3 to false if i1 = i2, else set b3 true. |
LTR | r1 | r2 | b3 | set b3 to true if r1 < r2, else set b3 false. |
LTEQR | r1 | r2 | b3 | set b3 to true if r1 < r2 or r1 = r2, else set b3 false. |
EQR | r1 | r2 | b3 | set b3 to true if r1 = r2, else set b3 false. |
NEQR | r1 | r2 | b3 | set b3 to false if r1 = r2, else set b3 true. |
Logical Operators | ||||
AND | b1 | b2 | b3 | b3 := b1 and b2 |
OR | b1 | b2 | b3 | b3 := b1 or b2 |
NOT | b1 | b3 | b3 := not b1 | |
Branches, Jumps, and Labels | ||||
BFALSE | b1 | L2 | branch to L2 if b1 is false. | |
JUMP | L1 | jump to L1. | ||
LABEL | L1 | mark location of label L1. | ||
Procedure and Function Calls | ||||
PARAMB | b1 | b1 is an argument in the next CALL, CALLB, CALLI, or CALLR quadruple. | ||
PARAMI | i1 | i1 is an argument in the next CALL, CALLB, CALLI, or CALLR quadruple. | ||
PARAMR | r1 | r1 is an argument in the next CALL, CALLB, CALLI, or CALLR quadruple. | ||
CALL | n | L2 | call procedure L2 using the previous n arguments. | |
CALLB | n | L2 | b3 | call Boolean function L2 using the previous n arguments and put returned value in b3. |
CALLI | n | L2 | i3 | call integer function L2 using the previous n arguments and put returned value in i3. |
CALLR | n | L2 | r3 | call real function L2 using the previous n arguments and put returned value in r3. |
Procedure, Function, and Main Program Returns | ||||
RET | return from a procedure. | |||
RETB | b1 | return from a Boolean function with b1 as the returned value. | ||
RETI | i1 | return from an integer function with i1 as the returned value. | ||
RETR | r1 | return from a real function with r1 as the returned value. | ||
EXIT | exit from main program. |
Kenneth E. Batcher - 9/17/2001