A meni ispise:
string==== i tu stane... Samo sto ja nisam uspeo nista sa tvojim boot loaderom... Evo ti jedan gotov (provereno radi) boot loader, pa probaj samo njega ubaci umesto tvog boot.asm pa onda sve to kompajliraj i probaj, pa javi rezultate... Moguce je i da nesto zeza tvoj bootloader...
Code:
;Milos-Bootsector by Timo Bettendorf
;Timo.Bettendorf@gmx.de
;www.Bettendorf-Germany.de
[BITS 16] ;the bios always starts in 16 bit-mode (real-mode)
[ORG 0] ;we make a binary
jmp short begin ;wie must always jump in the real-mode
nop ;you need this always
; I think the names show what what the things are for
osname db 'Milos '
bytespersector dw 0x200
sectorspercluster db 1
reservedsectors dw 1
numberoffats db 2
rootdirectoryentries dw 0x00E0
totalsectors dw 0x0B40
mediadescriptor db 0xF0
sectorsperfat dw 2
sectorspertrack dw 0x12
numberofheads dw 2
hiddensectors dd 0
totalsectorshuge dd 0
drivenumber db 0
reserved db 0
signature db 0x29
volumeid dd 0
volumename db 'NONAME '
filesystemtype db 'FAT12 '
begin:
cli ;we disable the interupts
mov ax, 0x07C0
mov ds, ax ;there is now ds-register, so we create one
mov ax, 0x9000
mov es, ax ;typlical place for the stack
mov sp, 0x1FFF
sti ;we can enable the interupts again
mov [bootdrive], dl ;we save the drive, we booted from
call clrscr
mov si, bmsg
call print
mov ax, 0x8000
mov es, ax
mov di, 0
mov si, 0
mov cx, 512
cld
rep movsb
jmp 0x8000:relock
relock:
mov ax, 0x7000
mov es, ax
mov di, 0
mov ax, 0x0040
mov ds, ax
mov si, 0
mov cx, 256
cld
rep movsb
mov ax, 0x8000
mov ds, ax
call reset_drv ;we reset the drive
jnc drv_ok
mov si, derr
call print
call reboot
drv_ok:
mov ax, 0x2000
mov es, ax
mov bx, 0
mov al, 1
mov cl, 2
call read_sector
mov ax, 0x2000
mov ds, ax
jmp 0x2000:0x0000 ;jump to the kernel, we'll save it there
print: ;I use always the bios-interupts in the functions
cld
lodsb
cmp al, 0
jz print_done
mov ah, 0x0E
int 0x10
jmp print
print_done:
ret
reset_drv:
mov ah, 0
int 0x13
ret
read_sector
mov ah, 0x02
mov ch, 0
mov dl, [bootdrive]
mov dh, 0
int 0x13
jc read_sector
ret
clrscr:
mov al, 3
mov ah, 0
int 0x10
ret
reboot:
mov si, pktr
call print
mov ah, 0
int 0x16
jmp 0xFFFF:0x0000
;some text and at the end things for the file
bmsg db 'Executing Bootsector...', 13, 10, 0
pktr db 'Remove your Floppy-Disk and press a key!', 13, 10, 0 ;pktr: press key to reboot
derr db 'Drive error', 13, 10, 0
bootdrive db 0
times 510-($-$$) db 0
dw 0xAA55