[pet] [vic20] [c64] [c16] [cplus4] [c128] [x16] [m65]
The ON … GOTO|GOSUB construct has multiple use cases:
ON <value> GOTO|GOSUB is used for multiple branchingON ERROR GOTO is used for error trappingON <event> GOSUB is used for interrupt handlingON <value> GOTO|GOSUB <label> [, <label> ...] ON ERROR GOTO <label> ON TIMER|RASTER|SPRITE|BACKGROUND|VBLANK GOSUB <label>
For more details, refer to: