【发布时间】:2015-10-17 15:39:23
【问题描述】:
我刚刚安装了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)
【问题讨论】:
-
确保您正确复制了所有内容。特别是,您有
datah segment和MOV ax, SEG duomenys??? -
已修复,只是拼写错误。我 100% 确定代码本身可以在 TASM 或 GUI Turbo Aseembler 中运行。我刚刚删除了堆栈公园和其他不需要的代码。