Skip to content

HEX..END improvements #230

Closed
Closed

Description

@x87
  • {$include} file as a binary blob
  • byte(N) syntax to repeat byte N times, i.e. 00(4) would be equivalent to 00 00 00 00
  • N is a positive integer number (> 0).
  • N could also be expressed as a constant name or in hexadecimal format
const
  x = 0x3
end
hex
   01(x)
end

becomes

hex
  01 01 01
end
  • disassembler packs the trailing sequence of zero bytes using the same syntax
    Requirements for the sequence to be packed by the disassembler:
    • the sequence must be trailing, i.e. complete the hex..end, bytes in the middle are always printed individually
    • the sequence must be 4 and more bytes long
    • the sequence must only contain zero (00) bytes
 hex
     00 00 00 00 01 00 00 00 00
 end

becomes

 hex
     00 00 00 00 01 00(4)
 end

Activity

  1. added
    type:feature
    priority:p2
    on Jun 7, 2023
  2. added this to the v3.9.0 milestone on Jun 7, 2023
  3. MatiDragon-YT commented on Jul 14, 2023

    @MatiDragon-YT
    Member

    If possible add support for put number with calculates mathematics?
    Example: hex 00(4*2) end
    for put

    hex
       00 00 00 00
       00 00 00 00
    end
    
  4. x87 commented on Jul 14, 2023

    @x87
    CollaboratorAuthor

    For now it expects just a single number, not an expression. You will have to precalculate it.

  5. x87 commented on Jul 20, 2023

    @x87
    CollaboratorAuthor

    Feedback: add support for constants and hexadecimal numbers for n.
    Also enforce n>0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority:p2scope:compilertype:feature

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions