I like being away from the anal-retentive topic guards in clc. This comes
from stdlib.h. What does it do?
--
Frank
I do personal attacks only on people who specialize in personal attacks..
~~ Al Franken, Playboy interview
This code snippet provides optimisation for the C run-time
library function, div(). If optimisation is disabled then the
div() function is defined as a reference to an external function.
In the event that the compiler has been run with optimisation
enabled then the div() function is defined as an inline assembly
function. This would improve performance by removing call over-
head and any other cruft related to the execution of div().
Tim.
Thanks Tim. Can you tell what the assembly is doing specifically?
--
Frank
...it's obviously how his disease manifests itself, any kind of substance
dependency is very deep, issues of self esteem, you can just tell that he's
a really insecure and vulnerable person -- and I love him. You know,
sometimes I listen to him on the radio, and he's very judgmental, he's a
very angry person, and I just want to remind him that anytime you have a
finger pointing at someone else, there's three pointing back at you.
~~ Al Franken
Divides the first argument by the second and returning the divisor and
the remainder in a 64 bit result with the lower part (result of division)
and the upper part (edx) remainder. All in a single operation.
You can follow it in the debugger and you will see how it works.
Compile with debug info ON, then step by step the assembly code (request in
the debuggeer to see the machine instructions) and open the CPU
window. You will see how registers change