Skip to content

Zydis Formats Invalid MASM With INTEL_MASM #535

Open
@widberg

Description

@widberg

Zydis formats a few things in a way that MASM does not accept with INTEL_MASM:

  1. The int3 instruction should be formatted as int 3 for CC or MASM will complain:

It will also complain about int1 but int 1 gets encoded as CD 01 instead of F1. The recommended solution is to use DB 0F1h.

test.asm(6) : error A2008: syntax error : int1
test.asm(7) : error A2008: syntax error : int3
  1. The x87 floating-point registers st? should be formatted as st(?):
test.asm(6) : error A2006: undefined symbol : st1
  1. The fucomp instruction should be formatted without any operands the implicit st(0) operand:
test.asm(6) : error A2152: coprocessor register cannot be first operand

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