💾 Archived View for thrig.me › blog › 2023 › 11 › 12 › bootloader.asm captured on 2024-05-10 at 12:14:27.
⬅️ Previous capture (2023-11-14)
-=-=-=-=-=-=-
; bootloader - setup system and get to the kernel. assemble with nasm BITS 16 org 0x7c00 jmp start times 0x3e -( $ - $ ) db 0 ; FAT headers stops at 3e start: mov ax, 0 mov ds, ax mov es, ax mov ss, ax mov sp, 0 ; setup hardware stack mov ah, 0x02 ; fn: Read Sectors From Drive mov al, 2 ; sector count mov ch, 0 ; cylinder mov cl, 2 ; sector mov dh, 0 ; head mov bx, 0x500 ; destination addess int 0x13 mov ax, 0x0003 ; video mode 80x25 int 0x10 jmp 0:0x500 times 510 -( $ - $ ) db 0 db 0x55, 0xaa