Re: [請益] 關於作業4

作者: evivrus (!!)   2007-12-29 16:37:19
不好意思
但我直到現在還是沒有辦法成功地執行任何一個課本第十五章的範例
甚至連編譯都編不過
以下是我的code 和課本範例(p494)一模一樣
TITLE MASM Template (main.asm)
INCLUDE Irvine16.inc
.code
main PROC
mov ax,@data
mov ds,ax
call clrScr
L1:
mov ah,10h
int 16h
call DumpRegs
cmp al,1Bh
jne L1
call clrscr
exit
main ENDP
END main
編不過 error message 如下:
1> Assembling: .\main.asm
1>.\main.asm(28) : error A2006: undefined symbol : DGROUP
1>Project : error PRJ0019: A tool returned an error code from "Assembling..."
1>Build log was saved at
"file://c:\Irvine\examples\Project_sample\Debug\BuildLog.htm"
1>Project - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
第28行其實是 mov ax,@data 那行
但我根本沒有DGROUP這個變數
事實上 我根本沒有宣告任何變數
若是把 mov ax,@data
mov ds,ax
這兩行刪掉
則 error messge 變成:
1>Assembling...
1> Assembling: .\main.asm
1>Linking...
1>main.obj : fatal error LNK1190: invalid fixup found, type 0x0002
1>Build log was saved at
"file://c:\Irvine\examples\Project_sample\Debug\BuildLog.htm"
1>Project - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
請問我到底要怎麼做 才能成功地執行課本範例呢?

Links booklink

Contact Us: admin [ a t ] ucptt.com