www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - inline asm issues

reply akcom <CppCoder gmail.com> writes:
I'm generating the following inline asm:

asm
{
	naked					;
	mov EAX, dword ptr [0xFFFFFFFF]		;
}

when it compiles, it compiles as the following:
00402230     B8 FFFFFFFF    MOV EAX,0FFFFFFFF

when I want this:
00402230     A1 FFFFFFFF    MOV EAX,DWORD PTR DS:[0FFFFFFFF]

what am I doing wrong?
Jun 01 2006
parent Thomas Kuehne <thomas-dloop kuehne.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

akcom schrieb am 2006-06-01:
 I'm generating the following inline asm:

 asm
 {
 	naked					;
 	mov EAX, dword ptr [0xFFFFFFFF]		;
 }

 when it compiles, it compiles as the following:
 00402230     B8 FFFFFFFF    MOV EAX,0FFFFFFFF

 when I want this:
 00402230     A1 FFFFFFFF    MOV EAX,DWORD PTR DS:[0FFFFFFFF]

 what am I doing wrong?
Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFEf2qi3w+/yD4P9tIRAnlLAKDHTKyexMg12XwBYvtrDA+9fQKXOACgtt5K 8EwKjCj5hbvG424WkVTv5Pw= =LA5s -----END PGP SIGNATURE-----
Jun 01 2006