Skip to content

Allow negative constants as operand (works for equb/equw/equd!) #82

@0xC0DE6502

Description

@0xC0DE6502

Using a negative constant as an operand issues an error whereas negative constants work just fine for equb/w/d. I think this should be allowed for operands as well.

Examples:
lda #-3, lda #not(1), etc will give the error "Constant cannot be negative"
Workarounds: lda #256-3, lda #lo(-3), lda #1 eor 255, etc.

On the other hand:
equb -3, equw not(1), etc is all just fine and generates exactly what you'd expect.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions