string labs

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/3

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

4 Terms

1
New cards
<p></p>

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

2
New cards
term image

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

3
New cards

__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

4
New cards
<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>

__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