Talk:Error codes
Basic hypothesis on error codes
Error codes are almost certainly the remains of now-removed debugging tools.
In this interview, Morimoto states that 300 bytes worth of debug features were removed from the game and replaced with MEW's data:
An interesting side note is that some ROM hackers found the remains of what used to be an assert() function in the ASM for Pokemon FireRed. Completely different game in a completely different generation, I know, but in combination with the above source it hints at a pattern. DavidJCobb 21:54, 4 April 2012 (GMT+6)