Where is there documentation on how to write inline asm?

pineapple meapineapple at gmail.com
Thu Nov 15 21:52:21 UTC 2018


Ah, I've got something working!

It's not exactly what I wanted, but it's good enough for now. 
Instead of using an invisible output pointer, the output pointer 
is passed in explicitly.

     struct Result {
         ulong low;
         ulong high;
     }
     void retTest(Result* result) {
         version(D_InlineAsm_X86_64) asm {
             naked;
             mov [RAX + 0], 0x80;
             mov [RAX + 8], 0xff;
             ret;
         }
     }


More information about the Digitalmars-d-learn mailing list