Get Instant Help From 5000+ Experts For
question

Writing: Get your essay and assignment written from scratch by PhD expert

Rewriting: Paraphrase or rewrite your friend's essay with similar meaning at reduced cost

Editing:Proofread your work by experts and improve grade at Lowest cost

And Improve Your Grades
myassignmenthelp.com
loader
Phone no. Missing!

Enter phone no. to receive critical updates and urgent messages !

Attach file

Error goes here

Files Missing!

Please upload all relevant files for quick & complete assistance.

Guaranteed Higher Grade!
Free Quote
wave
ARM Assembly Language Program to Remove the Word 'the' from a String
Answered

Programming Style

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

support
Whatsapp
callback
sales
sales chat
Whatsapp
callback
sales chat
close