Post Created date
Mixing C with ASM Assembler
Ok, Steve. I think we're bordering on extreme navel-gazing here. My arbritary priorities for my original implementation were in order of size, clarity, and speed. But in the...
Friday, 10 March 2006 - 07:00
Mixing C with ASM Assembler
Dan, without the BRCS DOSUB, I think your routine can fail when (x2-x1) > 128. DIVLUPE: ROL DXY ROL DXYH ROL DXY2 ; BRCS DOSUB ;Force a Sub, if a '1'...
Thursday, 9 March 2006 - 06:38
Mixing C with ASM Assembler
Thanks Dan! Having several people refine the same code can produce many insights. --Brian
Thursday, 9 March 2006 - 06:06
Mixing C with ASM Assembler
There's a speedup that can apply to both of our functions: share storage between the Dividend and the low-word of the Quotient. That way, the ROLs can do dual-duty. Here's my...
Wednesday, 8 March 2006 - 12:16
Mixing C with ASM Assembler
Looks good Steve! I see that you're treating Y,Y1,Y2, and the result as signed. Otherwise we're pretty much on the same page. Although, I have to admit that I have not yet...
Wednesday, 8 March 2006 - 12:00
Mixing C with ASM Assembler
FYI.. I wasn't able to implement Steve's idea as well as I would have liked. It required special handling for Quotients with the high bit set ( >=16777216 ). That required...
Wednesday, 8 March 2006 - 06:48
Mixing C with ASM Assembler
You're right about complementing the final Dividend instead of inverting each carry. I went ahead and made the changes suggested by you and Steve. Here are some stats. v2 uses...
Wednesday, 8 March 2006 - 06:41
Mixing C with ASM Assembler
Dan, I think it's just your version. :) The Interpolation function from my first post gives 11382 and 13574 for those two tests. The full answers should be 11381.56 and 13573.81...
Wednesday, 8 March 2006 - 06:17
Mixing C with ASM Assembler
Nice catch Steve! After glancing at my code above, I'm guessing that would save 4 moves and 2 subtractions in the ip_DivLoop. And it'll free 5 regs by eliminating Diff and...
Tuesday, 7 March 2006 - 03:23
Mixing C with ASM Assembler
I hope nobody minds, I used this challenge to experment with my coding style. This Interpolation function is roughly optimized for size. (~50 words) Requires avrasm2.exe Enjoy...
Monday, 6 March 2006 - 21:49

Pages