flat assembler
Message board for the users of flat assembler.

Index > DOS > My DIS.com 16 bit disassembler for FASM

Author
Thread Post new topic Reply to topic
bitdog2u



Joined: 31 Jan 2023
Posts: 62
bitdog2u 11 Mar 2026, 02:48
My DOS 286 disassembler is good enough to be useful now.
I got in a couple bug fixes, & screen updates.
The FASM source code is included in this version 1.04 Released 5/5/26
Supporting programs & their source code is included,
and some useful stuff I made is included to practice on.

if DIS.com dumps out MT_OP or ILLEGAL messages, it might be data or 386+ code
and the best 386+ disassembler I ran into is here in FASM DOS section also.
My new DISn101 version works with CandyMans QDD32.exe found here,
https://board.flatassembler.net/topic.php?p=109397#109397

I didn't get ANY FEED BACK, which seems a little strange since, most .asm men wanted a disassembler that would output something that would assemble & my DIS.com produces code that can be assembled with Fasm and no one said anything.

I wanted a disassembler that would look at the first .COM files made in 1983, and the out Files assemble with FASM, and I got it, by disassembling 256 byte contest winners, cuz they were plentiful, then fixing DIS.com when there was a problem. It is as if DIS.com was made for size coders.
I have a collection of over 400 DOS size code .COMs with FASM source code posted here.
https://board.flatassembler.net/topic.php?t=24254

Known DIS.COM bugs are:
decimal dump, doesn't do large files properly 100% of the time,
it is an editable DEFAULT setting, and
the defaults I used to build it are left in at the end of the DEFAULT MENU,
they probably don't work anymore.
Lower case instructions option has some labels in upper case still.
The last line grabs values left in memory to make an instruction line that didn't exist in the original .COM file. Edit it out is what I do.

TIMES ## DB ## ;are off by one sometimes.
DIS.com finds text, and big buffers are NOT 1000 db 0 LINES-of-CRAP
times 1000 db 0 ;is a bit cleaner huh.
DB "This is the text lines output.",13,10

unzip DIS104.ZIP from the c: root to directorys to make c:\dis\*.*
Then the path to the files match the .bat files enclosed. (Hopefully?)
Use this .bat file to unzip it.

@echo off
md dis
PKUNZIP -e -d -Jhrs dis104.ZIP

Sincerely Bitdog

If anyone would try it on FREE DOS & report back to me here, that would be GREATLY appreciated.
Some constructive criticism would be nice.

I have a few 100% DOS computers I use for this stuff and don't know what others are using these days, or how a DOS box works, & no one says anything. I pushed it with one person and they said that is DIS.com worked in an XP DOS BOX SP3. That is all I could get.

DIS102.com got 77 downloads.
Making the world a better place a little bit at a time.


Description: DIS.com Version 1.04 for FASM DOS 16 bit code & some 32 bit.
Download
Filename: DIS104.ZIP
Filesize: 528.46 KB
Downloaded: 26 Time(s)

Post 11 Mar 2026, 02:48
View user's profile Send private message Reply with quote
AsmGuru62



Joined: 28 Jan 2004
Posts: 1807
Location: Toronto, Canada
AsmGuru62 07 May 2026, 20:22
Hi, I see, you describe everything in the post. I will try the DIS.
I see this in your post: "size code .COM file" --- what is this term? I never heard it before.
I will use DosBOX-X (I like the fonts it has, better than DOSBox), I am not sure what FREE DOS is.
Post 07 May 2026, 20:22
View user's profile Send private message Send e-mail Reply with quote
bitdog2u



Joined: 31 Jan 2023
Posts: 62
bitdog2u 08 May 2026, 00:05
Size code is the cool graphic algorithms like Mandelbrot
demo .com files that try for 256 bytes and do contests, all around the world, quite a few times a year. They have been doing it since 1983 or so, and they are getting good.....
Very impressive coding, mostly FPU that is FAST.
I was using them to build/test the FPU code instructions in DIS.com
They make them for size, so they don't clean up the defaults, and they don't exit clean.
CPU LOCK & reboot, crap, but I worked over 400+ of them and got exit code and source code.
400+ is a shit pot of them. I was wondering where you ran old DOS PROGRAMS?
I have never heard of DosBOX-X
Is that for Windoze Linuix Sinclare ?

I ask because, my programming uses BIOs data, & I moved the stack to the video seg,
and other weird stuff that works fine in DOS but what about what DOS box others are using ?

