2013-03-05 132 views
-1

我在一個簡單的彙編代碼的工作,但是,我得到的埃羅:字節比較 -

test.asm:30: error: comma, colon or end of line expected

好,在第30行我有這樣的代碼:

cmp byte ptr [129],0 ;anything in the line segment? 

OK ..我嘗試這樣做:

mov [direct_segment],ax ;segment for Direct information 
cmp byte ptr [ax+4],0 ;anything in the line segment? 

好的,但是,錯誤是一樣的:(

我該如何解決這個問題?

回答

4

byte ptr是MASM語法。有了NASM,它應該只是byte,所以你的第一個例子應該是cmp byte [129],0(見例如this syntax guide)。