[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sudoku puzzle solver for Apple II



Michael Black wrote:

<snip>

And once you move away from emulators, you do start limiting the
computers that can run the program when you use a 65C02.  In other
words, you may be limiting who can run this program on an actual Apple
II.

Well, I began the limitation by exploiting the 80-column firmware
(in 40-column mode ;-) to aloow control characters to clear to end
of page, etc.  That could also be re-done, but I left it for later
because I figured that most people had access to machines that had
the firmware--and a 65C02 as well (though I realize that the
unenhanced //e doesn't).

But the question still remains, why is it so important to use
the few instructions that are unique to the 65C02?  They may be nice
additions, but lots of people survived without them.

I don't think that it is, as a rule.

In this case, I looked at the inner loops, where every cycle counts,
and couldn't see any "free" or even "inexpensive" way to do away with
the 65C02isms.  There are only a few, like LDA (ptr) when Y is busy with
some other useful value.  Having to save it and set it to 0, then
restore it, seems a little expensive if you're trying to go fast.

Almost all other cases, like BRA and INA, can be eliminated when the
time comes without penalty, and I've already removed some.

But until I bring myself to remove *all* 65C02 ops, and take the
time penalty, there's little reason to fix a few.

So--I agree with you in principle, but speed and "time to market"
were more important to me as I'm about to leave town for a week.  ;-)

-michael

Fast Sudoku solver for Apple II's!
Home page:  http://members.aol.com/MJMahon/

"The wastebasket is our most important design
tool--and it's seriously underused."