Free DOS is some kind of DOS CLONE that runs on NON DOS computers, it can be found online.
dos386 the moderator of the DOS forum here has all those answers.
i have never tried it.
I can't work anymore, so I might not be able to move a computer, and get it set up.
OLD age isn't for pussies......
Post 08 May 2026, 00:05
View user's profile Send private message Reply with quote
AsmGuru62



Joined: 28 Jan 2004
Posts: 1807
Location: Toronto, Canada
AsmGuru62 08 May 2026, 15:34
I ported a Star Trek game from PDP-11 Fortran into COM file.
I will try the DIS on it. It has a lot of FPU.
But it has no graphics, just text adventure from the 1979.
Post 08 May 2026, 15:34
View user's profile Send private message Send e-mail Reply with quote
bitdog2u



Joined: 31 Jan 2023
Posts: 62
bitdog2u 08 May 2026, 21:20
DIS.com will do LARGE FILES but, there will be more mistakes. To get the labels working right takes A LOT OF WORK on large files. Practice on little files first, would be my advice. The size code demos are recommended. DIS.com will do all the FPU instructions, and do large files, and it splits them up to 28k size and includes the next file. DIS.com will DIS it's self and FASM puts it back together OK. You can set defaults to 60k out file size.

If a .COM or .EXE is written in 386 code, My 286 DIS.com probably won't DIS it right.
I was using Candymans QDD32.exe for that, but his code won't assemble with anything, So I wrote DISn.com to convert it to output that is similar to DIS.com but it still won't assemble. No labels. But it does make code patch snipits to fix or fill in DIS.com out files.

If you really want the STAR TREK source code, you may have a real battle ahead of you.
Email me the code and I will try to get it done for you, if needed.
1979 text game. I messed with one of those for a month.. LOOK RIGHT, and it would tell you what you see. MOVE FORWARD. is it that kind of game? It would be kinda cool to have the source code that assembled with FASM. Then you could figure out why it would never tell you what was behind the ROCK. Smile

If DIS.com can't get an out file that assembles, it does have an address on each line, and you can find where the COLOR of something is, or KEY BOARD input, and use those address to alter a HEX DUMP, and get the fix your favorite game needed that way.

I started looking into DosBOX-X for Linux mint 64, to see what that is all about. I'm not doing so well so far.
I could never install any Linux program unless it installed it automaticity. But I'm still working on it........

Thanks man, I needed some input.....
Post 08 May 2026, 21:20
View user's profile Send private message Reply with quote
chastitywhiterose



Joined: 13 Oct 2025
Posts: 57
chastitywhiterose 09 May 2026, 14:53
I have not yet tried your project but it sounds exciting because writing a disassembler is quite an achievement and I might try it on some of my dos programs because all of them are .com files.
Post 09 May 2026, 14:53
View user's profile Send private message Send e-mail Reply with quote
bitdog2u



Joined: 31 Jan 2023
Posts: 62
bitdog2u 10 May 2026, 20:51
Hello chasitywhiterose, what kind of DOS or box do you use ?
Have you tried Free dos ?
I run Linux mint for the internet, and could use it if it had a DOS box of some kind.

Have you tried DosBOX-X ?
How do I get it installed ?

If you get stuck running DIS.com I'll try to get you unstuck. That would help me make a better help file for DIS.com
Post 10 May 2026, 20:51
View user's profile Send private message Reply with quote
AsmGuru62



Joined: 28 Jan 2004
Posts: 1807
Location: Toronto, Canada
AsmGuru62 10 May 2026, 22:39
I have some questions.

I have a file with extension "D00" and the file with extension "DIS".
As I look at these, are these supposed to be put together? Basically, D00 is a continuation of DIS. Is that right?

The "p####" on every instruction --- what are these?
Are these some kind of helper tags? Same opcodes have same p### numbers.

Also, every opcode line has the quoted characters, like 'sometimes non-ANSI chars here'.
By the opcode encoding, they just repeat what HEX opcode is, but with characters.

The output is correct, but when I read it I find that when opcodes and addresses are
mis-aligned on the line -- it is uneasy to grasp.

Would you mind if I coded a small COM program to make it more aligned?

Also, I could not get the lines which begin with DB:
Code:
 DB 131,126,6,10 ; CMP word [BP+$06],10 ;codeDIF ;p131 $837E060A 'ƒ~ ' ;L06A4:
    

This looks like CMP WORD [BP+6h],Ah and it is decoded properly, but what is with the "DB ..." before it?
Post 10 May 2026, 22:39
View user's profile Send private message Send e-mail Reply with quote
AsmGuru62



