January 25, 2003 inline assembler: unexpected feature | ||||
---|---|---|---|---|
| ||||
I have a linker constant that I want to refer to. For lack of something better I declare it as an external function, like so: extern (C) { // external linker constant void FREE_KERNEL_SPACE_START_(); } When I write the following code: asm { lea ESP, dword ptr [FREE_KERNEL_SPACE_START_] } the compiler turns it into lea ESP, FREE_KERNEL_SPACE_START_+ EBP that is, relative to EBP! I have tried various other forms of 'mov', but most of the time the compiler says "no size for type voidC" |
Copyright © 1999-2021 by the D Language Foundation