error A2070: invalid instruction operands while using nested while loop in assembly language

后端 未结 1 1513
轻奢々
轻奢々 2021-01-21 11:54

I am trying nested while loop in assembly using masm. I am getting the \"error A2070: invalid instruction operands\" at line 15 i.e at the endw directive of internal while loop

相关标签:
1条回答
  • 2021-01-21 12:18

    The error is here:

    .while j<i
    

    You cannot compare two memory contents directly. It is possible to compare a memory content with a register, e.g.:

    mov dl, i
    .while j<dl
    

    BTW: Don't trust an "alien" function (Irvine's WriteDec and Crlf). When a register unintentionally changes its contents, this can due to such a function.

    0 讨论(0)
提交回复
热议问题