Presentation is loading. Please wait.

Presentation is loading. Please wait.

L Load Fullword.

Similar presentations


Presentation on theme: "L Load Fullword."— Presentation transcript:

1 L Load Fullword

2 L Instruction type: RX Explicit Coding: R1,D2(X2,B2)
Example L ,3(4,5) Example L ,TABLE(R7) Use: The word (4 bytes) at the operand 2 address is loaded into the operand 1 register

3 What does it do? L R8,Y R8 00 12 3D 8A (Before) R8 F5 F6 F7 F8 (After)
Memory F1 F2 F3 F4 F5 F6 F7 F8 F9 Y

4 What does it do? L R8,Y(9) R8 00 12 3D 8A R9 00 00 00 04 R8
(Before) R8 D 8A R9 R8 F6 F7 F8 F9 (After) Memory F1 F2 F3 F4 F5 F6 F7 F8 F9 Y

5 What does it do? L R7,4(R8,R9) R8 00 00 20 00 R9 00 00 10 00 R7
(Before) R8 R9 R7 FF FF FF FF (After) Memory X’3000’ X’3004’

6 What does it do? L R7,4 R7 12 34 56 78 (Before)
This effective address is 4. Executing this instruction causes a protection exception (SOC 4) since we are referencing storage that is outside of our assigned region.

7 L Example Example use: Assume: TABLE DC F ‘1’ Assume address 1000
You execute: LA R7,TABLE L R8,0(R0,R7) L R9,4(R0,R7) L R10,8(R0,R7) R8 After: R9 After: R10 After:

8 Programming Tips It’s easy to make a simple mistake by coding L for LA or LA for L. Give it a moment’s extra thought when you code these. Do you want an address (LA)? Or do you want the contents at an address (L)?

9 Try it in VisibleZ Try the following programs: l.obj l1.obj l2.obj


Download ppt "L Load Fullword."

Similar presentations


Ads by Google