Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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=
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Principles Programming And Performance

Authors: Patrick O'Neil

1st Edition

1558603921, 978-1558603929

More Books

Students also viewed these Databases questions

Question

Define Administration?

Answered: 1 week ago

Question

Which form of proof do you find most persuasive? Why?

Answered: 1 week ago