
                ; .model tiny, basic
                .286c ;.486p
                .287  ;.487

boot            segment byte public 
		assume cs:boot, ds:boot, ss:boot

                org     0h

                bootstart EQU 7c00h


bootstrap       proc    far                ; 0:7c00
abjmpcode:      cli
                xor  ax, ax
                mov  ss, ax
                mov  sp, 7c00h
                mov  si, sp
                push ax
                pop  es
                push ax
                pop  ds
abboot:
                sti
                cld
                mov  di, 600h  ; ?
                mov  cx, 100h
                repne movsw
                db   0eah, 61h, 0  ; jmp 0:61h
                mov  si, 07beh
                mov  bl, 4
ab1:
                cmp  byte ptr [si], 80h
                je   ab2
                cmp  byte ptr [si], 0h
                jne  ab3
                add  si, 10h
                dec  bl
                jnz  ab1
                int  18h                      ; rom
ab2:

ab3:            mov  si, 

bootstrap       endp

CodeSize        EQU $-abjmpcode          ; org boot+200h-2
padding         db (512-CodeSize-2) dup(0)
bootsignature   db 55h,0aah
BB:             org boot+200h-2    ; make sure it is at the end
boot            ends

		end     abjmpcode




        jmp start

        mov ax, 07c0h                   ; buffer segment
        mov es, ax
        mov ax, text1                   ; buffer offset
        mov bp, ax
        mov ah, 13h                     ; function
        mov al, 01h                     ; subfunction
        mov bl, 1eh                     ; color yellow/blue
        mov cx, textend                 ; buffer length
        mov bh, 00h                     ; screen page
        int 10h

        cli                             ; move program code, to
        sub ax, ax                      ; get place for the MBR
        mov ss, ax                      ; code
        mov ax, 7c00h
        mov sp, ax
        sti
        cld
        sub ax, ax
        mov ds, ax
        mov si, 7c00h                   ; source segment
        mov ax, 60h                     ; destination segment
        mov es, ax
        sub di, di
        mov cx, text1                   ; copy only code, no data
        repz
        movsw
        jmp 0060h:hdmbr                 ; jump to moved address

hdmbr:
        mov ax, 00h                     ; bootstrap area
        mov es, ax                      ; buffer segment
        mov ax, 7c00h
        mov bx, ax                      ; buffer offset
        mov ah, 02h                     ; function: load sector
        mov dl, 80h                     ; drive number
        mov dh, 00h                     ; head number
        mov ch, 00h                     ; cylinder number
        mov cl, 01h                     ; start sector
        mov al, 01h                     ; number of sectors to read
        int 13h    
        jmp 0000:7c00h

text1:
        db ' -<[ here some boot information ]>- ', 07h, 0dh, 0ah

textend:

times 510-($-$$) db 00h                 ; fill with zero byte up to
                                        ;  1fdh
        dw 0AA55h                       ; bootable mark 
