flat assembler
Message board for the users of flat assembler.

Index > DOS > Please recommend me a DOS-based disassembler!

Goto page Previous  1, 2
Author
Thread Post new topic Reply to topic
bitdog2u



Joined: 31 Jan 2023
Posts: 41
Location: Ketchikan, Alaska
bitdog2u 28 Mar 2025, 11:53
I wrote a disassembler in FASM 1.51 for 16 bit dos .com files
I'll post a HELLO WORLD out put below.


Last edited by bitdog2u on 15 Jun 2025, 16:04; edited 1 time in total
Post 28 Mar 2025, 11:53
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20685
Location: In your JS exploiting you and your system
revolution 28 Mar 2025, 12:29
Code can be posted inline if it is short. Or it can be attached to a post if it larger.
Post 28 Mar 2025, 12:29
View user's profile Send private message Visit poster's website Reply with quote
bitdog2u



Joined: 31 Jan 2023
Posts: 41
Location: Ketchikan, Alaska
bitdog2u 04 Jun 2025, 17:31
Code:
;FASM 1.51  hello      .asm

        ORG 100h
        USE16
L0100:  ;Instructions           OPcode= ;p### HEX#s     Chars   ;Label:4next

        MOV     DX,272                  ;p186 $BA1001   'º'  ;L0103:
        MOV     AH,9                    ;p180 $B409      '   ;L0105:
        INT     $21                     ;p205 $CD21     'Í!'   ;L0107:
        MOV     AH,8                    ;p180 $B408      '   ;L0109:
        INT     $21                     ;p205 $CD21     'Í!'   ;L010B:
        MOV     AX,19456                ;p184 $B8004C    L'  ;L010E:
        INT     $21                     ;p205 $CD21     'Í!'   ;L0110:
 DB "Hello World !",13,10,36    ;L0120    

Above is my 286 code disassemblers output of HELLO.com


Last edited by bitdog2u on 15 Jun 2025, 16:43; edited 3 times in total
Post 04 Jun 2025, 17:31
View user's profile Send private message Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1435
Location: Piraeus, Greece
Picnic 04 Jun 2025, 21:00
That writing style is unmistakable, good to see you around, bitdog!

Really nice work on the disassembler! The output is detailed and informative, and the labeled format makes it easy to follow.
I think that with a bit of cleanup (ike replacing hardcoded addresses with labels) it could become a useful tool for reverse engineering and learning (that is, if you decide to release the sources).

Code:
ORG 100h
USE16

