| Purpose: | Print a string, then a BYTE value in hexadecimal format. | |||
| Assumes: | Do not suppress a leading zero; print two (2) characters | |||
| Passed: | R25:R24 | CHAR * | szPtrDesc | address of the FLASH string buffer to output |
| R22 | BYTE | bValue | the BYTE value to print in hexadecimal format | |
| R19 | BYTE | bSpacer | 0x20 (= ' ', space) prints " " in between, otherwise print " = " | |
| Returns: | Nothing. | |||
| Alters: | R20, R22, R24, R25, the FLAGs (SREG) and the COM1 Transmit buffer | |||
PrintDescAndHexWORD | ||||
| Purpose: | Print a string, then a WORD value in hexadecimal format. | |||
| Assumes: | Do not suppress any leading zeros; print four (4) characters | |||
| Passed: | R25:R24 | CHAR * | szPtrDesc | address of the FLASH string buffer to output |
| R23:R22 | BYTE | bValue | the BYTE value to print in hexadecimal format | |
| R19 | BYTE | bSpacer | 0x20 (= ' ', space) prints " " in between, otherwise print " = " | |
| Returns: | Nothing. | |||
| Alters: | R20, R22, R24, R25, the FLAGs (SREG) and the COM1 Transmit buffer | |||
| Example: |
|
||||
| Test it: |
| ||||
| Notes: | The Operating System handles the COM1 Transmit buffer as a circular FIFO (First In, First Out) queue. | ||||
| Dropin: (setup code) |
; Setup for the PrintDescAndHexBYTE() call: ; Passed: R25:R24 CHAR * szPtrDesc pointer to the FLASH string to print first ; R22 BYTE bValue BYTE to print after the delimiter ; R19 BYTE bSpacer 0x20 to override default " = " with " " ; Returns: Nothing. ; Alters: R20, R22, R24, R25, the FLAGs and the COM1 Transmit Buffer ; Notes: If there is a leading zero, print it ; Setup for the PrintDescAndHexWORD() call: ; Passed: R25:R24 CHAR * szPtrDesc pointer to the FLASH string to print first ; R23:R22 WORD wValue WORD to print after the delimiter ; R19 BYTE bSpacer 0x20 to override default " = " with " " ; Returns: Nothing. ; Alters: R20, R22, R24, R25, the FLAGs and the COM1 Transmit Buffer ; Notes: If there are any leading zeros, print them | ||||
| Also see: | The System Functions Print0xPrefix, PrintBINARY, PrintCHAR, the PrintBYTE family, and the PrintWORD family. | ||||