So I have multiple questions about FLD m64fp instructions, one example is this:
Eight consecutive bytes in memory contain the hex values 01, 00, 00, 00, 00, 00, 00, 00. An FLD m64fp instruction is executed. Its argument is the address of the first of these eight consecutive bytes. As a result of the FLD instruction, the value in ST(0) is now:
This IS a homework question so I'm not asking for the answer, but I am confused about what's going on. I've spent the last few days reading about the FPU register but I haven't found much that makes this question understandable. Are all eight of those values initially loaded into the register? If so what happens when FLD is called when the register is already full? I'm pretty confused. Any help is appreciated. Thanks!
m64fp
stands for a 64-bit-memory-address. The assembler should be smart enough to choose the right FLD
instruction if the variable is appropriate declared (DQ, REAL8 or similar). 64 bit are 8 bytes, so FLD loads 8 bytes (keyword: little endian) at once.
The value will be "pushed onto the FPU stack", i.e. ST(6) becomes ST(7), ST(5) becomes ST(6), ST(4) becomes ST(5) ... ST(0) becomes ST(1) and ST(0) becomes the value from FLD
. If the stack is full FLD
fails, but this is presumably not part of your homework.
HTH