Omron CPM1 Programming Manual page 296

Hide thumbs Also See for CPM1:
Table of Contents

Advertisement

Indirect Addressing
Designating Constants
The Flags subsection lists flags that are affected by execution of an instruction.
These flags include the following SR area flags.
Abbreviation
ER
Instruction Execution Error Flag
CY
Carry Flag
GR
Greater Than Flag
EQ
Equals Flag
LE
Less Than Flag
ER is the flag most commonly used for monitoring an instruction's execution.
When ER goes ON, it indicates that an error has occurred in attempting to
execute the current instruction. The Flags subsection of each instruction lists
possible reasons for ER being ON. ER will turn ON if operands are not entered
correctly. Instructions are not executed when ER is ON. A table of instructions
and the flags they affect is provided in Appendix B Error and Arithmetic Flag Op-
eration .
When the DM area is specified for an operand, an indirect address can be used.
Indirect DM addressing is specified by placing an asterisk before the DM:
When an indirect DM address is specified, the designated DM word will contain
the address of the DM word that contains the data that will be used as the oper-
and of the instruction. If, for example,
erand and LR 00 as the second operand of MOV(21), the contents of DM 0001
was 1111, and DM 1111 contained 5555, the value 5555 would be moved to
LR 00.
MOV(21)

DM 0001
LR 00
When using indirect addressing, the address of the desired word must be in BCD
and it must specify a word within the DM area. In the above example, the content
of DM 0001 has to be in BCD and has to specify an address in the DM area of the
PC being used. (Refer to Section 5 Memory Areas for DM area details.)
Although data area addresses are most often given as operands, many oper-
ands and all definers are input as constants. The available value range for a giv-
en definer or operand depends on the particular instruction that uses it.
Constants must also be entered in the form required by the instruction, i.e., in
BCD or in hexadecimal.
Name

DM 0001 was designated as the first op-
Word
Content
DM 0000
4C59
DM 0001
Indirect
DM 0002
F35A
address
DM 1111
DM 1113
DM 1114
D541
Section
7-3
Bit
25503
25504
25505
25506
25507

DM.
1111
Indicates
DM 1111.
5555
2506
5555 moved
to LR 00.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Srm-v2Cpm1aCpm2aSrm1Cpm2c

Table of Contents