求助汇编
查看原帖
求助汇编
372299
超级玛丽王子楼主2022/2/14 08:31

RT,写了这样一个非常简单的汇编程序

.386
.model flat, stdcall
.stack 1000h
ExitProcess PROTO, dwExitCode:DWORD

.data
sum DWORD 0

.code
main PROC
	mov eax, 5
    add ebx, 10
    mov sum, eax
    
    INVOKE ExitProcess,0
main ENDP
END main

在 DOSBox 环境的 MASM 上会报错,错误信息:

(2) error A2027: operand expected
(4) error A2105: Expected: instruction, directive or label
(15) error A2105: Expected: instruction, directive or label

但是用 VS2019 自带的 Assembler 就可以。

这是咋回事?怎么解决?

2022/2/14 08:31
加载中...