Write an assembly code that does the following Read the cont

Write an assembly code that does the following: Read the content of the memory location at 0 times 2000 0008 to R1, and R2=0 times 00 If R1 is a negative number, then shift the content of R1 2 bits to the left (LSL 2 bits), and increment R2 by 1. Then loop back to step ii. If R1 is a positive number, then push R1 to the processor stack and stop the program If R1 is zero, increment R1 by 5 then push R1 and pop R2. Then stop the program Explain what are the possible values for R2 after the program ends Explain what would have been the possible values for R2, if LSR was used instead of LSL

Solution

Before going on to discuss the five steps of creating a program it is important to determine what exactly a program is. A program is a list of instructions that contain data for a computer to follow. Different programs are written with different languages. An editing program is made with a different programming \"language\" than one that uses graphics. Some well known programming languages are COBOL -business, BASIC -language, and - C which is used in science. Programming is complicated process,

 Write an assembly code that does the following: Read the content of the memory location at 0 times 2000 0008 to R1, and R2=0 times 00 If R1 is a negative numbe

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site