| Purpose: | Print a string, in decimal format with the numeric value of a BYTE. | |||
| Assumes: | Leading zeros should be suppressed. | |||
| Passed: | R24 | BYTE | bValue | the BYTE value to print; output: "0" to "255" |
| Returns: | R24 | BYTE | bValue | the same BYTE value that was passed, unchanged |
| Alters: | Only the FLAGs (SREG) and the COM1 Transmit buffer | |||
PrintHexBYTE | ||||
| Purpose: | Print a string, in hexadecimal format with the numeric value of a BYTE. | |||
| Assumes: | Do not suppress a leading zero; print two (2) characters | |||
| Passed: | R24 | BYTE | bValue | the BYTE value to print; output: "00" to "FF" |
| Returns: | Nothing. | |||
| Alters: | R24, the FLAGs (SREG) and the COM1 Transmit buffer | |||
Print0xHexBYTE | ||||
| Purpose: | Print the 2-BYTE string "0x" then the 2-BYTE string created by PrintHexBYTE. | |||
| Notes: | Everything else is as documented in PrintHexBYTE above, since this routine uses it. | |||
| 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 PrintBYTE() call: ; Passed: R24 BYTE bValue to print in decimal format ; Returns: R24 BYTE bValue returned as passed ; Alters: the FLAGs and the COM1 Transmit Buffer ; Notes: Any leading zeros are suppressed ; Setup for the PrintHexBYTE() or Print0xHexBYTE() calls: ; Passed: R24 BYTE bValue to print in hexadecimal format ; Returns: Nothing. ; Alters: R24, the FLAGs and the COM1 Transmit Buffer ; Notes: If there is a leading zero, print it | ||||
| Also see: | The System Functions PrintBINARY, PrintCHAR, Print0xPrefix, and the PrintWORD family. | ||||