flat assembler
Message board for the users of flat assembler.

Index > Main > ctg x

Author
Thread Post new topic Reply to topic
GrEEzLy



Joined: 14 Dec 2010
Posts: 3
GrEEzLy
Please help me write a program to calculate the 'ctg x' in the language fasm, and I for a long time in hospital and did not understand what to do. Thank you so much!
Sorry for my English...
Post 14 Dec 2010, 17:27
View user's profile Send private message Reply with quote
GrEEzLy



Joined: 14 Dec 2010
Posts: 3
GrEEzLy
I have a function code, but I need it as something to do with I / O block, transfer the number from a string.

format PE GUI 4.0


section '.text' code readable executable
FLD [x1]
fptan
fxch
fdiv

section '.data' data readable writeable
x1 dt 45.0
Quote:


Post 14 Dec 2010, 17:38
View user's profile Send private message Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr
GrEEzLy,

Do you need cotangent of angle of 45 radians? Anyway, fdiv needs some arguments, contrary to fdivp/fdivrp (latter even doesn't need fxch prior to it.

Is there any trouble converting st(0) into readable representation?

[code] … [/code] tags are useful.

Hope you'll feel better soon.
Post 14 Dec 2010, 18:25
View user's profile Send private message Reply with quote
Tyler



Joined: 19 Nov 2009
Posts: 1216
Location: NC, USA
Tyler
http://www.arl.wustl.edu/~lockwood/class/cs306/books/artofasm/Chapter_14/CH14-6.html -- Search this page for "cotangent". There's an example of how to compute it.
Post 14 Dec 2010, 19:24
View user's profile Send private message Reply with quote
GrEEzLy



Joined: 14 Dec 2010
Posts: 3
GrEEzLy
thanks! don't worry, i'm from russia =) Russian man survives is always and everywhere
Post 14 Dec 2010, 19:24
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-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.