Step 1: Create a new ASSEMBLY project using Keil Software (1) Make sure you use the M3 option (2) Make sure you name the folder "COSC2440_Lab08 YourFirstName_YourLastName" Step 2: "Write an ARM...


Please use Assembly File and please read the instructions given down below AND SEE WHAT YOU CAN USE ONLY IN THIS ONE.


Step 1: Create a new ASSEMBLY project using Keil Software<br>(1) Make sure you use the M3 option<br>(2) Make sure you name the folder

Extracted text: Step 1: Create a new ASSEMBLY project using Keil Software (1) Make sure you use the M3 option (2) Make sure you name the folder "COSC2440_Lab08 YourFirstName_YourLastName" Step 2: "Write an ARM assembly language program that counts the number of l's for any value in RO. The program must assemble/compile in KEIL and must be able to run in the KEIL simulator. Generally, RO may contain any value, but for purpose of this exercise, you may move O×2345ABCD into RO. The number in RO does not need be preserved. You may use any other registers as you need. The result, total count of 1's in RO, should be in R1 when the program ends. " UHCL: Unwala CENG 3371Microcontroller Programming Spring 2017 Step 3: Copy the template below to your assembly file AREA Lab_08 YourFirstName_YourLastName, CODE, READONLY EXPORT_main _main LDR RO, =0X2345ABCD; This is how you assign large value to RO. MOV will NOT work! stop B stop END Step 3: Change YourFirstName to your first name. Change YourLastName to your last name. Step 4: You are allowed to use ONLY the instructions below: Pay attention: This is different than Lab 07! 1. LDR[*] 2. MOV[*] 3. В"1 4. ADC[*] 5. LSR[*] What does [*) means? This means that you may use any combination of the given instruction. Example: LDR[*] means that you may use LDR or LDRLE or LDREQ or LDRS or any other combinations. You may use Keil ARM documentation to learn about any of the instructions listed above. http://www.keil.com/support/man/docs/armasm/armasm dom1361289850039.htm Step 5: Results: Hexadecimal: O×2345ABCD Decimal: 591,768,525 Binary: 10 0011 0100 0101 1010 1011 1100 1101 The expected result will be 16 [Count # of 1 in the Binary Value above] R1 should be 0x00000010 Step 6: Hints. 1. The tricks in solving this lab are dealing with flags and carry! 2. You will need to use one loop 3. Use Windows Calculator to convert between hexadecimal to binary to save yourself time as shown in previous labs.
Jun 03, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here