Requirements ------------ nasm gcc, clang, tcc or pcc Debugging --------- hexdump -C image.bin | less ndisasm -b16 -o7c00h -a image.bin | less objdump -M intel -d kernel.o | less gcc -m32 -ffreestanding -c -o kernel.o kernel.c ld -o kernel.bin -Ttext 0x8800 kernel.o -m elf_i386 --oformat binary objdump -M intel -d kernel.bin | less # oformat: objdump -i lists tons of formats # -m: ld -V # -T: set text segment ot start at BIOS block 3 # TEXT means code bochs -q 'boot:floppy' 'floppya: 1_44=image.bin, status=inserted' Some interesting breakpoints: boot loader (boot.asm, stage 1) break 0x7c00 boot loeader after switching to protecting mode: break 0x7e4e Booting from 0000:7c00 (0) Breakpoint 1, 0x0000000000007c00 in ?? () Next at t=14040244 (0) [0x000000007c00] 0000:7c00 (unk. ctxt): mov ax, 0x0000 ; b80000 C entry: break 0x8800 disassemble kernel in 32-bit mode ndisasm -b32 -o8800h -a kernel.bin | less With qemu remote (see http://wiki.osdev.org/Kernel_Debugging): make run-qemu-debug gdb) target remote localhost:1234 gdb) symbol-file kernel.sym gdb) break entry gdb) c or make a enable execution of the local .gdbinit file in 'src' with the following settings in the user ~/.gdbinit set auto-load local-gdbinit set auto-load safe-path / for assembly code view: set disassemble-next-line on analyze network traffic: tcpdump -enr network.log wireshark-gtk network.log issue a: telnet 127.0.0.1 8080 (starts ARP negitiation between Qemu host and guest in the user network) echo -n "hello" | nc -4u -q1 127.0.0.1 8081 links ----- Writing a Simple Operating System - from Scratch, Nick Blundell http://www.cs.bham.ac.uk/~exr/lectures/opsys/10_11/lectures/os-dev.pdf OS Development: Low-level Boot-Sector Programming, Nick Blundell https://www.youtube.com/watch?v=YvZhgRO7hL4&list=UUjrLiYrvbpXR37c0HV4PmqA http://www.intel.com/content/www/us/en/architecture-and-technology/64-ia-32-architectures-software-developer-manual-325462.html http://wiki.osdev.org/Global_Descriptor_Table https://en.wikipedia.org/wiki/INT_10H http://www.osdever.net/FreeVGA/vga/crtcreg.htm http://wiki.osdev.org/Text_Mode_Cursor https://en.wikipedia.org/wiki/Calling_convention http://wiki.osdev.org/Main_Page other project links ------------------- http://www.helenos.org https://github.com/cfenollosa/os-tutorial http://wyoos.org: in C++ http://osdev.org https://github.com/Codepixl/CodeOS http://www.osdever.net/tutorials/ http://lowelevel.eu http://download.tyndur.org/releases/0.2/ https://code.google.com/archive/p/fpos/source/default/source, FreePascal https://mirage.io/ http://www.jamesmolloy.co.uk/tutorial_html/ http://prettyos.de http://www.jbox.dk/sanos/index.htm https://github.com/omarrx024/xos/ http://minirighi.sourceforge.net http://contiki-os.org/ http://wiki.osdev.org/Projects