64-bit programming
- matthias
- Member
- Posts: 158
- Joined: Fri Oct 22, 2004 11:00 pm
- Location: Vlaardingen, Holland
- Contact:
64-bit programming
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?
The source of my problems is in the source.
Re: 64-bit programming
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>
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
oh ya there all FREE!!
Intel is VERY good at providing complete documentation on everything free on there website
Intel is VERY good at providing complete documentation on everything free on there website
- matthias
- Member
- Posts: 158
- Joined: Fri Oct 22, 2004 11:00 pm
- Location: Vlaardingen, Holland
- Contact:
Re: 64-bit programming
thanks,
but I will need a lot of time to read them all
but I think this is going to work :p
but I will need a lot of time to read them all
but I think this is going to work :p
The source of my problems is in the source.
Re: 64-bit programming
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
*post*
Re: 64-bit programming
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
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
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!
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!
*post*
Re: 64-bit programming
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.
<h2>-OSdev addict</h2>
- carbonBased
- Member
- Posts: 382
- Joined: Sat Nov 20, 2004 12:00 am
- Location: Wellesley, Ontario, Canada
- Contact:
Re: 64-bit programming
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.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.
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
- carbonBased
- Member
- Posts: 382
- Joined: Sat Nov 20, 2004 12:00 am
- Location: Wellesley, Ontario, Canada
- Contact:
Re: 64-bit programming
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
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
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
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