Wednesday, 15 June 2011

c++ - Storing the memory address of a pointer as an integer -



c++ - Storing the memory address of a pointer as an integer -

alright people, trying write outportb function using inline assembly. however, (inline)assembly in vs2010 not take char variables operands. want created pointer char input , pass memory address of input character integer, , re-create info address destination address. if create char pointer , pass address of input char variable, how extract memory address of info short integer pass asm operand?

since unsigned char info type uses ascii code, processor cannot distinguish unsigned 8 bit integer. way figured out create char pointer , pass memory address of input parameter pointer, mov char pointer 16 bit register can movd straight memory. inline assembly code bypass windows memory management; beauty of it. ;-)

c++ pointers visual-c++ assembly inline-assembly

No comments:

Post a Comment