Function: Convert a string to a 16-bit signed integer. Include: stdlib.h Prototype: int atoi( const char * s ); Arguments: s Pointer to ASCII string to be converted. Remarks: This function converts the ASCII string s into an 16-bit signed integer (-32768 to 32767). The input string must be in base 10 (decimal radix) and can begin with a character indicating sign (‘+’ or ‘-’). Overflow results are undefined. This function is an MPLAB C18 extension to the ANSI standard libraries. Return Value: 16-bit signed integer for all strings in the range (-32768 to 32767).
2. 組合語言: 就須接收整個字串後將其還原成十進制(BCD)的碼後,再呼叫 BCD to HEX 的轉換程式。