Converting Bresenham to Assembler (pass 2) Part 1

In my previous article, I presented a fairly straightforward method for converting my C code for Bresenham’s line algorithm to assembly language. It is certainly faster than the C equivalent, however, it is not optimized. In this article, we are going to improve this code and try to save some bytes and some T-States.

This article is going to be rather lengthy and will be split into 2 parts.

Before we start performing any optimizations, let’s remember the quote from Donald Knuth: “Premature optimization is the root of all evil”. To me, this means don’t optimize unless you know what the implications are going to be. So I’m not going to go too unorthodox in my optimizations and as always, test edge cases as well as general cases.

Continue reading “Converting Bresenham to Assembler (pass 2) Part 1”
Design a site like this with WordPress.com
Get started