Skip to main content

Select Listing of IBM Mainframe Instructions Useful to Know

Flow of control instructions - provide tests and branches to alter which instruction is fetched and executed next often based on an operation instruction; note that all of the instructions below are extended mnemonics of BC - Branch of Condition.

Instruction Description
B addr Branch - unconditional branch to addr
Used in examples in Modules 3, 5.
BH addr Branch High - conditional branch to addr if greater than
BL addr Branch Low - conditional branch to addr if less than
BE addr Branch Equal - conditional branch to addr if equal to
BNH addr Branch Not High - conditional branch to addr if less than or equal to
BNL addr Branch Not Low - conditional branch to addr if greater than or equal to
BNE addr Branch Not Equal - conditional branch to addr if not equal to
BP addr Branch Positive - conditional branch to addr if result > 0
BM addr Branch Minus - conditional branch to addr if result < 0
BZ addr Branch Zero - conditional branch to addr if result = 0
BO addr Branch Overflow - conditional branch to addr if overflow
BNP addr Branch Not Positive - conditional branch to addr if result <= 0
BNM addr Branch Not Minus - conditional branch to addr if result >= 0
BNZ addr Branch Not Zero - conditional branch to addr if result != 0
BNO addr Branch No Overflow - conditional branch to addr if no overflow

Data movement instructions - moves data in registers and/or memory.

Instruction Description
ICM Insert characters under mask
L Load
LA Load address
LH Load half-word
LHI Load half-word immediate
LTR Load and test register (set condition code)
LR Load register (no change to condition code)
MVC Move characters
MVCL Copy or fill consecutive bytes of memory
MVI Move immediate
ST Store data from register to memory
STCM Store character data from register to memory, using a mask

Operation instructions - performs arithmetic and logic operations on data and sets condition codes used in conditional branches.

Instruction Description
A Add
AH Add signed half-word
AP Add packed decimal number to a packed decimal number
AR Add registers
CH Compare signed half-word
CLC Compare logical characters
CLI Compare Logical Immediate
CLCL Compare character long
CP Compare packed decimal number to packed decimal number
CR Compare signed value in Registers
D Divide
DP Decimal integer division (in packed decimal)
MP Multiply packed decimal number to a packed decimal number
OI Logical OR of a byte
S Subtract
SH Subtract signed half-word
SP Subtract packed decimal number from a packed decimal number
SR Subtract registers
SRP Shifts digits of packed decimal number
XR Exclusive or
ZAP Set packed decimal number to 0 and then add another packed decimal number (so basically a move)

Data type conversion instructions - converts data from one format to another.

Instruction Description
CVB Convert packed decimal number to signed binary integer
CVD Convert signed binary integer to packed decimal number
PACK Convert zoned decimal number to packed decimal number
UNPK Convert packed decimal number to zoned decimal number

Assembler instructions - instructions to the assembler that are not converted to machine instructions but used during the process of assembling.

Instruction Description
USING Specifies which register to use as the base register in a program
DROP Assembler instruction to undefine previous USING instruction