85h DP$UDG define of read UDG
Input A register - 0 for 8 byte pattern, 1 for 5 bytes.
     Bit 7 set to READ (8 bytes always).
B register - The UDG to define (0 - 7).
X register - points to the 8 or 5 byte pattern.
Output - none -
Description

Defines or reads a UDG.

If the top bit of A is clear - Defines UDG B with the pattern at X.

UDGs are 5 pixels wide by 8 pixels high.

  • If the A reg is 0, the first byte at X is the top line of the UDG and bits 4 to 0 define the pattern from left to right.
  • To allow UDGs to be stored in 5 bytes instead of 8 the A reg should be set to 1. Then the first byte at X defines the left hand edge of the udg with bit 7 as the top pixel.

If top bit of A is set - Reads UDG B into buffer at X (using 8 bytes always).

Note that interrupts are disabled in DP$UDG.

This call is not available on CM/XP machines.

Example Defines UDG 0 as the underlined bell icon.

        CLRB
        CLRA                    ;use 8 bytes
        LDX     #UDG
        OS      DP$UDG
        RTS

UDG:    DB      04h,0Eh,0Eh,1Fh,1Fh,04h,00h,1Fh
Define the same UDG in 5 bytes.
        CLRB
        LDAA    #1              ;use 5 bytes
        LDX     #UDG
        OS      DP$UDG
        RTS

UDG:    DB      19h,79h,fdh,79h,19h
Errors - none -