


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
An assembly language code snippet that builds a bit-string set from a given character string. Each bit in the bit-string corresponds to a letter, and is set to 1 if the letter is in the set, and 0 otherwise. The code uses a loop to iterate through each character in the string and sets the corresponding bit in the bit-string based on its ascii value.
Typology: Exercises
1 / 4
This page cannot be seen from the preview
Don't miss anything!
'Z' 'Y' 'X'... 'E' 'D' 'C' 'B' 'A'
bit position: (^25 24 23 4 3 2 1 )
{ 'A', 'B', 'D' } is 0 0 0 0 0 0 0 0 0 0 1 0 1 1
unused
: r
Complete the following code that uses the NULL-terminated character STRING in memory to build the corresponding set of letters in r5.
AREA SHIFT_AND_LOGIC, CODE, READONLY ENTRY MOV r4, #'A' ; MOVE ASCII VALUE OF 'A' MOV r5, #0 ; r5 IS THE EMPTY SET INITIALLY MOV r0, #1 ; r0 HOLDS 1 TO BE SHIFTED TO BUILD THE MASK ADR r6, STRING WHILE
Over simplified idea of branching hardware: