how can i divide -b/a where a and b are any integer number between 0 and 127, it is also signed number, the answer can have a float value, thanks for any help.
Posted on 2001-11-17 22:29:21 by jpre
the best would be, if you make everything with fpu.
so a and b are integers (DWORD), then do the following:

fild a
fild b
fstp result

where result is for example a REAL4 variable.

hope i did everything well. :tongue:

nop :grin:
Posted on 2001-11-18 02:51:45 by NOP-erator
You want to (i)divide negative b by a....

How could you do that?

Well, you could do that by:
1) Look up the div and idiv op-codes in the opcodes.hlp file from the MASM32 package.
2) Look up the neg op-code in the opcodes.hlp file from the MASM32 package
3) Have a go at the problem (there really isn't much more that you can do)!

If you have no op-code reference then you are doomed in assembly from the start. In the last post you said you used TASM, I still sugest you drop it. There is still real use of MASM and M$ still update it (even if its not their highest priority).
If you get the MASM32 package (as provided by hutch-- @ ), it comes with the opcode help file, examples, tutorials, and more advanced stuff like optimisation.

The only other thing I would like to say is that this sounds like your homework. I am loathed to help someone do their homework, as this board is about learning and helping people learn, rather than cheating, and allowing people to cheat.

Posted on 2001-11-18 04:40:54 by Mirno