71h UT$FILL fill a memory range
Input X register - Address of buffer to be filled.
A register - The buffer is filled with this byte.
B register - Number of bytes to be filled.
Output - none -
Description Fills a buffer of the given length with the specified byte, filling two bytes at a time for efficiency. Nothing is done if the B register input equals 0.

Because of the 110 microsecond overhead of the SWI instruction when calling this service, the following code would be faster for filling up to 13 characters:

        LDAB    NUMCHARS
LOOP:   STAA    0,X            ; Store the fill character
        INX                     ; Point to the next byte
        DECB                    ; Decrement the counter
        BNE     LOOP            ; Branch back up if the counter is not 0
Example Fill 100 bytes of buffer at address BUF1 with 0.
        LDX     #BUF1
        LDAB    #100
        OS      UT$FILL
Fill 4 bytes of buffer at address BUF2 with spaces.
        LDX     #BUF2
        LDAA    #32         ; ASCII space character specified
        LDAB    #4
        OS      UT$FILL
Errors - none -