BITS 16 CPU 8086 start: ; sp and all segment registers need to be saved push bp ; and we also save bp (??) push es mov bp, sp ; we'll need that to access parameters xor dx, dx ; drive 0, head 0 mov es, dx ; es = 0 mov bx, 0xf000 ; store the read sector there mov ax, 0x0201 ; read, 1 sector ; params: cylinder, head, sector, out mov si, [bp+14] mov ch, [si] mov si, [bp+12] mov dh, [si] mov si, [bp+10] mov cl, [si] int 0x13 mov si, [bp+8] mov [si], ax pop es pop bp retf 8 ; 2x the number of parameters on the stack