John Selck wrote:
Am 19.05.2006, 06:28 Uhr, schrieb mdj <mdj.mdj@gmail.com>:Of course, the point remains though that your would never do this on the Apple II series, as you'd limit your target market to the earliest machine, rather than just the lowest common denominator of all machines (64k, 6502 code that's documented and unbuggy)It's easy to do a processor check.
It's not easy unless you either 1) know exactly how all machines that your code will ever see behave, or 2) test *exactly* the undocumented behavior that you use--no more and no less. Even in the latter case, you risk the test code being error trapped, so you have to cover that case, too. (Hard if the error trap comes along in the future using an architecture extension that you don't know in the past. ;-) So *both* strategies depend on knowing the future, which, as Yogi pointed out, is diffcult. ;-) -michael Music synthesis for 8-bit Apple II's! Home page: http://members.aol.com/MJMahon/ "The wastebasket is our most important design tool--and it is seriously underused."