0 Members and 4 Guests are viewing this topic.
inline long div(long a, long b) { long a1 = a & 0xFFFF0000; short a2 = a; return ((a1 / b) << 16) + ((a << 16) / b);}
I would just use the routines with long long, but then I get compiler errors with newlib. Using your asm routines in a contest won't be a big deal, right? I might not have to use them, though, depending on how fast it runs.
Oh, right. But anyways, wouldn't the fact that the bottom half is still signed, but not treated so in the multiplication routine mess stuff up?