Solution and explanation Assembly language programming in c programming language



(1)

Answer: (c)

Explanation:

ax and bx is general purpose register.

Statement mov ax, 61 means value 61 is storing at register ax.

Statement add bx,ax means addition of content of register bx i.e 10 and content of register ax i.e. 61 and result of addition is storing at register bx.

(2)

Answer: (b)

Explanation:

Same concept has used as in question 1.

Mnemonic sub means subtraction.

(3)

Answer: (a)

Explanation:

Same concept has been used as in question 1.

(4)

Answer: (d)

Explanation:

Mnemonic inc means increment content of register by one.

Mnemonic div means division with ax.

Operand of div must be a register not a value.

Note. Register ax is known as accumulator.

(5)

Answer: (a)

Explanation:

Mnemonic div means division of its operand with content of accumulator i.e. ax.

Meaning of div bx means 15/3.

(6)

Answer: (c)

Explanation:

Mnemonic mul means multiplication of its operand with content of accumulator i.e. ax.

Meaning of mul bx means 15*4.

Note: inc bx means increase the content of register bx by one.

(7)

Answer: (c)

Explanation:

dec dx means decrease the content of register dx by one.

(8)

Answer: (a)

Explanation:

Mnemonic or means bitwise OR operations between its operands.

(9)

Answer: (d)

Explanation:

Mnemonic and means bitwise AND operations between its operands.

 

(10)

Answer: (b)

Explanation:

Statement jnz India means jump to label india till content of last register i.e bx is not zero. When content of register bx became zero then stop the jumping. 


No comments: