.text:00010634                 cmp     ax, [ebx]
.text:00010637                 sbb     eax, eax
.text:00010639                 inc     eax


写了一段测试C语言

int main(int argc, char *argv[])
{

    char input = -1;//测试用
    ULONG output;

    __asm
    {
        lea        ebx,input
        cmp     ax, [ebx]
        sbb     eax, eax
        inc     eax
        mov        output,eax
    }
    printf("%x\n",output);

    return 0;
}

测试结果input为负数时,output==0
input为负数时,output==1

相关文章:

  • 2022-12-23
  • 2021-05-15
  • 2022-12-23
  • 2021-12-16
  • 2021-07-24
  • 2021-04-30
猜你喜欢
  • 2021-09-22
  • 2022-12-23
  • 2021-08-07
  • 2021-10-17
  • 2022-12-23
  • 2021-12-08
  • 2021-06-23
相关资源
相似解决方案