I know that when I receive 2 float number it automatically converts it to IEEE Format.
I want to split, sign, mantisa, and exponent in 3 different memory or register positions.
Any advice on how to make this.
Thanks in advance
I want to split, sign, mantisa, and exponent in 3 different memory or register positions.
Any advice on how to make this.
Thanks in advance
Perhaps you should look for the IEEE document explaining the floating-point format? Or the notes given to you by your teacher?
I know that. I am asking is for the assembly sintax or hints about it. I already know the theory
If the IEEE format number is not in memory then you'll have to store it at an address:
fst FLOAT PTR
Once the number is in memory, you load it into a general purpose register:
mov eax, DWORD PTR
All you have to do now is shift the number around and store the bits - it is only a couple of instructions required. I hate to be so curt, but if you don't have the basic knowledge to complete this task then maybe reading the x86 manual is needed. Shifting is done with SHR/SHL and you might want to use AND to mask the parts you desire.
Please, note I have used "FLOAT" because I don't know which size IEEE value you desire.
fst FLOAT PTR
Once the number is in memory, you load it into a general purpose register:
mov eax, DWORD PTR
All you have to do now is shift the number around and store the bits - it is only a couple of instructions required. I hate to be so curt, but if you don't have the basic knowledge to complete this task then maybe reading the x86 manual is needed. Shifting is done with SHR/SHL and you might want to use AND to mask the parts you desire.
Please, note I have used "FLOAT" because I don't know which size IEEE value you desire.
the user is going to input two single numbers.