kismetlafiete
Programmer
For my midterm project our instructor gave us a graphical program in qbasic that he wants us to translate into assembly. I've got pretty much everything figured out, how to initialize graphics mode and how to put a pixel where I want it. What I need now is some way to find the sine of certain numbers(sin(number) ). I did some research and found the instruction FSINCOS (op code D9FB) and eventually I found this description of it:
Computes both the sine and the cosine of the source operand in register ST(0), stores the sine in ST(0), and pushes the cosine onto the top of the FPU register stack. (This instruction is faster than executing the FSIN and FCOS instructions in succession.)
So, I assume that has something to do with the stack which we haven't learned yet.( what is ST(0)?) Just wondering if someone out there that knows how could give me a sample code snippet just showing how to use the instruction. I'm going to read up on using the stack right now, but an example of how to use this instruction would be wonderful.
Just for some background, the whole class is me and another guy(senior-level elective course in college), so I can't really ask my "other classmates" for help, as we're supposed to do this together and neither of us has any idea. The guidance our professor gave us was "read your book" (no help there either really). We're using NASM, also.
Computes both the sine and the cosine of the source operand in register ST(0), stores the sine in ST(0), and pushes the cosine onto the top of the FPU register stack. (This instruction is faster than executing the FSIN and FCOS instructions in succession.)
So, I assume that has something to do with the stack which we haven't learned yet.( what is ST(0)?) Just wondering if someone out there that knows how could give me a sample code snippet just showing how to use the instruction. I'm going to read up on using the stack right now, but an example of how to use this instruction would be wonderful.
Just for some background, the whole class is me and another guy(senior-level elective course in college), so I can't really ask my "other classmates" for help, as we're supposed to do this together and neither of us has any idea. The guidance our professor gave us was "read your book" (no help there either really). We're using NASM, also.