Download presentation
Presentation is loading. Please wait.
Published byIsabelle Duval Modified over 5 years ago
1
Program Pass I LC Symbol Table Pass II Machine Code ORG $400 Put $400 into LC 0000 START MOVE.W VALUE1,D0 Put START in symbol table and assign it $400. Increment LC by 6. 0400 START = $0400 Assemble opcode, get address for VALUE1 from symbol table. Increment LC. ADD.W VALUE2,D0 Increment LC by 6. 0406 Assemble opcode, get address for VALUE2 from symbol table. Increment LC. D MOVE.W D0,RESULT 040C Assemble opcode, get address for RESULT from symbol table. Increment LC. 33C A STOP #$2700 Increment LC by 4. 0412 Assemble opcode. Increment LC. 4E VALUE1 DC.W 8 Put VALUE1 in symbol table and assign it $ Increment LC by 2. 0416 VALUE1 = $0416 Increment LC. 0008 VALUE2 DC.W Put VALUE2 in symbol table and assign it $ Increment LC by 2. 0418 VALUE2 = $0418 0010 RESULT DS.W 1 Put RESULT in symbol table and assign it $041A. Increment LC by2. 041A RESULT = $041A END START End of Pass1. Reset LC to 0. 041C End Pass 2. [Set PC to START]
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.