The thing is, I'm not entirely sure if my code is correct. The main things I'm concerned about are:
1. The code for parsing the partition table ("dap" is a Data Address Packet, 0x0c is the offset into a partition table entry for the LBA of the partition's first sector).
2. The LBA code
3. The ELF parser. I haven't written this yet, but I only have 192 bytes left in my boot sector to write it with. I might be able to do a super rudimentary ELF parser in 192 bytes; plus, I have some duplicated code that I could probably un-duplicate if I really tried, so I could probably get more space. If I can't write an ELF parser with however much space I can get, then I'll just have to have three stages rather than two.
And if anyone is feeling super generous with their time: Full code (X11 licensed).
I'm aware that the code is not perfect or anything; this is a first draft (I just spent the last 3 or so hours writing it) which needs a lot of cleaning up. Hopefully the comments are helpful and not excessive (and not indicative of my relative lack of experience with assembly). I want to get it working before I try making it pretty.
Thanks.
[edit 1] I've noticed a few comments that say "parse" where they should say "loaded"; it's because I had a function called "loaded" which I renamed "parse" using find-and-replace-all... I forgot it includes comments

[edit 2] Also, just in case anyone is in any way interested in the name ("Schwann") it's a reference to Schwann cells which, among other things, are responsible for the myelin sheath that surrounds neurons in the peripheral nervous system of animals. Since my kernel is called Myelin*, I thought of calling the bootloader Myelinator (the process of myelin production being "myelination"), but that was too long, so I decided to name it Schwann after the cells that perform myelination.
* the rationale behind that name is simpler - I heard the word in biology and I thought it was an auditorily (like aesthetically, but for sounds) pleasing word (maybe because it rhymes with violin).