linux - How do I test my bootloader on a floppy disk -


here code: http://pastebin.com/psncvnpk

    [bits 16]           ;tells assembler 16 bit code     [org 0x7c00]        ;origin, tell assembler code                         ;be in memory after been loaded      mov si, hellostring ;store string pointer si     call printstring    ;call print string procedure     jmp $       ;infinite loop, hang here.   printcharacter: ;procedure print character on screen                      ;assume ascii value in register     al mov ah, 0x0e ;tell bios need print 1 charater on screen.     mov bh, 0x00    ;page no.     mov bl, 0x07    ;text attribute 0x07 lightgrey font on black background      int 0x10    ;call video interrupt ret       ;return calling procedure    printstring:    ;procedure print string on screen                 ;assume string starting pointer in register si  next_character: ;label fetch next character string     mov al, [si]    ;get byte string , store in al register     inc si      ;increment si pointer     or al, al   ;check if value in al 0 (end of string)     jz exit_function ;if end return     call printcharacter ;else print character in al register     jmp next_character  ;fetch next character string exit_function:  ;end label     ret     ;return procedure       ;data     hellostring db 'hello world', 0 ;helloworld string ending 0      times 510 - ($ - $$) db 0   ;fill rest of sector 0     dw 0xaa55           ;add boot signature @ end of bootloader 

as can see syntax appears correct, compiled .bin file, i'm trying figure out how test it. please treat me i'm bit slow because i've spent hours googling topic , nothing seems work, i've tried using hex editor per tutorial didn't work. seems closest i've gotten using these instructions: http://puu.sh/6kzuo.png

from link: how make bootable iso(not cd or flash drive) testing own boot loader?

except don't quite understand step 6 because vm box won't let me select img file bootable disk.

thanks!

if need add floppy disk disk controller, how it:

click on floppy controller. icon of floppy green plus sign should come on left of selection. click on small icon.

enter image description here


a dialog should come up:

enter image description here

select "choose disk"

the file selection box come up---at point, choose .img file file selection box.

enter image description here

from point should able boot virtual machine floppy disk , test bootloader.


Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

Git submodule update: reference is not a tree... but commit IS there -