Question: 3. We want to code a single instruction that inverts bits 5 and 6 in BL without changing any other bits. Which of the following
3. We want to code a single instruction that
inverts bits 5 and 6 in BL without changing any
other bits. Which of the following does the job?
(a) XOR bl,60h
(b) OR bl,60h
(c) AND bl,60h
(d) ADD bl,60h
W e w a n t t o c o d e
a single instruction that
inverts bits 5 and 6 in BL without changing any
other bits. Which of the following does the job?
(a)
XOR bl,60h
(b)
OR bl,60h
(c)
AND bl,60h
(d)
ADD bl,60h
4.
G i v e n t h e f o l l o w i n g
H i g h L e v e l
L a n g u a g e s t a t e m e n t s .
M a i n ( )
{
I n t a = 1 4
;
I n t b = 3 0
;
S U B T ( a , b )
}
S U B T ( i n t x , i n t y )
{
R e t u r n ( y
-
x)
}
A s s u m e t h a t p a r a m e t e r s a r e p a s s e d o n
t o
t h e
s t a c k a n d t h e c a l l e e ( C a l l e d p r o g r a m )
c l e a n s t h e s t a c k . W
r i t e t h e c o d e f o r
S U B T
w h e n i t i s c o m p i l e d i n t o A s s e m b l y
L a n g u a g e
.
H I N T : D r a w t h e S t a c k F r a m e
f i r s t t o s e e h o w i t l o o k s l i k e .
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