Joined: 28 Jan 2004
Posts: 1807
Location: Toronto, Canada
AsmGuru62 10 May 2026, 22:43
DosBOX-X can be installed on Linux also. If you a big fan of Linux.
https://dosbox-x.com/
Post 10 May 2026, 22:43
View user's profile Send private message Send e-mail Reply with quote
bitdog2u



Joined: 31 Jan 2023
Posts: 62
bitdog2u 11 May 2026, 11:19
AsmGuru62, yeah, RENAME the .DIS file to a different basename.ASM and it will assemble in the same directory as the original.com file
Then FCC.com can compare the org to the assembled .DIS file. and once you have it EXACTLY THE SAME as the original.COM you can screw up any copy you want while playing with it. Save back-ups. The .d00 files have include "next.d##" on the last line, and they include themselves without renaming. I sometimes disassemble the assembled .DIS file and use FCV.com to visually compare the ASM code of each, to figure out where I went wrong. The delete key SEARCHES DOWN, insert searches UP and it reports the address of the DIFF found on the infobar at the bottom right . Add 100h for a com file, and you can find the code in the .DIS file because each line has a label that is the address of the next line below it. FCV.COM will load 2 .COM files and find the differences also.

The p### is the OP code number of the instruction so you can find the PROC in the source code that made the line.
The instructions strings are O### of the same ###

YEP the characters In the EOL INFO are the machine code that made the line. I use NC.exe editor and it shows the value under the cursor, so you can get the decimal values with the cursor, AND the hex dump is 2 digigest per byte, in the order they were found in the .COM file.

OK so I need a little better help on the EOL INFO part up front, to get people going without having to guess.
Your guess were right, but it's better if it is said.

The LABEL ADDRESS at EOL is for the line below, because my label dropper just changes the 2 bytes in front to 13,10 CRLF
so it drops to where is needs to be if it matches a call or jump found in the first pass.
I could have put a label on every line, but this way works and DDISS.COM will strip all the EOL INFO once you don't need it anymore, and it leaves code looking like code you would write. You can set defaults to lower case instructions and a space to the operands. Let me know when you get that far and I'LL get you unstuck when needed.

The DB 131 ;codeDIF is a decimal dump of the line, it shows the instruction and EOL INFO, but if the lines instruction was assembled it would be different bytes, that did the same job, but you won't know when you GET THE SAME CODE as the original.COM and that is what I wanted. I made it for me, and I'm sharing.
Different assemblers put out different code for the same instruction. AND a lot of the assemblers don't process signed numbers properly or something.
So I DDump all lines that often fail to assemble to the EXACT SAME BYTES. Once you have your .ASM creating the same bytes, then memory can be changed to a label like MOV [$1234],AX ;can be MOV [L1234],AX
DIS.com is a dummie, all it knows is the line it's on, after that it forgets everything and charges blind into the next line. So I need each line to have enough info that I could get something to assemble properly. That made the useage simple, DIS INFILE OUTFILE
The default settings are editable so you can have a few versions of DIS.com in path, and one of the defaults turns on/off the sizeDIF & codeDIF type comments?
if I remember correctly.
There is version of TED.com in the DIS104.ZIP AED.COM and it has BRIGHT code characters, and dull comments, so your EDIT AN.ASM view can ignore the comments unless you really want to see them. It's got bad code though, search & copy/paste fails.


I looked up the 1971 version of Star Trek, I didn't think they had personal computers back then.
They should have never let the night watchman have access to the ENIAC
Post 11 May 2026, 11:19
View user's profile Send private message Reply with quote
AsmGuru62



Joined: 28 Jan 2004
Posts: 1807
Location: Toronto, Canada
AsmGuru62 11 May 2026, 17:30
Thanks for explaining.

I ported the STAR TREK from 1979 Fortran-IV code for PDP-11.
I have the code right now. It is a big program, did not finish it yet.
It has a lot of text strings, they blow COM file size too close to a maximum.
Maybe, I should put all the strings into a file and just read it by an index, like: "Load string #221".

Another issue with any COM disassembler would be this one:
Code:
; COM Layout:

0100h Entry point for COM program

... some code in main() function ...

mov ax, 4C00h    ; Quit back to MS-DOS
int 21h

... all functions for the program ...

... all data for the program ...
    

When disassembler gets to data section, it begins interpreting the data as code instructions.
Your DIS gets the data correctly in most cases, but sometimes it just decodes as opcodes.
And that is Okay, because how would it detect that code stream is over and data section is now getting parsed.
Overall, it is great Disassembler!
Post 11 May 2026, 17:30
View user's profile Send private message Send e-mail Reply with quote
bitdog2u



