Skip to content

[Feature request] Allow a ModR/M indicator keyword to choose encodings not otherwise selected by the assembler #161

@ecm-pushbx

Description

@ecm-pushbx

As bugzilla.nasm.us is down and the nasm.us page now links to this github tracker rather than the bugzilla, here's a suggestion:

Allowing to select either the "load form" or the "store form" of an instruction is occasionally reported as a need, eg recently in https://stackoverflow.com/questions/79793821/can-i-somehow-tell-gas-to-change-direction-of-operands

As I commented there:

My debugger's line assembler allows choosing either form, xor di, di and xor modrm di, di give 31 FF whereas xor di, modrm di gives 33 FF. NASM does not have such a keyword, hence why it's documented as a difference from NASM.

Obviously NASM may not want the "naked" modrm keyword, as it could clash with existing label names, but I think that some way of selecting these encodings would be useful. Perhaps {modrm} ?

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