BASIC IV ROM Routines 
    Page Last Altered: 
    
     
Submitted by Steve Fewell
  
Routine: ON ERROR OFF
  Name: Reset BASIC's error code pointer
  Starting Address: &B2A6
  Exit: BASIC's error vector (&16,
&17) contains the address &B2AF. 
Description:
This routine resets the BASIC error vector code
address to the address of the default BASIC error routine code (the default
address of &B2AF).
If an ON ERROR statement is issued then the error vector will point to the code
after the ON ERROR instead of this default. 
The BASIC's default error program code is located from &B2AF to &B2C7, and contains the following tokenised BASIC instructions:
| Address | Contents (in Hex) | BASIC program Code | 
| B2AF | F6 | REPORT | 
| B2B0 | 3A | : | 
| B2B1 | E7 | IF | 
| B2B2 | 9E | ERL | 
| B2B3 | F1 | |
| B2B4 | 22 | " | 
| B2B5 | 20 | <space> | 
| B2B6 | 61 | a | 
| B2B7 | 74 | t | 
| B2B8 | 20 | <space> | 
| B2B9 | 6C | l | 
| B2BA | 69 | i | 
| B2BB | 6E | n | 
| B2BC | 65 | e | 
| B2BD | 20 | <space> | 
| B2BE | 22 | " | 
| B2BF | 3B | ; | 
| B2C0 | 9E | ERL | 
| B2C1 | 3A | : | 
| B2C2 | E0 | END | 
| B2C3 | 8B | ELSE | 
| B2C4 | F1 | |
| B2C5 | 3A | : | 
| B2C6 | E0 | END | 
| B2C7 | 0D | <return> | 
Therefore, the default BASIC error code is:
           
REPORT:IFERLPRINT" at line ";ERL:ENDELSEPRINT:END
Disassembly for the Reset ON ERROR Code Pointer routine
| B2A6 | 169 175 | A9 AF | LDA#&AF | |
| B2A8 | 133 022 | 85 16 | STA &16 | |
| B2AA | 169 178 | A9 B2 | LDA#&B2 | |
| B2AC | 133 023 | 85 17 | STA &17 | |
| B2AE | ` | 096 | 60 | RTS |