The code clearing the BSS segment in the startup code was disabled. I think some variables where therefore not having the expected value upon startup.
1 Reinstated the BSS clearing code.
2 Improved declaration according to PJW's findings.
3 Updated the type for CLI command handlers to be a function returning short rather than int since it's really what the existing handlers do. This removes some warnings about incompatible pointer type.
The code clearing the BSS segment in the startup code was disabled. I think some variables where therefore not having the expected value upon startup. 1 Reinstated the BSS clearing code. 2 Improved declaration according to PJW's findings. 3 Updated the type for CLI command handlers to be a function returning
short
rather thanint
since it's really what the existing handlers do. This removes some warnings about incompatible pointer type.