Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The stringcmp.c describes a MISRA - C compliant implementations on ARM LPC 1 7 xx processor. Please write an ARM assembly language to implement the

The stringcmp.c describes a MISRA-C compliant implementations on ARM LPC17xx processor. Please write an ARM assembly language to implement the code. If you use any registers other than r0-r3, you need to save them in the stack, (using instructions push {r4-r7}, for example to save registers r4, r5, r6, and r7, pop{r4-r7) is the instruction to restore them). In your main.c function, please run the stringcmp results for the following strings.
stringcmp("abc", "def")0
stringcmp("abc", "abcd")0// null character is less than 'd'
stringcmp("abc", "ABC")>0//'a'>'A' in ASCII
stringcmp("abc", "abc")==0
The C code in main.c looks like this,
printf("comparions abc def %4d
", stringcmp("abc","def"));
printf("comparions abc abcd %4d
", stringcmp("abc","abcd"));
printf("comparions abc ABC %4d
", stringcmp("abc","ABC"));
printf("comparions abc abc %4d
", stringcmp("abc","abc"));
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Ability to work comfortably in a team environment

Answered: 1 week ago