Joined: 31 Jan 2023
Posts: 62
bitdog2u 12 May 2026, 12:57
Thanks man, you really went all out for me AsmGuru62, I owe you dude.
I still have a bunch of questions though. When you say Trek is a big file, HOW BIG, how many bytes ?
Over 2000 bytes starts getting into a real project. If you email me what you have, I will put forth an effort to get the code for you.
You say close to the max .COM size ? Starting on a 50+k?.com is really pushing it.
Can you remember how many seconds it told you to wait ?
That number was obtained by dividing the inFile size by some number I came up with by counting
one thousand and one, one thousand and two, then dividing the file size by the last count.
So it's not exactly accurate, but it does calm your nerves when you see that nothing is happening Smile
So did the .DIS file assemble back to the same code as the original TREK.com ?
DIS.com disassembling its self was the biggest .COM that I have done. 18k and FASM put it back together again ok.
DIS.com trunciated huge files that exceed the HEAP size, all init use once code is at the end of DIS.com and when it JMPs back to MAIN just the needed code is left, and the heap is about 55,000
bytes. If the inFile is trunciated there is a message of that in the final .D## file.

You say TREK.com is mostly text. Did DIS.com get that part right ? It usually doesn't drop a label for it though since it's not a CALLed or JMP to LABEL thingie ma bobber. But the end of each line has a Label, and the lines end with a period .?! er like that, then it includes CRLF zero $ ending chars.
It seems to do a better job than I expected it would, considering the fact that no other disassembler I tried could find any text, or a big buffer.
Also, if you get TREK.asm to assemble to exactly the same code can you run it ?
Some stuff just won't run. Like I was working on ASM.ASM and THEN decided to try the real thing, and it wouldn't run. So if I finished the project, I would have to do a work around on a lot of code just to use it.
Then I thought I had better see if the code was available online or a clone, so I didn't have to do work that was already done by others.

Yeah, DIS.com can't tell the difference between data & instructions, AND
it can't tell the difference between a number being moved into AX or a LABEL, so there is some real work required to get a WORKING.ASM out of a .DIS file
Often times data is in a group or groups, and I find it by seeing all screwed up instructions, like a CMP but no conditional jump follows. Most data is found in brackets [$1234] is the same as [L1234] Label. So I have to find and drop or make the label for it.

I found a couple of code errors in p198 p199 p137 for signed stuff, so in a month or so I'll have enough fixes to justify a new DIS.com version 1.05 maybe.

For text in a couple of .COMs I was DISing, I just copy/paste the text from the .COM to a .TXT file and FASM
file "filename.ext"
would include it RAW.
Then there was some BIT MAP BINARY DATA in one, so I snagged the code from the DIS file, and assembled that alone, then ran it through BDUMP.COM which is enclosed, and it did a binary dump like a decimal dump and then a MERGE.COM put it back into the .DIS file.

I was hacking AS30 editor, and commented out the CHECK SUM CODE that exited the program, and did a TIMES 20 DB 144 ; to replace the 20 bytes with NOPs so I didn't have to fix the labels, and it ran fine after that Smile
So i guess that for every problem out there, there is a creative solution in the waiting.

Ok so I'm guessing that DIS.com ran in Linux DosBOX-X
You didn't actually say, so can you confirm that ?
What Linux ?
I've visited that Linux link you posted and didn't download, I've never been able to install a Linux program, unless it can be found by the auto installer.

The enclosed DIS.com Help to get you started, and difficulty learning curve is my next series of questions.
Have you got any suggestions ?
Constructive criticism ?

Did you check out the size code .COM files I posted here in the DOS section ?
Some of those a quite impressive for their size.
Post 12 May 2026, 12:57
View user's profile Send private message Reply with quote
AsmGuru62



Joined: 28 Jan 2004
Posts: 1807
Location: Toronto, Canada
AsmGuru62 12 May 2026, 15:52
My usual PC is Windows 10, so I run DosBOX-X for windows, I got it on that link.
DIS.COM runs fine on that DosBOX, produces a DIS file + D00 file, which is compiled by FASM with no issues.
However, my TREK port is not done yet, I am completing it.

I did not try any .COM files yet.
Are they so called 'demo' programs, where you can see what small program can do?
Mostly graphics, like Mandelbrot?
Post 12 May 2026, 15:52
View user's profile Send private message Send e-mail Reply with quote
bitdog2u



