Question: arm assembler programming Description: In this lab, you are given a string in memory, and you must search through the string to find the ASCII

arm assembler programming

arm assembler programming Description: In this lab, you are given a stringin memory, and you must search through the string to find the

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 r0 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 BEO STOP ;if O terminator not found, keep searching for H ;if O terminator found, branch to stop FindE BEQ Findl ;if 'E' is found, branch to the L finder BNE Finde BEQ STOP FindL ;if O 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 r0 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 BEO STOP ;if O terminator not found, keep searching for H ;if O terminator found, branch to stop FindE BEQ Findl ;if 'E' is found, branch to the L finder BNE Finde BEQ STOP FindL ;if O 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

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!