Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>To access disk in some bootable code on an x86 PC, the easiest and most natural is to use the <a href="http://en.wikipedia.org/wiki/INT_13H" rel="noreferrer">BIOS int 13h functions</a>. That will let you read and write individual disk sectors.</p> <p>Hard drives are commonly split up into partitions and there's also the <a href="http://en.wikipedia.org/wiki/Master_boot_record" rel="noreferrer">Master Boot Record</a> (<code>MBR</code>) that describes the location, size and type of each partition. The MBR is the very first sector of an HDD.</p> <p>Within each partition is some file system. You will need to implement an NTFS driver in order to be able to read and write files in NTFS.</p> <p>AFAIK, <a href="http://en.wikipedia.org/wiki/NTFS" rel="noreferrer">NTFS</a> is not open but there exist reverse-enginering-based NTFS drivers (e.g. in Linux). NTFS drivers are typically written in C(++), not assembly because NTFS is big and complex and C is more practical in terms of development, maintenance and portability than assembly. I would not recommend writing FS code in assembly.</p> <p>P.S. on <a href="http://en.wikipedia.org/wiki/Extensible_Firmware_Interface" rel="noreferrer">EFI</a> systems things are somewhat different. There's <a href="http://en.wikipedia.org/wiki/GUID_Partition_Table" rel="noreferrer">GPT</a> instead of MBR and you use EFI facilities to access disks instead of BIOS int 13h.</p> <p>P.P.S. I've done what you want in C and a little bit assembly but with FAT1x/32 instead of NTFS. That's doable. NTFS is harder. It may be impossible for a single person, especially if they don't have sufficient knowledge and skills.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload