flat assembler
Message board for the users of flat assembler.

Index > Projects and Ideas > fdisax64.dll A x64 disassembler for windows

Author
Thread Post new topic Reply to topic
seppe



Joined: 12 Apr 2015
Posts: 19
Location: Belgian in Tenerife
seppe 20 May 2025, 11:11
The attached file contains the sources of fdisax64.dll and an example.

The fdisax64.dll implements the Disax function to disassemble one 64-bit x86 instruction.

The Disax function takes 3 parameters :
- rcx: address of the instruction
- rdx: address of a buffer to receive the source of up to 128 characters
- r8: virtual code address
The Disax function returns in rax the nb. of bytes of the decoded instruction.

Disax uses source files from fdbg0025 by fasm users "Feryno" and "tthsqe"
with the following additions and modifications:

- cbw, cwde, cdqe, rdpid, retf, retfw, retfq
- MPX : bndmk, bndcl, bndcu, bndcn, bndmov, bndldx, bndstx
- MPX : 'BND' prefix
- discard duplicate rex prefix bytes

I wrote "SoS" in the comment of the source code that I added or modified.
The example allows you to experiment with x86 instructions.

Brought to you by fasm forum user seppe.


Description: x64 disassembler for windows
Download
Filename: Disax.zip
Filesize: 81.64 KB
Downloaded: 393 Time(s)


_________________
Greetings from Seppe
Post 20 May 2025, 11:11
View user's profile Send private message Reply with quote
rrq



Joined: 17 May 2021
Posts: 13
rrq 13 Jan 2026, 12:34
Hi seppe,

nice work! I've downloaded Disax.zip for trialling it on Linux.
It needed only a couple of form changes in disax.asm:
+ lines 2-3: format elf64, and comment out win64a.inc (not included)
+ lines 7-8: make it "section '.text' executable align 16" and "public Disax" (instead of entry)
+ line 33: make it "section '.data' writeable align 16"
+ lines 69-71: remove those last 3 lines

By that, it compiles nicely to a linkable object module (disax.o). I then introduced it to my rrqforth interpreter[1] for experimenting. Initially just wrapped it the "disax" word plus a dedicated buffer (named "axbuf"). We'll see where it goes Smile

regards,
Ralph.

[1] https://board.flatassembler.net/topic.php?t=21955
Post 13 Jan 2026, 12:34
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.