错误:无效的指令操作数(在.ENDW上)

时间:2016-12-08 18:26:46

标签: assembly masm irvine32 masm32

include irvine32.inc

.data
i dword 0
j dword 0
x dword 0
reservedseats byte 45 dup(0)
seats dword 45

.code
main proc

xor eax,eax
xor ecx,ecx
xor ebx,ebx
.while(i<45)
xor edx, edx
mov edx, i
.if([reservedseats+edx]==0)
    mov ebx,i
    mov x,ebx
    push ecx
    .while(j<seats)
    mov reservedseats,1
        inc i

    inc j
    .endw
    pop ecx
    jmp next
.endif


inc i
.endw
next:

 exit 
 main endp
 end main

这是一个程序集(masm32)代码。

我正在进行装配工程座位预订。我试图将c ++代码转换为汇编。这个程序将打印用户给出的座位,如果用户想要再次预订座位,他将跳过已预留的座位。

它给了我一个错误。错误(无效指令)位于.endw之后的inc j。{/ p>

0 个答案:

没有答案