我刚刚安装了emu8086,但出现了奇怪的错误,我在网上看不懂mov ax, SEG datahere
。看起来它无法识别 SEG 关键字。为什么?代码在 TASM+DosBox 或 GUI Turbo Assembler 中编译得很好。
.model small
ASSUME CS: codehere, DS:datahere, SS:stackhere
datahere segment para public 'DATA'
; data segment goes here
datahere ends
stackhere segment word stack 'STACK'
dw 400h dup (00)
stackhere ends
codehere segment para public 'CODE'
start:
mov ax, SEG datahere
mov ds, ax
; code goes here
; END
mov ah, 4ch
int 21h
codehere ends
end start
错误:
wrong parameters: MOV ax, SEG datahere
probably no zero prefix for hex; or no 'h' suffix; or wrong addressing; or undefined var: (ITSELF)