L0100:
MOV DX,272       ; 3 bytes (BA 10 01)
MOV AH,9         ; 2 bytes (B4 09)
INT 21h          ; 2 bytes (CD 21)
MOV AH,8         ; 2 bytes (B4 0Cool
INT 21h          ; 2 bytes (CD 21)
MOV AX,19456     ; 3 bytes (B8 00 4C)
INT 21h          ; 2 bytes (CD 21)
    


Let me analyse it a bit more (a.k.a. channel my inner DOS archaeologist)

3 + 2 + 2 + 2 + 2 + 3 + 2 = 16 bytes
0x100 + 16 = 0x110 - 272 (decimal)

So yes, at offset 0x110, the "Hello World!" string begins its life. Mystery solved Smile
Post 04 Jun 2025, 21:00
View user's profile Send private message Visit poster's website Reply with quote
bitdog2u



Joined: 31 Jan 2023
Posts: 41
Location: Ketchikan, Alaska
bitdog2u 09 Jun 2025, 12:38
Thanks PICNIC
Thanks Revolution
I will see you around, my friend.


Last edited by bitdog2u on 15 Jun 2025, 16:08; edited 6 times in total
Post 09 Jun 2025, 12:38
View user's profile Send private message Reply with quote
bitdog2u



Joined: 31 Jan 2023
Posts: 41
Location: Ketchikan, Alaska
bitdog2u 09 Jun 2025, 13:22
You guys have a great FORUM here.


Last edited by bitdog2u on 15 Jun 2025, 15:54; edited 1 time in total
Post 09 Jun 2025, 13:22
View user's profile Send private message Reply with quote
bitdog2u



Joined: 31 Jan 2023
Posts: 41
Location: Ketchikan, Alaska
bitdog2u 09 Jun 2025, 16:36
I'm going to check out the CPUID code available here, Thanks


Last edited by bitdog2u on 15 Jun 2025, 15:55; edited 1 time in total
Post 09 Jun 2025, 16:36
View user's profile Send private message Reply with quote
bitdog2u



Joined: 31 Jan 2023
Posts: 41
Location: Ketchikan, Alaska
bitdog2u 09 Jun 2025, 21:55
Post 09 Jun 2025, 21:55
View user's profile Send private message Reply with quote
bitdog2u



Joined: 31 Jan 2023
Posts: 41
Location: Ketchikan, Alaska
bitdog2u 10 Jun 2025, 10:09
I like that.


Last edited by bitdog2u on 15 Jun 2025, 16:41; edited 3 times in total
Post 10 Jun 2025, 10:09
View user's profile Send private message Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1435
Location: Piraeus, Greece
Picnic 10 Jun 2025, 10:18
bitdog2u wrote:
Ok PICNIC
You bit quick, & think well, so here is the Feast, with restrictions.
THIS VERSION IS NOT READY FOR RELEASE, but you can play with what I have.
I made it so I could look into the little .COM files that came out when DOS 1 was being created to see how A REAL MAN writes assembly. You might find that kinda fun too.
RULE #1 DIS.COM will dis dis but don't. You will waste a lifetime writing in the labels, then next week I will release the source code and you will regret the hack.
BUTT, dis will dis dis and you will see lots of 29k .inc files that NC.exe will just barely edit.
RULE #2 make 3 copys of it DIS1 DIS2 DIS3 and edit them. You can set the defaults at the top by changing the FIRST LETTER of the line to a CAPITOL LETTER = ON & lower case = off.
Then any.com you DIS can be either a DECIMAL DUMP that always assembles to exactly the same as the original com, or AN.ASM that DUMPS OUT TEXT or NOT, and that is your three. With that you can use the output to FILL IN the output from other disassemblers that already have the labels.
To get ACTUAL LABELS instead of a decimal number, use the HEX DUMP on the right of the line.
IT IS IN BYTE FORM and the labels are Little ENDian so you have to reverse the last 2 HEX bytes with a L in front and you have your label. So in effect the label info is already written on the line
That is why it takes for ever to properly DIS a LARGE.ASM so up to a 2k.com is easy enough.
ANY WAY I'm looking forward to your FEED BACK, bitdog2u at gmail

PS, I run a 100% dos computer and code using DIRECT MEMORY read/writes to Video seg & BIOS seg.
I don't think my stuff will run in a DOS BOX. So if my stuff is total crap and won't run,
I would like to know what it doesn't run on, cuz it runs fine on mine. What is your CPU, YEAR, OS, ETC ?


Hello,
While I may not be the most qualified to provide an in-depth critique of this disassembler, as others in the community likely have more experience with such tools...
However, I ran another quick test under DOSBox on Windows 10 to evaluate its output.

Test Code:
Code:
     org  100h
     mov cx, 1000
u1: 
    dec cx
    cmp cx, 100
    jae u1
    int 20h
    


Disassembler Output:
Code:
    MOV CX,1000         ; p185 $B9E803
    DEC CX              ; p073 $49
    DB 131,249,100,115  ; CMP CX,29540
    CLI                 ; p250 $FA
    INT 20h             ; p205 $CD20
    


The sequence (should have been something like) 83 F9 64 73 was misdecoded as CMP CX, 29540?


bitdog2u wrote:
CandyMan has a disassembler also....
https://board.flatassembler.net/topic.php?p=109397#109397

Yes, I have used it occasionally in the past!
Post 10 Jun 2025, 10:18
View user's profile Send private message Visit poster's website Reply with quote
bitdog2u



Joined: 31 Jan 2023
Posts: 41
Location: Ketchikan, Alaska
bitdog2u 10 Jun 2025, 11:44
HI, where are you from?


Last edited by bitdog2u on 15 Jun 2025, 16:36; edited 4 times in total
Post 10 Jun 2025, 11:44
View user's profile Send private message Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1435
Location: Piraeus, Greece
Picnic 10 Jun 2025, 12:26
Yoo are welcome.
I didn't test FCV much, to be honest, but it runs normally (and appears trouble-free and stable) in DOSBOX on Windows 10. Some images for proof.
One observation: when colors are enabled and it exits, the colors remain on the console. Perhaps it would be better to revert to the default settings.
Very nice!

Image

Image

Image
Post 10 Jun 2025, 12:26
View user's profile Send private message Visit poster's website Reply with quote
bitdog2u



Joined: 31 Jan 2023
Posts: 41
Location: Ketchikan, Alaska
bitdog2u 10 Jun 2025, 13:19
OH CRAP it needs a rewrite again.
Where is my head?


Last edited by bitdog2u on 15 Jun 2025, 16:10; edited 1 time in total
Post 10 Jun 2025, 13:19
View user's profile Send private message Reply with quote
bitdog2u



Joined: 31 Jan 2023
Posts: 41
Location: Ketchikan, Alaska
bitdog2u 11 Jun 2025, 03:03
I think I found the new hard drive killer virus "SLEEPER" in the disassemblers code.
I didn't know I had it on my DOS programming machine, cuz it doesn't run on DOS.
Delete the disassembler, and I'll try to get it fixed. BETA testing was a bust.
My sincere_est regrets being here like this.
Post 11 Jun 2025, 03:03
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2

< 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.