Professional Documents
Culture Documents
- An FEND instruction indicates the first end of a main program and the
start of the program area to be used for subroutines. Commonly used:
CJ-P-FEND, CALL-P-SRET.
C.B. Pham 5-6
5.1. Program flow
- The contents of the source device (S) is copied to the destination (D)
device when the control input is active. If the MOV instruction is not
driven, no operation takes place.
• ADD: Addition
• SUB: Subtraction
• MUL: Multiplication.
- When operating the MUL instruction in 16bit mode, two 16 bit data
sources are multiplied together. They produce a 32 bit result.
- The device identified as the destination address is the lower of the
two devices used to store the 32 bit result.
- Example: 5 (D0) × 7 (D2) = 35 - The value 35 is stored in (D4, D5)
C.B. Pham 5-17
5.3. Arithmetic and logical operations
• DIV: Division
- [S1] [S2]: When operating the DIV instruction in 16bit mode, two 16
bit data sources are divided into each other. They produce two 16 bit
results. The device identified as the destination address is the lower of
the two devices used to store the these results.
C.B. Pham 5-18
5.3. Arithmetic and logical operations
• INC: incremented by 1
• DEC: decremented by 1