Which of the following macros can put a macro assembler into an infinite loop?…

GATE · 1996 · CS · Question 2 subparts

Which of the following macros can put a macro assembler into an infinite loop?

Macro (i), M1(X):

if X = 0: call M1(X + 1)
if X != 0: emit .WORD X

Macro (ii), M2(X):

if X = 0: call M2(X)
if X != 0: emit .WORD X + 1
  1. A.

    (ii) only

  2. B.

    (i) only

  3. C.

    Both (i) and (ii)

  4. D.

    None of the above

Attempted by 320 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…