【问题标题】:Byte comparation字节比较
【发布时间】:2013-03-05 16:17:50
【问题描述】:

我正在编写一个简单的汇编代码,但是,我得到了那个错误:

test.asm:30: 错误:应有逗号、冒号或行尾

好的,在第 30 行我有这个代码:

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

好的..我试过这个:

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

好的,但是,错误是一样的:(

我该如何解决这个问题???

【问题讨论】:

    标签: assembly x86 nasm


    【解决方案1】:

    byte ptr 是 MASM 语法。对于 NASM,它应该只是 byte,所以您的第一个示例应该是 cmp byte [129],0(参见例如 this syntax guide)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-10-21
      • 1970-01-01
      • 2014-11-02
      • 2010-11-26
      • 2021-09-02
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多