here is my code:
mov ax, ;Load single word of data
fild eax ; word now becomes DWORD
Why doesn't it work? :)
As far as I know, this should work fine.
mov ax, ;Load single word of data
fild eax ; word now becomes DWORD
Why doesn't it work? :)
As far as I know, this should work fine.
What about the stuff you have stored in the upper part of EAX? Use 'movzx eax, WORD PTR ' instead or put a 'xor eax,eax' before the whole thing. Wait a minute, can you load integers from registers into the FPU?
I found out looking at the Intel manual that I can't, and I can only use imm16(32,64), so lemme rephrase my question:
"How can I load a sequence of words or bytes into the FPU?"
What I have is a heightmap that is either 8 or 16 bits in height, and I need to somehow get that height from the heightmap, and place the height of that represented on a vertex
"How can I load a sequence of words or bytes into the FPU?"
What I have is a heightmap that is either 8 or 16 bits in height, and I need to somehow get that height from the heightmap, and place the height of that represented on a vertex
I see no problems doing that using LOCALS.
LOCAL stuff:DWORD
fild stuff
LOCAL stuff:DWORD
fild stuff
Kenny, you cannot put a register on FPU stack directly... you have to use a memory location.
So if want to load the content of eax do, for example:
.data ?
Value1 dword ?
.code
mov Value1, eax
fild Value1
Bye, Saiwa
So if want to load the content of eax do, for example:
.data ?
Value1 dword ?
.code
mov Value1, eax
fild Value1
Bye, Saiwa
How about just
fild word ptr
fild word ptr
Thanks E?in, I'm going with that method :) I hope it works...
Sorry guys - no word ptr addressing mode is allowed there ! Only dword and quad-word pointers ! (Last for 64-bit integers !)
Greetings, CALEB
Greetings, CALEB
No Caleb, it works grand. 16, 32 & 64 bit integers are all allowed:)
Uups - sorry ! I didn't have remembered this !