flat assembler
Message board for the users of flat assembler.
 Home   FAQ   Search   Register 
 Profile   Log in to check your private messages   Log in 
flat assembler > DOS > extract the integer part of the real number

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



Joined: 01 Mar 2011
Posts: 396

mns wrote:
thank you fasmnewbie for your valuable insights.
by the way i thought in c it's compiler first convert the source to assembly code before generating the machine code.if that's correct that mean if we use c, we use someone's assembly routines(no offence for c programmers) over and over again without understanding really what's happening?
actually, i like c also and trying to learn it in these days side by side with assembly. Smile



Good for you. In the hand of a crafty programmer, a C program can be a very powerful tool. For example, many assembly programmers do rely on C people to write them debugging code so that they can see what's wrong with their own so-called 'low-level' assembly code. Just can't live without it.

But in your particular case, no debugger out there can help you because all FPU environment (stack, control flags, status flags, tag words, fxam) shows normal output on the debugger. You just have to gain more technical knowledge on FPU. Read "Simply FPU" by Raymond. Highly recommended.
Post 08 Nov 2015, 08:04
View user's profile Send private message Visit poster's website Reply with quote
mns



Joined: 20 Dec 2007
Posts: 98
Location: Piliyandala,Sri lanka
thanks fasmnewbie.
i'm already using SIMPLY FPU and it is very easy to understand. Smile
Post 08 Nov 2015, 11:21
View user's profile Send private message Send e-mail Reply with quote
AsmGuru62



Joined: 28 Jan 2004
Posts: 1382
Location: Toronto, Canada
@fasmnewbie:
Great insights, but I respectfully disagree about the debugger.
When you load ST0 with "4789640.889" the debugger must show ST0 as 4789640.889.
And if ST0 shows 4789641.000000000 - then something is strange about the declaration of the variable.
So, I think, debugger always helps.
Post 08 Nov 2015, 11:43
View user's profile Send private message Send e-mail Reply with quote
fasmnewbie



Joined: 01 Mar 2011
Posts: 396

AsmGuru62 wrote:
@fasmnewbie:
Great insights, but I respectfully disagree about the debugger.
When you load ST0 with "4789640.889" the debugger must show ST0 as 4789640.889.
And if ST0 shows 4789641.000000000 - then something is strange about the declaration of the variable.
So, I think, debugger always helps.



Guru, I don't want to extend the argument with you. You are my favorite guru. I was once as confused as mns when you and others came to my rescue and attended to my beginners questions Very Happy
Post 10 Nov 2015, 13:35
View user's profile Send private message Visit poster's website Reply with quote
mns



Joined: 20 Dec 2007
Posts: 98
Location: Piliyandala,Sri lanka
thank you very much guys.with the valuable opinions and ideas of you all i manage to write a programme which can out put floating point value to the screen.
it can write only(had to make the limitation to have the correct number) floating point values below 999999999999999999.0 up to 4 decimals.
i hope you have time to suggest corrections and improvements.thank you


Description:
Download
Filename: WrtNum(working).zip
Filesize: 1.94 KB
Downloaded: 30 Time(s)

Post 01 Dec 2015, 11:51
View user's profile Send private message Send e-mail 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


Powered by phpBB © 2001-2005 phpBB Group.

Main index   Download   Documentation   Examples   Message board
Copyright © 2004-2016, Tomasz Grysztar.