flat assembler
Message board for the users of flat assembler.

Index > DOS > How to disassemble to a Flat Assembler source?

Author
Thread Post new topic Reply to topic
axlucas



Joined: 02 May 2014
Posts: 70
Location: Argentina
axlucas 12 Dec 2023, 13:32
Well, basically, it's that. I have a DOS EXE file and I would like to disassemble it to Flat Assembler format source code. If I can do it directly in one go, that's great. If I need to first disassemble it to, say, TASM, and then convert that to Flat Assembler, as long as it works, it's OK too. But I would like the process to not require Windows, since I'm a Linux user. If no other choice, I'll have to install Wine to do it once and then I have my source and won't need it again, but it'd be great to not need to do that.

What do you guys recommend for the disassembly?
Thanks
Post 12 Dec 2023, 13:32
View user's profile Send private message Reply with quote
Furs



Joined: 04 Mar 2016
Posts: 2735
Furs 12 Dec 2023, 14:39
objdump -d -M intel file.exe
Post 12 Dec 2023, 14:39
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20995
Location: In your JS exploiting you and your system
revolution 12 Dec 2023, 14:45
The closest output format from some of the most popular disassemblers, is probably NASM.

Then with a bit of scripting magic you could do post-processing of the NASM source.
Post 12 Dec 2023, 14:45
View user's profile Send private message Visit poster's website Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1906
DOS386 03 Jan 2024, 17:43
https://github.com/gdabah/distorm/releases DISTORM (NASM syntax)
https://nasm.us/ NDISASM (NASM syntax)
https://agner.org/optimize OBJCONV (can also brew NASN syntax)

FAQ
Post 03 Jan 2024, 17:43
View user's profile Send private message Reply with quote
bitdog2u



Joined: 31 Jan 2023
Posts: 70
bitdog2u 02 Jun 2026, 11:33
https://board.flatassembler.net/topic.php?t=24176
Disassemble most anything, even a letter to grandma, AND FASM assembles the out file.
it does 286 16 bit code and a little 386+ code.
DOS DIS.com is mostly for .com files, but it will do .exe files.
The 100h offset for .COM labels is wrong, and you should load your .EXE into a debugger like INSIGHT and find out where the START is, then you can,
alter without changing size, and FASM assemble it. It will probably run with the new key press values or color changes, etc.
Big files takes a lot of work to make a REAL .ASM FILE out of it, but under 1000 byte executables are kinda easy.
Post 02 Jun 2026, 11:33
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-2026, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.