assembler parameter

nobody nobody at notpossible.com
Thu May 31 06:36:28 PDT 2007


Hello,

this programm should print 5;

int fak(int count) {

        asm {
                naked;
                //mov EAX,7;                // print 7
                mov EAX, [ESP+4];        // load parameter count
                ret;                              // get EAX
        }
}

void main() {
        int f = fak(5);
        writefln(f);
}





More information about the Digitalmars-d mailing list