Back Next
Base indexed displacement
L R1,23(R2,R3) - IBM 360 base (index) displacement.
R2 is treated as an index
R3 is the base pointer.
23 is a hard coded displacement.
The contents of both registers and the displacement are added
to arrive at the memory location to access.
This is a register indirect address by another name.
Implied
Implied (6502)
CLC - clears the carry flag in the condition code register.
Implied combined with base displacement (IBM 360)
LPSW 422(R0) - Implied displacement.
Loads the program status with the value found in memory 422
The status register is implied by the opcode.
IBM 360 usually requires destination operand.
Immediate
Immediate (6502)
LDA #23 - copy the value 23 into the accumulator.
Immediate (IBM 360)
LA R1,41(0) - IBM 360 does not support pure immediate, however it is
possible to use base displacement with r0.
Immediate base displacement (IBM 360)
MVI 42(R15),C'$'
Move the value '$' into a specified memory location.
The binary value for '$' symbol is store as 2nd byte of instruction.
ICM R1,B'1001'M,23(R2) - fetches 1st and 4th byte from the memory
block starting at the address specified by 23(R2). B'1001' is used
as a mask (but it is an operand immediately available upon fetching
of the complete instruction.
Register and Direct
Register
L R1,R2 (IBM 360) - copy contents of r2 to r1
TAX (6502) - copy contents of accumulator to the x register, also
qualifies as an implied because instruction is only an opcode.
Direct (6502)
Zero page - LDA $23 - two byte instruction that copies the byte
contents of memory location $23 into the accumulator.
Absolute - LDA $1243 - three byte instruction that copies the byte
contents of memory location $1243 into the accumulator.
Direct (8088)
Near - JMP 0423 - 2 byte @ in current code segment. Current
contents of segment register implied.
Far - JMP 0120:0423 - 4 byte actual address
01200h + 0423h = 01623h (a 20 bit address)
Looped base displacement
MVC D1(L,B1),D2(B2)
Moves a block memory from one location to another.
Source and destination @ specified as base displacement @s.
But an additional immediate value L is used to initialize an unnamed
counter register.
Length between 1 and 256 bytes.
May be considered a system level instruction.
Indexed instructions
LDA $23,x
Accesses the memory x bytes past memory @ 23.
LDA ($23),y
EA = 2 byte address stored in memory 23 & 24 + content of y register.
LDA ($23,x)
EA = 2 byte address found x bytes past memory @ 23. (table of @)