Question: IN ARM CORTEX M3 ASSEMBLY 1. (10 marks) Write a function in assembly language named int_to_ascii which will extract the signed integer passed in R9

 IN ARM CORTEX M3 ASSEMBLY 1. (10 marks) Write a function

IN ARM CORTEX M3 ASSEMBLY

1. (10 marks) Write a function in assembly language named int_to_ascii which will extract the signed integer passed in R9 and convert it to a null-terminated ASCII string representing the value of the integer in decimal. For example, passing 0xc0010010 should create the ASCII string "-1073676272". Note the following: the input value is stored in binary, in a register. I'm only showing it in hexadecimal for convenience, which is the only reason anyone ever uses hexadecimal the output value does not include the double quotes the output value must be terminated with a null byte so it actually will occupy 12 bytes Here are some more examples of correct conversions input 34 -34 0x34 output actual hex bytes 20 33 34 00 2d 33 34 00 20 35 32 00 " 52" You should insert a minus sign (-) if the input is negative, and leave a single space otherwise You are required to allocate a sufficiently large RAM buffer to store the string and its terminating null byte. The buffer must start at location 0x2000 0030 Your function should return the address of the converted string in register R10 1. (10 marks) Write a function in assembly language named int_to_ascii which will extract the signed integer passed in R9 and convert it to a null-terminated ASCII string representing the value of the integer in decimal. For example, passing 0xc0010010 should create the ASCII string "-1073676272". Note the following: the input value is stored in binary, in a register. I'm only showing it in hexadecimal for convenience, which is the only reason anyone ever uses hexadecimal the output value does not include the double quotes the output value must be terminated with a null byte so it actually will occupy 12 bytes Here are some more examples of correct conversions input 34 -34 0x34 output actual hex bytes 20 33 34 00 2d 33 34 00 20 35 32 00 " 52" You should insert a minus sign (-) if the input is negative, and leave a single space otherwise You are required to allocate a sufficiently large RAM buffer to store the string and its terminating null byte. The buffer must start at location 0x2000 0030 Your function should return the address of the converted string in register R10

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!