Skip to content

Add constants for color shades #67

Open
@Rangi42

Description

@Rangi42

From the BGP docs, 0 = white, 1 = light, 2 = dark, 3 = black. I sometimes mix these up and have to look up the info (or, of course, just use named constants).

Even "Pseudo-ops Considered Harmful" recommends an lb macro, e.g. for lb hl, $12, $34:

MACRO lb
    assert -128 <= (\2) && (\2) <= 255, "Second argument to `lb` must be 8-bit!"
    assert -128 <= (\3) && (\3) <= 255, "Third argument to `lb` must be 8-bit!"
    ld \1, (LOW(\2) << 8) | LOW(\3)
ENDM

"lc" (load crumbs) or "dc" (define crumbs) can also be useful, mainly for DMG colors, e.g. lc a, SHADE_WHITE, SHADE_LIGHT, SHADE_DARK, SHADE_BLACK.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions