Why does not the OS loader?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
10 views
Found in the Internet code of loader:
org 7C00h ; address of our program are calculated taking into account the Directive use16 ; generated hex code cli ;disallow interrupts to change the addresses in the segment registers mov ax, 0 mov es, ax mov ds, ax mov ss, ax mov sp, 7C00h sti ;allow interrupts (after changing addresses) mov ax, 0003h ;set video mode to output the string on screen int 10h mov ax, 1301h ;in fact the output line of the function 13h of int 10h (later will be more) mov bp, stroka ;address of output string mov dx, 0000h ;row and column in which text is displayed mov cx, 15 ;number of characters the output string mov bx, 000eh ;00-the video page (better not touch) 0e-symbol attributes(color,background) int 10h jmp $ ;mark time (dwell program at this point) stroka db 'Ok MBR loaded!' times 510 - ($ - $$) db 0 ;fill with zeros of the gap between the previous byte and POS db 0x55,0xAA ;last two bytes


Compiled into the binary and created the iso image. When run in VirtualBox, the screen displays:
FATAL: Could not read from the boot medium! System halted

How to solve the problem?
by | 10 views

1 Answer

0 like 0 dislike
Well, the code is correct, as I have everything working, depending on how you record, you need the first sector of the disk. So the same view with whether the image is loaded by the virtual machine.

I personally decided that the loader will not do that, and use UltraICO, Fitch "Set boot file", So you can just write the kernel, and not be afraid for the memory limits.
by

Related questions

0 like 0 dislike
4 answers
asked Apr 4, 2019 by MegaCraZy6
0 like 0 dislike
7 answers
0 like 0 dislike
7 answers
110,608 questions
257,186 answers
0 comments
35,405 users