Strange looking assembly code
AP is right if we are talking about a 6809 processor and the like, but I don''t think that''s the case... I pretty sure I''m right if we are talking about normal x86, using for example NASM.
fmul multiplies st0 with what you specify (here [FixedScale], i.e. 65536.0)
fistp stores st0 as an integer at the place specified (here at the place pFixedNumber), then pops floating point buffer... or whatever it should be called.
fistp stores st0 as an integer at the place specified (here at the place pFixedNumber), then pops floating point buffer... or whatever it should be called.
So, what''s the difference between these commands:
.dataNumberOne dd 65536.0FixedNumber dd ?.code;1. fmul [NumberOne] fistp [FixedNumber];2. fmul NumberOne fistp FixedNumber
The second one doesn''t work? You really need to not do floating point now, and build a basic understand of assembly first.
They are equivalent in MASM (see above). This stupid quirk has led to much confusion *sigh*
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement