开发者

Asking for help to fix inline assembly issue in D program

开发者 https://www.devze.com 2023-04-06 14:41 出处:网络
Hello I\'m trying to use ASM in a little D program : asm { mo开发者_JAVA技巧v AX,12h; int 10h; } I\'ve got this message : \"end of instruction\" from the two lines in the asm statement

Hello I'm trying to use ASM in a little D program :

asm
{
    mo开发者_JAVA技巧v AX,12h  ;
    int 10h     ;
}

I've got this message : "end of instruction" from the two lines in the asm statement

I cannot fix the issue,

that's why I'me asking help from you.

thanks for your answer

I apologize for my english


Since asm statements are embedded in D, you have to use D number syntax. That is, 0xNUMBER instead of NUMBERh for hexadecimal numbers. So,

asm { mov AX, 0x12; int 0x10; }

0

精彩评论

暂无评论...
验证码 换一张
取 消