Minor cleanup.
Use more significant values for interrupt flags.
Updated BGDA tags.
Improved exception handler routine generation to prevent mistakes.