Arm assembly language program to remove the word "the" from a string. Uses big endian 7. IDE is Keil u version 4. uses spaces not tabs. can only be 30 lines. All other info in the doc
The programming style is essential in assembly language. It is expected to do the following in your programs:
Using the EQU directive to give a symbolic name to a numeric constant to make it more readable.
Applying neat spacing and code organization (do not use TABS, instead use SPACES).:
Assembly language source code should be arranged in three columns: label, instruction, and comments: the label field starts at the beginning of the line, the instruction field (opcodes + operands) starts at the next TAB stop, and the comments are aligned in a column on the right. Using appropriate label names.
Â
Commenting on each assembly line Commenting on each logical part of your code.
Great Ways to Lose Marks.
Not appropriately using spaces to lineup your program.
Not appropriately using EQU to make your code more readable.
Not appropriately using labels to make your code more readable.
Not bothering to comment on your code
Commenting the code by just stating what youâre doing, instead of why, e.g.,
MOV r0, #5 ;move 5 into r0
Not grouping your lines into logical ideas.
Not paying attention to the programming style (see the previous paragraph)
Not optimizing your code by using unnecessary assembly instructions. The more instructions in your program, the less your mark will be. Handing in your code as soon as it assembles, without testing and validating your code Copyright © 2021 Mahmoud El-Sakka.
1. A string is an array representing a sequence of characters. To store a string of n characters in your program, you need to set aside n+1 bytes of memory. This allocated memory will contain the stringâs characters plus one extra unique characterâthe null characterâto mark the stringâs end. The null character is a byte whose bits are all zeros (0x00). The actual string consists of any group of characters, which none of them can be the null character.
2. Write an ARM assembly language program to copy a null-terminated STRING1 to a null-terminated STRING2, after removing any occurrences of the word âtheâ (case sensitive) in STRING1. I.e., if STRING1 is âthe woman and The man said theâ then STRING2 would become, â woman and The man said â.
However, if STRING1 is âand they took breatheâ then STRING2 would become âand they took breatheâ without any change. You can assume that STRING2 will be less than 127 characters. Your code should be highly optimized. Use as few instructions as possible (as little as 30 assembly instructions only, NOT including any assembly directives or data definitions)!!.
3. Define the data of this program in a separate DATA area.
4. Define the strings as follow:
STRING1 DCB âand the man said they must goâ;String1
EoS DCB 0x00 ;end of string1
STRING2 space 0x7F ;just allocating 127 bytes
More test cases:
âthe the the 123 theâ ?â 123 â
âthe, the the 123 the.â ?âthe, 123 the.â
ââ ? ââ
âtheâ ? ââ
âTheâ ? "The"
âthem the the1â ? âthem the1â
â4the the 4the The the the1â ?â4the 4the The the1â
ASCII Table
â0â ? 0x30
â1â ? 0x31
â2â ? 0x32
â8â ? 0x38
â9â ? 0x39
âAâ ? 0x41
âBâ ? 0x42
âCâ ? 0x43
âDâ ? 0x44
âEâ ? 0x45
âFâ ? 0x46
âXâ
0x58
âYâ
0x59
âZâ 0x5A