4 Write Following Statement C Assembly Language Unsigned Char J 8 K J 15 Rest Code Q37136128

4. Write the following statement in C, in Assembly language. unsigned char i j=8; k do while (j = 15); //.. rest of code

4. Write the following statement in C, in Assembly language. unsigned char i j=8; k do while (j ‘= 15); //.. rest of code Show transcribed image text 4. Write the following statement in C, in Assembly language. unsigned char i j=8; k do while (j ‘= 15); //.. rest of code


Solution


4) Assembly code

li $2,8 # load value in j 0x8
sb $2,0($fp)
.L2:
lbu $3,1($fp)
lbu $2,2($fp)
addu $2,$3,$2
sb $2,1($fp)
lbu $2,0($fp)
addiu $2,$2,1             

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.