Amateur Makes a Bootloader: Read Disk Sectors Into Memory - 16 Bit OS Dev

Channel:
Subscribers:
5,840
Published on ● Video Link: https://www.youtube.com/watch?v=9X380co0zVw



Duration: 46:05
10,914 views
259


Playlist link: https://www.youtube.com/playlist?list=PLT7NbkyNWaqajsw8Xh7SP9KJwjfpP8TNX

!! NOTE: to work on QEMU use this to run, otherwise only bochs might work:
qemu-system-i386 -boot a -fda [os.bin path]
!!

Turning our simple boot sector into one that loads an additional sector from the boot disk, something which will eventually turn into our OS! Using BIOS INT 13/AH=2

Note: I did not understood segment:offset addressing fully until later, a segment register (DS, ES, etc.) implicitly multiply their value by 16, then the offset is added to get an address. So mov AX, 100h; mov ES, AX; would leave ES with 100h, but ES would point to 1000h, 100h*16. Then if you did something like mov DI, 100h; ES:DI would point to 100h:100h = 1000h + 100h = 1100h;
Better explanations: https://thestarman.pcministry.com/asm/debug/Segments.html

Source code as of the end of this video:
https://git.sr.ht/~queso_fuego/amateur_os_video_sources/tree/master/item/04_read_disk_sectors

Repos for this OS:
Sourcehut: https://git.sr.ht/~queso_fuego/quesos
Github mirror: https://github.com/queso-fuego/amateuros

Ralf Brown Interrupt List html page for INT 13/AH=2:
http://www.ctyme.com/intr/rb-0607.htm

Contact:
email - fuegoqueso@gmail.com
twitter - @Queso_Fuego
twitch - https://www.twitch.tv/queso_fuego

Credits:
This video was fueled in part by coffee, it's roasty, it's caffeinated, it's coffee!

Music from https://incompetech.com:
"Your Call" by Kevin MacLeod (https://incompetech.com)
Licence: CC BY (http://creativecommons.org/licenses/by/4.0/)

Lil' blue tags above the title
#assembly #programming #bootloader







Tags:
assembly
programming
bootloader
boot loader
16bit
os dev
boot sector
chs
cylinder head sector
queso fuego
16 bit
bios
int 13
int 13 ah 2
bios read sectors
memory
ralf brown interrupt list
jump
carry flag
bad coding
amateur
beginner
simple
commentary
talking
coding
addressing
segment
offset
operating system