Joined: 31 Jan 2023
Posts: 62
bitdog2u 13 May 2026, 02:52
Your TREK is an .EXE ? but DIS.com is set up for .COM files
It will do .EXE files but the 100h address are off, and the header is first, so you have to load the .EXE into a graphical DEBUGGER like INSIGHT to see where the start address actually is. EXEHEADR.com will show you also, but the DEBUGGER is easier.
Email me a copy of TREK.exe when it's ported, and I can help you better.

The size code .COMs are called DEMOs and INTROs, the programmers are called SIZE CODERS was my understanding, but I'm not in that CLICK GROUP. Mandelbrot is in that group. It's the example code in Fasm.zip, and I added color to it.

Carry on then.......
Post 13 May 2026, 02:52
View user's profile Send private message Reply with quote
AsmGuru62



Joined: 28 Jan 2004
Posts: 1807
Location: Toronto, Canada
AsmGuru62 13 May 2026, 14:15
I am trying to fit the ported code into TREK.COM.
I tried a few COM files in DISTHIS folder -- looks good.
I will send you the TREK when it is done. It is fun to play!

Now, I wanted to point something out.
When you can compile back disassembled code --- it is a great test for disassembler.
But, I think the main point for disassembler is to find out what is a logic behind a program.
I think, it is more important.
DIS does it well, I have not seen any opcode, which was not correct.
Post 13 May 2026, 14:15
View user's profile Send private message Send e-mail Reply with quote
bitshifter



Joined: 04 Dec 2007
Posts: 807
Location: Massachusetts, USA
bitshifter 14 May 2026, 00:59
to install dosbox on linux mint, open terminal and do:
Code:
sudo apt install dosbox    


then run it once and type: exit

then view or edit config at:
~/.dosbox/dosbox-[version].conf

use this comand to mount virtual drive at app dir
mount c ~/dosbox

optionally you can auto mount in config (more complex)

another option is to run x86 emulator like bochs and run native freedos on it...
Post 14 May 2026, 00:59
View user's profile Send private message Reply with quote
bitdog2u



Joined: 31 Jan 2023
Posts: 62
bitdog2u 14 May 2026, 04:33
AsmGuru62, I don't think I can get DIS.com to paint a better overview of a .COMs code. That's a tough one.
A folding editor is as close to that as I've seen. You can fold, PROCs into a one-liner, and the clutter kinda goes away.
Try \DISTHIS\AED.COM it has BRITE BOLD instructions and dull lower case comments, so you can easily ignore most of the clutter, also. That AED.com has a WEIRD JUMP TABLE, you press LEFT ALT+# 0-9 to save an address in the middle of the screen, and RIGHT ALT+# to jump back to it. As the text expands/shrinks the addrs are not updated, but it could have a search for ~ unlike character and update them all at once, then next time you edit the file it would reset them all for you.

Yeah, I would like to play TREK.com
I still have SPACE QUEST 3 and the box still looks new.

DIS.com thinks a series of pushes is a text string sometimes, & I found a couple of mistakes it makes that needs a fix,
But I can usually fix those in the outFile.DIS for now.
I had DIS.com lock up, yesterday. I think it found a lot of text, just when the outFile buffer was full, and I got overflow. DARN IT, I was feeling so proud of myself, then this.

CandyMans disassembler is real good, I would like to see him, snag my FIND TEXT & BIG BUFFERs code and make his outFiles assemble with FASM also. I tried to set that standard, but we will just have to wait and see. Maybe he will go open source like I did, and I can fix it. But I can only do FASM.

Have you tried FCV.COM ? Visual File Compare, I can't live without it for over an hour, but no one else bothered to use it.
Later dude.........

Hello bitshifter,,,, I did a bit of info gathering on DOS BOX yesterday, and found that I can AUTO INSTALL VIRTUAL something, and it loads a box or has a box. I can't do any kind of Linux terminal input commands. There is nobody to teach me, and I don't know any of the words the teachers use. They can't teach me anything. It is easy to find the proper instructions when you already know the subject. But if you don't know BS when you see it, you will have to learn thousands of nothing's from nobodies.
Then it looks like, FREE DOS will run in a VIRTUAL BOX, but I would be better off to have a dedicated machine set up for that.
So FREE DOS is out of the picture for now, for me.
There wasn't any real info about VIRTUAL BOX available and after an hour, I moved on.
Now I'm going to go give it another hour, and try to get some facts before I make a move, and screw up my internet machine or my DOS machine. Without that I have nothing.
Maybe it was the VIRTUAL x86 emulator that I could AUTOLOAD.
I will save your info, and probably make a choice in a week or so. Thanks man....
Post 14 May 2026, 04: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.