Strange looking assembly code

Started by
14 comments, last by Atm97fin 20 years, 4 months ago
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.
Advertisement
Then what''s the difference between fmul and fistp instructions?
EasyGL - easy to use graphics library.
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.
So, what''s the difference between these commands:
.dataNumberOne    dd 65536.0FixedNumber  dd   ?.code;1.     fmul [NumberOne]     fistp [FixedNumber];2.     fmul NumberOne     fistp FixedNumber 
EasyGL - easy to use graphics library.
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*
E8 17 00 42 CE DC D2 DC E4 EA C4 40 CA DA C2 D8 CC 40 CA D0 E8 40E0 CA CA 96 5B B0 16 50 D7 D4 02 B2 02 86 E2 CD 21 58 48 79 F2 C3

This topic is closed to new replies.

Advertisement