Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

c++ execute code from no file system

First of all, had a hard time figuring out a title, and it's a bit ambiguous, but oh well.

Alright, so I have a mixed c++ & asm bootloader program. I can copy it onto my mbr and run it. The only problem I'm having is the fact that the mbr is very small. I'm assuming the purpose of it is to only call external code written somewhere else on the drive. My problem is, I'm not sure how to access that. I mean I can put the data on there, I just have no clue how to programmaticaly access that data, since in essence the drive is not going to have a "file system", just arbitrary code.

I've searched the net but tutorials on real low level development seems scarce.

I'm even up for a c++ library if any exists.

like image 913
Kelly Elton Avatar asked Feb 23 '23 21:02

Kelly Elton


1 Answers

Good old BIOS calls, for PC. If your board is not PC - you need info from the board manufacturer on how to access the IDE/SATA controller.

like image 142
littleadv Avatar answered Mar 03 '23 13:03

littleadv