我剛安裝了emu8086,出現奇怪的錯誤,我不明白mov ax, SEG datahere
。它看起來不認識SEG關鍵字。爲什麼?代碼在TASM + DosBox或GUI Turbo Assembler中編譯得很好。Mov seg到emu8086的斧頭錯誤
.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' ??? – Jester
固定,只是錯字。我100%確定代碼本身在TASM或GUI Turbo Aseembler中工作。我剛剛刪除了堆棧公園和其他不需要的代碼。 – Dancia