Question: Exercises Q 1 ) Write an assembler code to reverse string x in order; use LODSB and STOSB strings; where x DB HELLO WORLD' x

Exercises
Q1) Write an assembler code to reverse string x in order; use LODSB and STOSB strings; where x DB HELLO WORLD'
x DB 'HELLO WORLD'
y DB 11 Duo(?)
Q2) Write an assembler codes to scan string x for * character ; replacing it by space.
x DB 'ABC**+GFDK****KLM'
Q3) write an assembler codes to find factorial of values in x memory locations; storing the result into Y memory locations; call a procedure to find factorial of numbers in x; where :
Q4) Write a sequence of instructions using (LODSB and STOSB) that copy each alphabet from X string to Y string, converting it to lowercase . Note: setting bit 5 in an uppercase character will convert it to lowercase
X DB 'ABCDEFGHI'
Y DB LENGTHOF X DUP(0)
The value of Y after executing the following code is:
X DB 4
Y DB
MOV CX,2
L: CALL SUM
LOOP L
MOV Y, AL
HLT
SUM PROC
MOV AH, X
ADD AL, AH
RET
SUM ENDP
Y=
What is the value of Cx after execution the following codes?
STR DB "ABCDE"
MOV DI, OFFSET STR
MOV CX,5
MOV AL,'C
REPNE SCASB
Cx=
What is the value of AL after execution the following codes?
X DB "ABCDE"
Y DB "ABHDE"
MOV SI,OFFSET Y
MOV DI,OFFSET X
MOV CX,5
REPE CMPSB
LODSB
AL=
4. The values of array Y after executing the following code is:
XDB 'ASSEMBLY'
YDB5 DUP('*')
STD
MOV SI, OFFSET X+3
MOV DI, OFFSET Y+4
MOV CX,3
REP MOVSB
MOV AX,'?#'
STOSB
Y=
The value of Ax after executing the following code is:
ARRAY DB8,3,2,4
STC
MOV AL,0
MOV CX,4
MOV SI, OFFSET ARRAY
L: ADC AL,[SI]
ADD SI,1
LOOP L
AX=
 Exercises Q1) Write an assembler code to reverse string x in

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!