Babystep1: Difference between revisions

Jump to navigation Jump to search
no edit summary
[unchecked revision][unchecked revision]
No edit summary
No edit summary
Line 1:
{{Infobox Tutorial
| name===Babystep1: Your first boot sector ===
The following code is the smallest possible example of booting code from a floppy. It is assembled in [[NASM]] and copied to floppy using either partcopy or dd. Then you simply boot from the floppy.
| next=[[Tutorial:Babystep2|Babystep2]]
|}}
==Code==
The following code is the smallest possible example of booting code from a floppy.
 
{| {{wikitable}} width="100%"
|-
! Windows/DOS
! Unix
|-
|
> nasmw boot.asm -f bin -o boot.bin
> partcopy boot.bin 0 200 -f0
|
$ nasm boot.asm -f bin -o boot.bin
$ dd if=boot.bin of=/dev/fd0
|}
<pre>
; boot.asm
Line 53 ⟶ 45:
Not exactly something you would show your girlfriend, but I wanted to show just what the bare minimum is before I elaborate. Unless I'm irritating anyone, in which case I'll desist.
 
====Creating Referencesdisk ==image==
The following code is the smallest possible example of booting code from a floppy. It is assembled in [[NASM]] and copied to floppy using either partcopy or dd. Then you simply boot from the floppy.
 
! ===Windows/DOS===
> nasmw boot.asm -f bin -o boot.bin
> partcopy boot.bin 0 200 -f0
===Unix===
$ nasm boot.asm -f bin -o boot.bin
$ dd if=boot.bin of=/dev/fd0
 
== References ==
* Instruction Set from the horse's mouth: [http://www.intel.com/design/pentiumII/documentation.htm]
* Easier to read: [http://www.baldwin.cx/386htm/toc.htm]
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu