1 / 9

L Load Fullword

L Load Fullword. L. Instruction type: RX Explicit Coding: R1,D2(X2,B2) Example L 5,3(4,5) Example L 8,TABLE(R7) Use: The word (4 bytes) at the operand 2 address is loaded into the operand 1 register. What does it do?. L R8,Y. R8. 00 12 3D 8A (Before).

shawna
Download Presentation

L Load Fullword

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. LLoad Fullword

  2. L • Instruction type: RX • Explicit Coding: R1,D2(X2,B2) • Example L 5,3(4,5) • Example L 8,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) (Before) R8 00 12 3D 8A R9 00 00 00 04 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) (Before) R8 00 00 20 00 R9 00 00 10 00 R7 FF FF FF FF 22 33 44 55 (After) 00 00 00 11 22 33 44 55 66 Memory X’3000’ X’3004’

  6. What does it do? L R7,4 (Before) R7 12 34 56 78 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 DC F ‘2’ DC F ‘3’ 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: 00000001 00000002 00000003

  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

More Related