What assembly instructions are written to the master boot record?

I wonder what explicit assembly instructions actually make up the master boot record in the X86 architecture. Thanks for any ideas.

Other architectures are welcome, but this is primarily for the X86.

+5
source share
4 answers

See here how a dismembered MBR downloader from stage1 to grub1: http://thestarman.pcministry.com/asm/mbr/GRUB.htm

+4
source

512 , 0x55 0xAA. 510 , - 16 , 4 - 64 . .

446 . , , , , , BIOS 0x000: 0x07C00, . . . WikiBooks .

, , - 446 , , , ". ' !

, , , Linux :

# Assume that /dev/hda1 is the first hard disk then...
dd if=mybootldr.bin of=/dev/hda1 bs=512 cnt=1

DEBUG.EXE( MSDOS) FreeDos.

C:\DEBUG.EXE mybootldr.bin 
-W 100 0 0 1 
-Q

, DR.DOS(Digital Research DOS), MS-DOS, DR-DOS.

: , BIOS 0x0000: 0x7C00, , IBM XT BIOS .

, , , .

+13

Love these old school themes; -)

here are two assembler lists because you are queryingexplicit assembly instructions

+3
source

Here's a playable Tetris game written in an assembly that fits into the x86 boot sector. I saw a variant of this that would load your regular OS only if you could execute ten lines.

+2
source

All Articles