Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Asking for help to fix inline assembly issue in D program

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

asm
{
    mov 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

like image 970
Alexandre Hoffmann Avatar asked Sep 22 '11 16:09

Alexandre Hoffmann


1 Answers

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; }
like image 97
FeepingCreature Avatar answered Oct 07 '22 18:10

FeepingCreature