Page 1 of 1
64-bit programming
Posted: Fri Oct 29, 2004 11:00 pm
by matthias
I was working on my OS, and I was wondering if I could make a 64-bit OS. But I had a small problem. I needed an 64-bit assembler. Luckily I found one: yasm
But where can get GOOD information how 64bit-assembly works? And how can I get DJGPP to compile in 64-bit code?
Re: 64-bit programming
Posted: Fri Oct 29, 2004 11:00 pm
by JAAman
get the reference manuals from Intel and AMD (both not one or the other as each manual has its advantages and there are some differences between Intels x86-64 and AMDs)
download them both in PDF format and order the books also on there website
intels PDFs can be downloaded at <a href="http://developer.intel.com/design/pentium4/manuals/index_new.htm#sdm_vol1">http://developer.intel.com/design/pentium4/manuals/index_new.htm#sdm_vol1 </a>
and the hard copies can be ordered at <A href="http://appzone.intel.com/literature/Search.asp?site=developer&LNavFile=TRUE">http://appzone.intel.com/literature/Search.asp?site=developer&LNavFile=TRUE</a>
just search for the document numbers of the PDF file
Intel docs are in 4 books(used to be 3 when i ordered mine but i just ordered the new ones)
and AMDs are in 5 books i suggest dowloading <b>AND</b> ordering <b>both</b>
Re: 64-bit programming
Posted: Fri Oct 29, 2004 11:00 pm
by JAAman
oh ya there all FREE!!
Intel is VERY good at providing complete documentation on everything free on there website
Re: 64-bit programming
Posted: Sat Oct 30, 2004 11:00 pm
by matthias
thanks,
but I will need a lot of time to read them all
but I think this is going to work :p
Re: 64-bit programming
Posted: Tue Nov 02, 2004 12:00 am
by Legend
Well, for the 64 bit mode for the Athlon 64 for example, there is not much difference to IA32 assembly anyway. But of course they are significant, but especially when you read that something is missing in long mode, you might still want to know what is gone
Re: 64-bit programming
Posted: Wed Nov 03, 2004 12:00 am
by JAAman
there are a few differences:
segmentation is gone
hardware multitasking is gone
single-byte INC and DEC are gone (replaced with REX prefix)
and a couple other instructions are not allowed
Re: 64-bit programming
Posted: Wed Nov 03, 2004 12:00 am
by Legend
I know those
This is already a step, true, but not what I would call significantly so that anyone who knows IA32 assembly could not work on the Athlon!
Re: 64-bit programming
Posted: Mon Mar 28, 2005 12:00 am
by DruG5t0r3
Intel actually gave me the full set of books about x86-32 CPUs for free and delivered to my door...I won't give you the URL since Intel won't like me...but still I'm sure if you look, you'll find it.
Re: 64-bit programming
Posted: Sat Apr 02, 2005 12:00 am
by carbonBased
DruG5t0r3 wrote:Intel actually gave me the full set of books about x86-32 CPUs for free and delivered to my door...I won't give you the URL since Intel won't like me...but still I'm sure if you look, you'll find it.
There's nothing secret about this... Intel and AMD have been giving out process (and other) documentation for free for quire some time. It's in their own best interests to publish this information, otherwise no one would be able to write apps/OSs for their OS.
Intel's docs can be found on:
http://developer.intel.com/
AMD's architecture is more easily found through google. A search for x86-64 yeilded exactly what you'd want, as the first item:
http://www.amd.com/us-en/Processors/Dev ... 44,00.html
Personally, I think AMDs architecture is the way to go, and it'll be the first 64-bit architecture I support for my OS. Esp. considering I have no ia64 emulator.
--Jeff
Re: 64-bit programming
Posted: Sat Apr 02, 2005 12:00 am
by carbonBased
btw, I think I'm confusing the issue here... I was first thinking of the 64-bit architecture developed by Intel & HP (which I was under the impression was labelled ia64), while this thread may be talking about the newer "ia32e"
Since ia32e is really just intel's implementation of x86-64 (which AMD developed, and even helped Intel "redevelop") I'll always develop for AMD first... I think they deserve a lot of support, especially from this community. Anyone that remembers
http://www.x8664.org/ from the start knows that AMD has been very forthcomming to the open source community.
--Jeff
Re: 64-bit programming
Posted: Sat Apr 02, 2005 12:00 am
by bubach
If you want a small, good assembler that could easily be ported to your own OS i recommend fasm. The newest stable version 1.60 is 64-bit compatible.
It also has a great forum for any questions related to the assembler or os-dev.
Download:
http://flatassembler.net/download.php
Documentation:
http://flatassembler.net/docs.php
Announcement:
http://board.flatassembler.net/topic.php?t=3232