1/3
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.

Write an assembly program to copy the a string from one memory location to another

Write an assembly program to copy the a string from one memory location to another
__main PROC
LDR r0, =string
LDR r1, =string
loop LDRB r2, [r1], #1
CMP r1, #0
BEQ end
CMP r2, #'a'
BEQ loop
CMP r2, #'U'
BEQ loop
STRB r2, [r0], #1
B loop
end
MOV r2, #0
STRB r2, [r0]
stop B stop
ENDP
ALIGN
AREA myData, DATA, READWRITE
ALIGN
string DCB 'String', 0
END
Write an assembly program that removes all vowel letters (a, e, i, o, u, A, E, I, O, U) from a string. Take “An apple a day” as a test string
![<p>__main PROC</p><p> LDR r0, =string </p><p> LDR r1, =string </p><p>loop LDRB r2, [r1], #1</p><p> CMP r1, #0 </p><p> BEQ end</p><p> CMP r2, #'a'</p><p> BEQ loop</p><p> </p><p> CMP r2, #'U'</p><p> BEQ loop </p><p> STRB r2, [r0], #1 </p><p> B loop</p><p>end </p><p> MOV r2, #0 </p><p> STRB r2, [r0]</p><p>stop B stop </p><p> </p><p> ENDP</p><p> </p><p> ALIGN </p><p> AREA myData, DATA, READWRITE</p><p> ALIGN</p><p>string DCD 'String', 0</p><p> END</p><p></p>](https://knowt-user-attachments.s3.amazonaws.com/9821297d-7f78-43ce-afde-89de6a4dafde.png)
__main PROC
LDR r0, =string
LDR r1, =string
loop LDRB r2, [r1], #1
CMP r1, #0
BEQ end
CMP r2, #'a'
BEQ loop
CMP r2, #'U'
BEQ loop
STRB r2, [r0], #1
B loop
end
MOV r2, #0
STRB r2, [r0]
stop B stop
ENDP
ALIGN
AREA myData, DATA, READWRITE
ALIGN
string DCD 'String', 0
END
Write an assembly program that removes all vowel letters (a, e, i, o, u, A, E, I, O, U) from a string. Take “An apple a day” as a test string