Another programming question, maybe beyond the scope of this forum....
So I'm taking on a huge project... to develop an ONERR routine (in assembly) for Integer BASIC. Yeah. Who hasn't done this before? My plans so far are:
1. Understand what's going on with Applesoft's ONERR GOTO/GOSUB, which somehow also handles DOS 3.3 and ProDOS errors.
2. Reprogram Integer's error subroutine entry point to branch to my own routine. (Ok, so where's the start of Integer's error subroutine?) A little search for "Integer BASIC disassembly" uncovered a mostly undocumented disassembly:
This was a clipping of the disassembly which appears to define the error names being output to the screen, but not the handler's entry point.
3. Essentially, the user of this routine would use some POKEs to store the BASIC line number for handling the error. When an error occurs, execution branches to the modified error subroutine in memory, which then branches back to BASIC at the stored line number. Finally, the user could PEEK memory locations to determine error type and line number of the error within BASIC.
If anyone has some ideas about how to do this, I'd like to hear it!
Hello macintricks,
maybe you spend some time to scroll along the:
The Software Developers Sourcebook.pdf
at:
http://mirrors.apple2.org.za/ftp.apple.asimov.net/documentation/misc/
its rather more related to algorythms and the practice about how to deal with errors and that topic is covered along
about 50 pages of text..... beginning at page 192
maybe this gives you some usefull ideas about the topic of handling errors in general and at onerr in specific....
And just because talking about ideas:
The Beagle Bros have touched the onerr routines few times
also in the book:
The big tip Book
from:
http://beagle.applearchives.com/books/
examine bottom of page 50 ff.
sincerely speedyG