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: 40
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: 44 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: 74
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: 40
bitdog2u 15 Jun 2025, 04:44
SeproMan from Belgium says: 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...


Bitdog says:
https://stackoverflow.com/questions/67796211/how-to-display-a-32-bit-div-result-stored-in-dxax
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.
Post 15 Jun 2025, 04:44
View user's profile Send private message Reply with quote
SeproMan



Joined: 11 Oct 2009
Posts: 74
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: 40
bitdog2u 15 Aug 2025, 13:48
I'm not an expert on any of that stuff. What happened is I finally ran across a decimal printer that worked and got a copy working on FASM. Then instead of taking the credit for it I tried to get credit from the person I got it from.
I did not search the ENTIRE SITE to see that other posted it also. From now on I WILL NOT GIVE CREDIT to anyone so you will be happy. No wait as sec, that won't work. Hay why don't I just do the best I can as I go, JUST LIKE I WAS DOING.
What are you doing ? Don't you have better things to do that argue with someone needlessly ?
Now that I've vented, I'll check out Sep Roland and offer this as payment for your trouble.

Use AI to help write some procedures for you, here is the site, and feed it the lines below one at a time.
https://workik.com/ai-powered-assembly-code-generator
Write .ASM code for a FASM DOS 16 bit .COM that uses the 8042 keyboard chip.
Write .ASM code for a FASM DOS 16 bit .COM that issues a keyboard specific EOI to the 8042 chip
LEFT CLICK on the COPY word upper left, then paste into a file.txt
I hope that helps someone, somewhere, somehow.
PS, one of the lines I used to get code, return almost byte for byte of the code I INVENTED last month.

SeproMan says:
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.

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.

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

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.

Then there is a code fix by Peter Cordes posted.

So now, I don't know what your point is ?
Do we have a language barrier problem here ?
Did they switch your meds lately ?
Post 15 Aug 2025, 13:48
View user's profile Send private message Reply with quote
SeproMan



Joined: 11 Oct 2009
Posts: 74
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
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.