flat assembler
Message board for the users of flat assembler.

Index > DOS > H2D.com with fasm source code

Author
Thread Post new topic Reply to topic
bitdog2u



Joined: 31 Jan 2023
Posts: 50
bitdog2u 14 Jun 2025, 18:42
H2D.com with FASM source code. use16 286

Syntax= H2D FFFFFFFFh
Enter a Hexdecimal number.
Displays a Decimal number."
Dwords, using 16 bit 286 code.
By Bitdog

include "GMHD.inc" ; Get Memory Hex Dword, (ascii chars into Dword DX:AX)
include "WDD.inc" ; Write Decimal Dword in DX:AX (code from stackoverflow)

MS DOS couldn't print a TRUE 32 bit decimal number using 16 bit code,
but here it is, in a CALL able PROC form you might find useful.

Does it assemble to the same code ? What OS does it run on ? Suggested improvements ?

PS. if you have a problem with me or anything I'm doing, please PM Private Message me.
I will try to get a reasonable fix for us.

H2D.zip Version 1.01 downloaded 87 times.
This Version 1.02 fixed PUSH POP DX in signed code. JMP BYTE changed, Print AL or AX added.


Description: Gets an ASCII HEX input value & Prints DX:AX in decimal, using callable PROCs. Version 1.02 updated 8/23/25
Download
Filename: H2D.ZIP
Filesize: 3.76 KB
Downloaded: 166 Time(s)



Last edited by bitdog2u on 23 Aug 2025, 17:59; edited 9 times in total
Post 14 Jun 2025, 18:42
View user's profile Send private message Reply with quote
SeproMan



Joined: 11 Oct 2009
Posts: 75
Location: Belgium
SeproMan 14 Jun 2025, 22:45
I would like to add a word about proper attribution.

You have your program display the text "By Bitdog & Peter Cordes".
I reviewed your files and must conclude that nothing originates from the actual person Peter Cordes, that is active on the Stackoverflow forum. It is a different Stackoverflow user from whom that you are borrowing code snippets (included their comments).

I happen to know (and respect a lot) Peter Cordes, and I think he would be displeased seeing his name mentioned in assembly code that explicitly disregards his many marvelous teachings: e.g. how you validate the hexadecimal digits is so not Peter Cordes.

I hope you do realize the importance of proper attribution, and I also hope you keep up the good work of posting interesting assembly programs. I for one like to read those a lot...

_________________
Real Address Mode.
Post 14 Jun 2025, 22:45
View user's profile Send private message Reply with quote
bitdog2u



Joined: 31 Jan 2023
Posts: 50
bitdog2u 15 Jun 2025, 04:44
I am going to delete all my crap here except the original post. I can only delete the last post, just as you should delete the last post if you can. Please.

Hay, I wrote you all a 16 bit disassembler and you can have it for free if you want my friend.
I'm just about to post it....


Last edited by bitdog2u on 11 Mar 2026, 01:35; edited 1 time in total
Post 15 Jun 2025, 04:44
View user's profile Send private message Reply with quote
SeproMan



Joined: 11 Oct 2009
Posts: 75
Location: Belgium
SeproMan 11 Aug 2025, 15:18
Quote:
This is one of the DX:AX print code examples by Peter Cordes on stackoverflow.com
In the future it is advised that you do some research before you lay into others.
(So I don't have to;) Please.


Then you research a bit better first...

The link that you provided leads to a post by someone named Bengisu Adsiz. It has nothing to do with Peter Cordes! (Peter merely changed the title a bit).

The code snippet that does the numerical conversion, was originally posted by Sep Roland in his Q/A at https://stackoverflow.com/questions/45904075/displaying-numbers-with-dos. So if you need to attribute, then do so for the original author which is Sep Roland.

_________________
Real Address Mode.
Post 11 Aug 2025, 15:18
View user's profile Send private message Reply with quote
bitdog2u



Joined: 31 Jan 2023
Posts: 50
bitdog2u 15 Aug 2025, 13:48
I am going to delete all my crap here except the original post. I can only delete the last post, just as you should delete the last post if you can. Please.

Hay, I wrote you all a 16 bit disassembler and you can have it for free if you want my friend.
I'm just about to post it....


Last edited by bitdog2u on 11 Mar 2026, 01:34; edited 1 time in total
Post 15 Aug 2025, 13:48
View user's profile Send private message Reply with quote
SeproMan



Joined: 11 Oct 2009
Posts: 75
Location: Belgium
SeproMan 16 Aug 2025, 21:07
Quote:
Then there is a line that says, answered by Sep Roland
but there is nothing above that so he must have deleted a stupid statement.


Maybe you are using a broken browser, because I can clearly see what is written above the line "answered by Sep Roland".

Quote:
Ok, so I checked out your link and discovered that Sep R0LAND asked if anyone could help him print out DX:AX because he couldn't find any code for that even in R. Brown's int list,
and Peter Cordes supplied the answer.


What you consider an answer by Peter Cordes is actually called a "comment". The actual answer was given by Sep Roland himself. This may seem confusing at first, but it is a technique called a Self-answer, something the stackoverflow site promotes in order to collect well-researched Q/A's.

Quote:
Then the code is displayed and edited by Fifoernik
9,89911 gold badge2323 silver badges
Who probably knows what he is doing.


User Fifoernik merely edited a couple links to wikipedia. You can easily verify this for yourself if you click on the word "edited". It will open up the history of all the edits that the post received. There can be no doubt that the original answerer is Sep Roland and that it is Sep Roland "who probably knows what he is doing."

Quote:
So now, I don't know what your point is ?
Do we have a language barrier problem here ?
Did they switch your meds lately ?


Please keep it polite! The real problem is that you don't understand enough of how the stackoverflow site works (or else, like I said above, that your browser isn't rendering everything correctly and you don't see every piece of information).

_________________
Real Address Mode.
Post 16 Aug 2025, 21:07
View user's profile Send private message Reply with quote
bitdog2u



Joined: 31 Jan 2023
Posts: 50
bitdog2u 01 Oct 2025, 07:49
I am going to delete all my crap here except the original post. I can only delete the last post, just as you should delete the last post if you can. Please.


Last edited by bitdog2u on 11 Mar 2026, 01:31; edited 1 time in total
Post 01 Oct 2025, 07:49
View user's profile Send private message Reply with quote
PoissonMan



Joined: 23 Sep 2025
Posts: 3
Location: INT 24
PoissonMan 11 Oct 2025, 12:09
Is this really the hill you want to die on? Just admit that the attribution was incorrect and move on. Even if Peter Cordes did write the code in question, that wouldn't make him the author of this program, since the contribution was completely unrelated.
bitdog2u wrote:
SeproMan needs to read his private messages. & since he didn't,

Looking at the sheer vitriol expressed above, I can see why.
Post 11 Oct 2025, 12:09
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.