Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please do this arm programing assignment Description: In this lab, you are given a string in memory, and you must search through the string to

please do this arm programing assignmentimage text in transcribedimage text in transcribed

Description: In this lab, you are given a string in memory, and you must search through the string to find the ASCII characters "HELP" in order, though not necessarily sequentially. The address of the first time each character is found should be stored in registers r4, r5 r6, and r7 (the first 'H' instance in r4, the first 'E' instance in r5, etc.). If and only if all the letters are found in order, the string is considered valid, and the address of the first instance of 'H' should also be stored in ro. If the letters are not found in order, Ox00 should be stored in rO instead. To make life easier for you, the string will be null terminated (will end with a 0 character). The program will terminate when the "P" is found or when the null terminator is reached, whichever comes first. Example: If the searched string started at 0x800 and read: "HQEQLQPQ" 0x800 should be stored in ro at the end of the program. However, if the string read "PLEHEL", nothing will be stored in ro. Code Given: For this lab, you are given an outline (that you may choose not to use) of the entire program. The program utilizes branches, which you should be familiar enough with to utilize the given code: AREA Lab4, CODE, ALIGN=2 ENTRY FindH BEQ Finde if 'H' is found, branch to the E finder BNE FindH BEQ STOP FindE if O terminator not found, keep searching for H if O terminator found, branch to stop BEQ FindL ;if 'E' is found, branch to the L finder BNE FindE BEQ STOP FindL if 0 terminator not found, keep searching for E if O terminator found, branch to stop BEQ FindP ;if 'L' is found, branch to the P finder BNE Findl BEQ STOP ;if O terminator not found, keep searching for L if O terminator found, branch to stop FindP BEQ STOP ;if 'P' is found, branch to the stop BNE FindP BEQ STOP ;if O terminator not found, keep searching for P ;if O terminator found, branch to stop STOP B STOP AREA asm_data, DATA, READONLY TEST_DATA DCB "psdfnOLHHNOHDP[[HELkhjxvcphelHELLPPPHELP",0 END You have completed this lab when: Demonstrate your program to the laboratory instructor and show the instructor that your program correctly stores the appropriate addresses in the appropriate registers for several strings. Description: In this lab, you are given a string in memory, and you must search through the string to find the ASCII characters "HELP" in order, though not necessarily sequentially. The address of the first time each character is found should be stored in registers r4, r5 r6, and r7 (the first 'H' instance in r4, the first 'E' instance in r5, etc.). If and only if all the letters are found in order, the string is considered valid, and the address of the first instance of 'H' should also be stored in ro. If the letters are not found in order, Ox00 should be stored in rO instead. To make life easier for you, the string will be null terminated (will end with a 0 character). The program will terminate when the "P" is found or when the null terminator is reached, whichever comes first. Example: If the searched string started at 0x800 and read: "HQEQLQPQ" 0x800 should be stored in ro at the end of the program. However, if the string read "PLEHEL", nothing will be stored in ro. Code Given: For this lab, you are given an outline (that you may choose not to use) of the entire program. The program utilizes branches, which you should be familiar enough with to utilize the given code: AREA Lab4, CODE, ALIGN=2 ENTRY FindH BEQ Finde if 'H' is found, branch to the E finder BNE FindH BEQ STOP FindE if O terminator not found, keep searching for H if O terminator found, branch to stop BEQ FindL ;if 'E' is found, branch to the L finder BNE FindE BEQ STOP FindL if 0 terminator not found, keep searching for E if O terminator found, branch to stop BEQ FindP ;if 'L' is found, branch to the P finder BNE Findl BEQ STOP ;if O terminator not found, keep searching for L if O terminator found, branch to stop FindP BEQ STOP ;if 'P' is found, branch to the stop BNE FindP BEQ STOP ;if O terminator not found, keep searching for P ;if O terminator found, branch to stop STOP B STOP AREA asm_data, DATA, READONLY TEST_DATA DCB "psdfnOLHHNOHDP[[HELkhjxvcphelHELLPPPHELP",0 END You have completed this lab when: Demonstrate your program to the laboratory instructor and show the instructor that your program correctly stores the appropriate addresses in the appropriate registers for several strings

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

Students also viewed these Databases questions

Question

What is Indian Polity and Governance ?

Answered: 1 week ago