Write a program in lc-3 machine language


The purpose of this assignment is to write a program in LC-3 machine language code to add two unsigned numbers and store the result back in memory. The two unsigned numbers are specified in memory location x3100 as follows - 
Bits [15:8] - First number 
Bits [7:0] - Second number 
Your program should store the result of the specified operation in memory location x3101. 

Note: Unsigned numbers are always positive. That is, with 8 bits we can represent unsigned 
integers from 0 to 255. 
Example: If the memory location x3100 contains the word 0000111111111100, then your program should add 15 and 252 and store the value 267 (100001011) in memory location x3101. 
Hint1: Use bit masks 0x00FF and 0xFF00 to separate the two 8-bit numbers. 
Hint2: What happens when you add a number to itself? For example, 0001110001101100 + 
0001110001101100 = 0011100011011000 
Notes: 
• The first line of your program must specify the memory address of the first instruction of your program. The LC-3 simulator will place your program starting at that address. For this assignment, you should place your program starting at x3000 (i.e. the first line of your program should contain the bit pattern 0011000000000000). 

Request for Solution File

Ask an Expert for Answer!!
Assembly Language: Write a program in lc-3 machine language
Reference No:- TGS083100

Expected delivery within 24 Hours