On Thu, Aug 16, 2007 at 01:06:11PM -0400, Sridhar Ayengar wrote:
Although, I might consider assembler code where every
second instruction
is a jump to be spaghetti code.
Actually, I'd consider the opposite. In assembler with something
like:
cmp ax,01
je @1
cmp ax,02
je @2
...etc, at least you know what the value is that is causing the
jump. With a jump table, you have to do some digging.
I'm still going to code jump tables, obviously, but the former is
easier to understand to someone looking at the code for the first time.
--
Jim Leonard
http://www.oldskool.org/ Email: trixter at
oldskool.org
Like PC games? Help support the MobyGames database:
http://www.mobygames.com/
Or taste a slice of the demoscene at
http://www.mindcandydvd.com/