BTW, I wanted to make a general observation to Zedd. I'm sure this might have occurred to you, but the issues you're having and the problems you're solving really have little or nothing to do with assembly language: you're grappling with basic software design and implementation issues. You'd be doing the same things no matter if you're writing in C or FORTRAN or BASIC or ... whatever. Basic "algorithm" design.
Don't know about you, but I find it very useful to work out some of these problems on paper. Doesn't matter if you use flowcharting or writing pseudocode or just doodling, seeing your problem graphically can sometimes make all the difference, instead of sitting blankly in front of your screen scratching your head ...