From: Brian R. <bre...@mu...> - 2007-04-18 20:24:54
|
> Thus, I'm going to propose the following: > [rel foo] ... RIP-relative addressing > [qword rel foo] ... RIP-relative addressing > [rip foo] ... (alias for "qword rel") RIP-relative > [dword rel foo] ... EIP-relative addressing > [eip foo] ... (alias for "dword rel") EIP-relative > What do people think? Mostly it looks okay. I worry a bit about the qword/dword rel syntax. It could get confusing, since nasm already uses those keywords inside of brackets to control offset value sizes: [byte ebx-1] ... store offset in one byte [dword ebx-1] ... store offset in four bytes [dword rel -1] ... use EIP-relative addressing [dword dword rel -1] ... ??? I'm not sure if the last one is even possible (I haven't had time to learn x64 yet). And of course, dword is already overloaded when it appears outside of the brackets. Would this be legal? mov dword [dword dword rel ebx-1], 100 b "I've come to believe that my mother was unexpectedly startled by the suggestion of a new keyword during her first pregnancy, and when a tempter in the early 1970s formulated schemes to avoid another one, the prenatal influence manifested itself." -- Dennis Ritchie, explaning the reason for the overloaded meanings of the "static" keyword in C. |