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
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
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.
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 (http://www.masm32.com/board/index.php?topic=31.0) 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.
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.
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
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
So how do i delete this double post ?? :green2
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.
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
You are not helping with homework, so i offered you a kind of job? what's wrong with it?
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
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.
Yes , i'm lazy, not trustworthy , and not self-respecting idiot who want someone from this forum to make for him his homework.
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 ).
The difference is that this is homework, not an end-product. The goal of this project is not to produce a program that draws trig functions, but for the OP to actually learn how the FPU works for himself; the code itself is just a means to demonstrate that he's done so. You can't buy a learning experience for any price.
-r
Yeah, u see whole year has 3 professors. Only ours want us to do homework with FPU. And each professor gives to his group 3 projects. I got the worst (there was fourier(mine), + 2 easier functions)). I had written before projects , ascii art fingerprint , and searching words in text, but this one is sick (coprocessor).
I dont tnihk i will need to use asm in future
i had already learnd(mayby not mastered) pascal, c++, c, java
for all the time you've spent posting in this thread, you could have learned the FPU
it isn't that difficult - in fact, you'll find it to be fun and interesting
whether you use it in the future or not, it will be a rewarding experience
just go to the tutorial that i mentioned earlier and start reading
Quote from: dedndave on January 18, 2011, 03:41:11 PM
just go to the tutorial that i mentioned earlier and start reading
Dave, you should learn to read carefully! He told us very clearly that he is
lazy. So IMO it is way more reasonable for him to train his cheating skills than investing time to learn some virtually obsolete FPU instructions.
obsolete ?
i know SSE is nice, and all, but i don't know of any SSE trig or exponential functions :bg
So write it in a language you know (C, PASCAL, FORTRAN, whatever), and have the compiler generate the assembler. Most of the 16/32-bit Microsoft tools are capable of generating listing files using command line options. While it's not going to be ideal, at least you can leverage the knowledge you have.
I think i will do that.
I didn't know it was possible.
Quote from: clive, January 18, 2011, 05:40:23 pmMost of the 16/32-bit Microsoft tools are capable of generating listing files using command line options.
Yes, that's for the lazy ones. With Borland or the GNU tool chain one can use the -S switch to generate the assembly language listing.
.
Quote from: japheth, January 18, 2011, 04:06:46 pmSo IMO it is way more reasonable for him to train his cheating skills than investing time to learn some virtually obsolete FPU instructions
If it comes to programs and accuracy is needed, the FPU instructions aren't obsolete. That's the point.
Gunther
Another important bit of information he may learn concerns the limitations in the precision of the various float formats used by the other languages he uses, and therefore make him a better programmer. But, he may not consider the latter that important. :(
he won't know how it works, Raymond
if i was his instructor, i would ask for some kind of explanation to go with the code - lol
his instructor is likely to do the same because he will recognize compiler generated code