Jump to content

ATA/ATAPI

- - - - -

  • Please log in to reply
6 replies to this topic

#1
mebob

mebob

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 490 posts
Hi, I have looked all over for a tutorial or at least an example of how to read/write to and from an ATA drive. The only things I found were written in C, and I would prefer one that is not (it is easier for me to understand it when written in assembly). I don't want to use BIOS interrupts, because I am planning on doing this in protected mode. Does anyone know of a tutorial, or can someone give me a quick, to the point one right here?
Latinamne loqueris?

#2
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,705 posts
  • Programming Language:C, Java, C++, PHP, Python, Perl, Assembly, Bash, Others
  • Learning:JavaScript
You can just compile the C code and look at the assembly, I guess. C is pretty good about corresponding almost directly to machine code anyway.
sudo rm -rf /

#3
mebob

mebob

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 490 posts
The thing is, the examples contained functions such as "outb()" and such, which, as far as I'm aware, isn't available on a modern compiler.
Latinamne loqueris?

#4
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,118 posts
  • Location:Vancouver, Eh! Cleverness: 200

mebob said:

The thing is, the examples contained functions such as "outb()" and such, which, as far as I'm aware, isn't available on a modern compiler.
I am not sure, but you can decipher <asm/io.h>'s macros for inb() and outb().
http://git.kernel.or...ic/io.h;hb=HEAD


Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#5
mebob

mebob

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 490 posts
This is what I'm looking at: IDE - OSDev Wiki
None of it is making any sense to me. All I am looking for is a really basic, beginner tutorial/guide to this stuff, if one exists.
Latinamne loqueris?

#6
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,705 posts
  • Programming Language:C, Java, C++, PHP, Python, Perl, Assembly, Bash, Others
  • Learning:JavaScript
What part don't you get? I can probably explain it to you.
sudo rm -rf /

#7
mebob

mebob

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 490 posts
What I mean is I just can't comprehend it all. It would be really great if you could explain it.
Latinamne loqueris?




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users