Re: Need tutorials, guides... However...



On 21 Maj, 18:31, "randyh...@xxxxxxxxxxxxx" <randyh...@xxxxxxxxxxxxx>
wrote:
On May 19, 6:21 pm, zacar...@xxxxxxxxx wrote:

Some time ago i desided to learn asm (x86/64) and im still up to the
challence, however finding material to learn from is hard, the reason
being, of course, that i do not intend to write software for any OS,
if that was what i wanted, i most certainly wouldnt do it in asm.

Okay.
\



The main reason for me to learn assembly is that i want to make
various "embedded" applications with one, or at least, few purposes. I
am having a hard time explaining my self here, so i guess an example
will be nice.

That's reasonable.



Im very much in to the search for Mersenne Primes (www.mersenne.org)
and what could be more fun than to write my owm mersenne prime tester?

Okay, but I'm not sure that assembly is particularly well-suited for
this, but okay.

I might want to run it on some old pentium machine that i dont use
anyway, but then i run in to problems, as im kind of an perfectionist.
As the computer will be doing nothing but testing mersenne primes, it
would be kinda stupid having some OS like windows or linux taking up
memory, clock cycles...

Do you anticipate this having any sort of impact on the computation?
Seriously.

So i will have to write my own bootloader/
kernel)os with only the features needed for running this mersenne rime
testing, thus getting the maximum amount of power out of my old
pentium.

Now I don't want to knock your desire to get the maximum ooomph out of
your old computer system, but given the amount of effort it would take
to do what you're proposing, you could put that effort into work that
earns some money, buy yourself a faster machine, and be ahead of the
game. Particularly as I suspect you *waaaay* overestimate the
performance loss you'll get from an OS like Windows or Linux. Yes, if
you write some fancy GUI app that has lots of bells and whistles and
lots of human interaction, you'll pay a price for that. However, if
you write a simple console app and set the priority on the process
high, I think you'll find that the background processes in the OS will
not affect the performance of your application that much.

You complain about the OSes taking up memory, yet elsewhere in this
thread you suggest the use of BIOS. That implies 16-bit code, which
means you're going to have severe memory limitations to begin with
(BTW, DOS won't really consume any more "cycles" and not a whole lot
more memory than your bare embedded app, so there's not reason not to
consider DOS if you're *really* dead-set on avoiding better OSes). I
would hope that your old Pentium box has at least 32 MB. If you write
your own monitor (let's not call this an "OS" because it's really not
an OS), setting up the descriptor tables and all that good stuff is
going to be a *lot* of work in order for you to access more than 1MB.
That's all great education, and might be exactly what you're trying to
learn, but it's completely orthogonal to searching for those primes.



Now that was a long example, but the message is clear, there is close
to no material on the net (or the libary for that sake) which
describes doing things like this. Its allways programming for dos or
windows or linux or osx or ... which leaves me with nothing but the
very long and complicated intel developer manuals.

That's because since Microsoft came out with the PC98 specification,
machines out there have gone off in many different directions. It's
not like the old days when "IBM Compatible" meant that you could
expect to find certain hardware at certain addressess. It's pretty
hard to write a "boot loader", for example, if the boot device isn't
the same on all machines. It used to be that you could count on a
floppy drive, for example. But how many machines today still have
floppies? Granted, your old Pentium might have one, but people are
less interested in writing about floppy hardware these days because
floppies are obsolete. Ditto for lots of other "IBM PC" hardware.
Seriously, you'd need the documentation from the manufacturer of your
Pentium box unless it is really so old that it's a true-blue "IBM
Compatible". And if it is, there are lots of old books you can find on
IBM PC hardware.



So my question is:
What books or reasourses on the net do you know that you think might
suit my needs?

Undocumented PC.
The Hardware Bible.

I would *strongly* recommend that you first write your application in
C or some other HLL under Windows or Linux. *Then* convert it to
assembly language (still under Windows or Linux). *Then* see about
writing it as a stand-alone embedded program. Trying to do all this
at once, on top of learning assembly language, can be a bit
overwhelming (as, apparently, you've discovered).

And be very careful to be *sure* of your goals.
You seem to have three different goals here: to compute those primes,
to learn assembly language, and to learn how to program a PC as an
embedded machine. As I've just suggested, you should really attack one
goal at a time as these are independent goals and trying to work on
all of them at one time may only lead to confusion.
hLater,
Randy Hyde

Now thats a usefull respons (not the only one). I realize that i have
been making less sence than i should, but thats how it goes when using
examples, dont tell the whole story, etc. thus being missunderstod.

Thanks again, and ill of course keep watching this treath in case
someone should provide more help.

.



Relevant Pages

  • Subject: Re: Linux sucks?
    ... > the applications I run in my field do not run on Linux. ... I have cygwin on Windows ... so Windows users only hit this rarely at install. ... XP users hit this when they add hardware and the 'automatic ...
    (Fedora)
  • Re: M$ attack on Common Sense
    ... > (Note that not all Unix virii can effect Linux and vice versa, ... > virii, if you don't run Windows, you don't need to be doing that, now do ... Compare machines AND take into consideration what they are for. ... Install means changing the system so the program will run. ...
    (comp.os.linux.misc)
  • Re: M$ attack on Common Sense
    ... > (Note that not all Unix virii can effect Linux and vice versa, ... > virii, if you don't run Windows, you don't need to be doing that, now do ... Compare machines AND take into consideration what they are for. ... Install means changing the system so the program will run. ...
    (alt.computer.security)
  • Re: M$ attack on Common Sense
    ... > (Note that not all Unix virii can effect Linux and vice versa, ... > virii, if you don't run Windows, you don't need to be doing that, now do ... Compare machines AND take into consideration what they are for. ... Install means changing the system so the program will run. ...
    (comp.os.ms-windows.nt.admin.security)
  • Re: Just Got Back From NAMM. Why so little Linux?
    ... Windows programs, well, maybe just a little, but there are so many ... supported under Linux, well, yeah, that's let me down. ... your software becomes sufficiently out of date you'll get no more support from the ... If you don't change your hardware or OS, ...
    (rec.audio.pro)