


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An overview of assembly language, its importance in computer organization, and the process of translating assembly language code into machine language. The basics of assembly language instructions, pseudo-ops, and the use of labels. It also explains the two-pass assembly process and the role of the symbol table. Wright state university's ceg 320/520 comp. Org. & assembly course is discussed as an example.
Typology: Study notes
1 / 4
This page cannot be seen from the preview
Don't miss anything!



LC-3 Assembly Language Wright State University, College of Engineering Dr. Doom, Computer Science & Engineering CEG 320/520 Comp. Org. & Assembly 2
You’ve got to know assembly Chances are, you’ll never write program in assembly
Assembly language makes it possible to write Machine Language code
Formats
0102 ;; Program to multiply an integer by the number 6 03 ; 0405 .ORIGLD x3050R1, SIX 06 LD R2, NUMBER (^0708) ; AND R3, R3, #0 ; clear R3 to hold the product 09 ; The inner loop 0A 0B ;AGAIN ADD R3, R3, R 0C ADD R1, R1, #- 1 ; keep track of iterations 0D 0E BRp; AGAIN 0F HALT 1011 ;NUMBER .BLKW 1 12 SIX .FILL x 1314 ; .END
Wright State University, College of Engineering Dr. Doom, Computer Science & Engineering CEG 320/520 Comp. Org. & Assembly 7
.ORIG x AND R1, R1, # ADD R1, R1, # LD R2, Twenty LD R3, Ess HALT Twenty FILL x .BLKW 2 Ess .FILL “S” .STRINGZ “Hi” .BLKW 3 .END x3000: AND R1, R1, 0 0000 x3001: ADD R1, R1, 0 1010 x3002: LD R2, 0 0000 0010 x3003: LD R3, 0 0000 0100 x3004: TRAP 0010 0101 x3005: 0000 0000 0001 0100 ; x x3006: x3007: x3008: 0000 0000 0101 0011 ; x0053 = ‘S’ x3009: 0000 0000 0100 1000 ; x0048 = ‘H’ x300A: 0000 0000 0110 1001 ; x0069 = ‘i’ x300B: 0000 0000 0000 0000 ; x0000 = null terminator x300C: x300D: x300E: Wright State University, College of Engineering Dr. Doom, Computer Science & Engineering CEG 320/520 Comp. Org. & Assembly 8
Objective
Wright State University, College of Engineering Dr. Doom, Computer Science & Engineering CEG 320/520 Comp. Org. & Assembly 19
7.1, 7.2 ( tricky ), 7.4, 7.5, 7.