bits 16
jmp start
%include "config.h"
%include "stdio.h"

stack:
start:
    ;mov bx,0x0200
    xor bx,bx
    mov es,bx
    mov sp,stack

 .readdisk:
    mov ah,0x02
    mov al,numsectors
    mov cx,0x0001
    mov dx,0x0081
    mov bx,0x2000
    clc
    int 0x13

    jc .err
    jmp .end

 .err:
    printf "Error"
    jmp .endless

 .end:
    printf "All ok"
    jmp 0:0x2000
        
 .endless:
    jmp .endless

times ((510)-($-$$)) db 0x00

dw 0xaa55
