W
W
ward_ua2021-06-25 20:46:27
assembler
ward_ua, 2021-06-25 20:46:27

How to read data from disk in x86 protected mode?

In the course of studying the issue of developing my own operating system, I encountered the problem of the lack of standard BIOS interrupts after switching to protected mode. And, as a consequence, the inability to use int 13h to read data from disk.
My little bare-metal programming experience shows that almost any interaction between the CPU and the hardware is a simple exchange of data using I / O ports. Is it possible, using x86 assembly language in/out commands, to read (and preferably write) data from disk (to disk)? Where can one find a specification for interacting with modern storage media, and is reading data from a floppy disk and flash media very different (if at all)? Thanks in advance for your replies.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Saboteur, 2021-06-25
@ward_ua

The BIOS is slowly fading into oblivion, and you need to read UEFI already,
but for your OS, from protected mode, you need to make drivers for standard drives (10 pieces) - a basic driver for ATA / ATAPI, AHCI, NVMe standards; then OHCI, UHCI, eHCI and xHCI for USB controllers and finally USB mass storage).
Also, do not forget that now many people like to raid, and all sorts of SCSI, FDD, tape drives and CD / DVD / BR are still alive ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question