| Purpose: | Copy an ASCIIz string in SRAM to an SRAM location and/or output that same string to the COM1 serial buffer. | ||||
| Assumes: | There is sufficient buffer space if copying is enabled. The routine will block if insufficient room in the print buffer. |
||||
| Passed: | R25:R24 | BYTE * | bPtrDest | starting SRAM address at which to copy the string; < 0x300 skips copying | |
| R23:R22 | BYTE * | bPtrSource | starting SRAM address from which to copy and/or print | ||
| R20 | BYTE | bFlags | in which, only option BIT BIT_FMT_PRINT is checked | ||
| Returns: | R25:R24 | BYTE * | bPtrDest | the SRAM copy destination address, unchanged | |
| Alters: | R20, R21, R26, R27, the FLAGs, and the caller's copy buffer and/or print buffer, as specified | ||||
| Example: |
|
||||
| Test it: |
| ||||
| Notes: | This routine uses the strcpy and PrintSRAMASCIIz System Functions. | ||||
| Any destination buffer address less than 0x300 will not be copied, but that the print request is unaffected by that. | |||||
| The BIT_FMT_PRINT bit causes the string to be transferred into the COM1 serial port buffer. | |||||
| Dropin: (setup code) |
; Setup for the FormatCopyAndPrint() call: ; Passed: R25:R24 BYTE * bPtrTo pointer to the SRAM copy target buffer or NULL ; R23:R22 BYTE * bPtrFrom pointer to the SRAM ASCIIz string to copy ; R20 BYTE bFlags, of which only BIT_FMT_PRINT is used ; Returns: R25:R24 BYTE * bPtrTo, same as the R25:R24 passed ; Alters: R20, R21, R26, R27, the FLAGs, and the buffer(s) selected | ||||
| Also see: | The FormatULONGHex, FormatULONG, and FormatCopyAndPrint System Functions, each of which call this one. | ||||