Class REM
java.lang.Object
bec.instruction.Instruction
bec.instruction.REM
S-INSTRUCTION: REM.
arithmetic_instruction ::= rem (dyadic) Remainder, defined as "SOS - (SOS//TOS)*TOS". Syntax and semantics as for mult except that INT is the only legal type.
Note that SIMULA demands "truncation towards zero" for integer division. Thus (except for a zero remainder) the result of rem has the same sign as the result of the division. In more formal terms:
i div j = sign(i/j) * entier(abs(i/j))
i rem j = i - (i div j) * j
where '/' represents the exact mathematical division within the space of real numbers.
Link to GitHub: Source File.
- Author:
- S-Port: Definition of S-code, Øystein Myhre Andersen
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidofScode()Scans the remaining S-Code (if any) belonging to this instruction.Methods inherited from class Instruction
inInstruction, inInstructions
-
Constructor Details
-
REM
public REM()Default Constructor
-
-
Method Details
-
ofScode
public static void ofScode()Scans the remaining S-Code (if any) belonging to this instruction. Perform the specified stack operations (which may result in code generation). Finally: Emit an SVM_REM instruction.
-