d217b180be4220a0b4a453f31275d38e697a99e0
x86 Bare Metal Examples
Hello world programs that run without an operating system.
- Examples
- printf
- min
- No ld script
- NASM
- BIOS one char
- BIOS hello world
- APM shutdown
- APM shutdown 2
- Multiboot
- TODO not working
- Misc
- Theory
- TODO
Getting started
sudo apt-get install build-essential gnu-efi qemu nasm xorriso
Run the default program on QEMU:
make run
Run a given program:
make run RUN=min
make run RUN=bios_one_char
Tested on Ubuntu 14.04 AMD64.
To run on real hardware, insert an USB, determine its device (/dev/sdX) with:
sudo lsblk
sudo fdisk -l
Pick the .img file that you wan to run and:
sudo dd if=bios_hello_world.img of=/dev/sdX
Then:
- insert the USB in a computer
- during boot, hit some special hardware dependant key, usually F12, Esc
- choose to boot from the USB
Tested on: ThinkPad T400.
Description
Languages
Assembly
64.3%
C
27.6%
Makefile
6.8%
Shell
1.2%