itoa integer to string conversion utilities.
Nim has its own way of converting int to strings, and it does this by converting the number to int64, and performing long division on it. Modern hardware may very well handle that sort of thing, however this will not work on extremely limited hardware such as the Game Boy. It's an 8-bit console from 1989, after all.
The default stringizing operator will throw an error complaining about _divulonglong, because SDCC is trying to find a division operator between two int64s, which not even GBDK provides!
So, if you're having trouble with them, you should import this module and let the $ procs from here override the one from system.
Procs
proc `$`(x: int16): string {....raises: [], tags: [], forbids: [].}
proc `$`(x: int32): string {....raises: [], tags: [], forbids: [].}
proc `$`(x: uint16): string {....raises: [], tags: [], forbids: [].}
proc `$`(x: uint32): string {....raises: [], tags: [], forbids: [].}
proc itoa(n: int16; s: ptr cstring): void {....raises: [], tags: [], forbids: [].}
proc ltoa(n: int32; s: ptr cstring): void {....raises: [], tags: [], forbids: [].}
proc uitoa(n: uint16; s: ptr cstring): void {....raises: [], tags: [], forbids: [].}
proc ultoa(n: uint32; s: ptr cstring): void {....raises: [], tags: [], forbids: [].}