News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

[8086] Drawing trigonometric functions

Started by wiesiek, January 17, 2011, 02:46:53 AM

Previous topic - Next topic

wiesiek

Hi there.
i need to write app in asm 8086 which will be drawing trigonometric functions .
is any one here who would like to help me ?
regards
wiesiek

dedndave

if i take you literally, that is a major undertaking
what i mean is, the 8086 by itself has no intrinsic trig function support
that means you'd have to write your own trig function code - a big task
and - the 8086 is a 16-bit processor of days past
not very many people are going to spend time developing code for it
it would make life easier for you if you had an 8087 math coprocessor to go with it   :P

however, if you mean 32-bit code (x86, not 8086), then modern processors support FPU math
i suggest you start out with the masm32 package - Ray's FPU tutorial is in the \masm32\tutorial\fputute folder   :U

as for the program to draw, i saw some nice example code somewhere in the forum a while back
they were drawing curves and such - try the forum search tool

wiesiek

Hmm i have to write a app in asm 8086 with coprocessor 8051 where it will be drawing function (similar to Fourier series (i will put it here if someone rly will help me))
arguments will be taken from file where in lines u will have

xmin(Domain of a function)
xmax(Domain of a function)
ymin(co-domain )
ymax(co-domain )
n (number of iterations of sum of fourier)
a1
b1
..
an
bn


*we don't need to draw arrows an lines of Coordinate system
*conversion from x from screen -> x in equation is done by this pattern:

x = xmin + N(xmax - xmin)/(resolution of screen in x axe)

y = ymin + M(ymax - ymin)/(resolution of screen in y axe)

N,M are coordinates on screen.

donkey

You could ask your teacher for some example code. The 8051 is a GP microcontroller, when Dave asked about a coprocessor he meant a math coprocessor to do floating point arithmetic. You might like to check out RULE 9 since it appears to apply here. Lastly the 8086 did not support 32 bit addressing so this is a thread that should be properly in the 16 bit subforum.
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

wiesiek

I dont know about coprocesor, which one are we using buut there are codes:
http://rudy.mif.pg.gda.pl/~bogdro/dos/a_kurs05.htm

sry that it is in my language.

dedndave

yah - it's not an 8051 - lol
if it were, you'd probably never graduate

Ray's FPU tutorial is where you should start
http://www.ray.masmcode.com/fpu.html

vanjast

An 8086 cpu does general operations, and Integer and BCD maths operations.
An 8087 is an FPU (Floating Point Arithmetic chip) that does the Trig functions that you're looking for.

The 8086/87 cpu combination is obsolete (by some 25 years), so I'd imagine you're looking for something more up-to-date.
The latest pentium cpu(whatever they call it now) has all of this on a 'single' chip and more, and the language is much the same as the 8086/87, with modifications.
You'll need to read up on the latest intel cpu's and asm language in a hurry (it's worth it).

If you're looking for Trig functions on the 8051 micro-controller series, they only exist in libraries which emulate the functions as the 8051 instruction set does not support trig functions - that is the last time I looked. There are many derivatives of the 8051 series cpu's, maybe some might have trig functions.. google this.

:wink

vanjast

So how do i delete this double post ??  :green2

wiesiek

OK.
We are using coprocessor 386.


OK.
I'm willing to pay someone to help me do this.
I have not been doing projects from Assembler regular and now my situation is not good:/
exams are approaching and i have projects from other subjects.

It's not like i dont know anything from assembler, but this float representation and functions and ect is killing me off.

I know its ignoble behaviour and i'm not proud of it, but have to big gaps in knowledge.

redskull

Quote from: wiesiek on January 18, 2011, 01:51:25 AM
I'm willing to pay someone to help me do this.

You are on the wrong board for that kind of crap
Strange women, lying in ponds, distributing swords, is no basis for a system of government

wiesiek

You are not helping with homework, so i offered you a kind of job? what's wrong with it?

oex

Quote from: wiesiek on January 18, 2011, 12:04:21 PM
You are not helping with homework, so i offered you a kind of job? what's wrong with it?

You are effectively asking for qualifications for payment.... Ask specific educated questions and I'm sure people would be willing to answer them but ask for someone to help with your project, paid or not shows no worth on your part.... Nobody wants to be on the receiving end of your uneducated trigonometric heart surgery machine :lol
We are all of us insane, just to varying degrees and intelligently balanced through networking

http://www.hereford.tv

redskull

Quote from: wiesiek on January 18, 2011, 12:04:21 PM
You are not helping with homework, so i offered you a kind of job? what's wrong with it?

Really?  You really can't imagine what might be wrong with paying someone to do your work for you, and then passing it off as your own?  You might try googling for words like "trust", "self-respect", "integrity", etc.  Or at the very least, posting actual questions about specific things you are having trouble understanding, instead of begging for someone to pity you.
Strange women, lying in ponds, distributing swords, is no basis for a system of government

wiesiek

Yes , i'm lazy, not trustworthy , and not self-respecting idiot who want someone from this forum to make for him his homework.

japheth

Quote from: wiesiek on January 18, 2011, 01:29:07 PM
Yes , i'm lazy, not trustworthy , and not self-respecting idiot who want someone from this forum to make for him his homework.

I think it's ok to ask for such a service, it's a matter of the price if you will succeed!

Buying such works and then claim that it was yours did happen in the past and will happen in the future, so what? Some masterpieces of art do exist only because there was just such a "lazy, not trustworthy idiot" ( Mozart's Requiem comes into my mind ).