From a7fb48922dee006339747d128d83fafbe9dfe79a Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sun, 23 Apr 2017 20:38:39 +0200 Subject: fresh import because of huge documents checked in by accident --- README | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 README (limited to 'README') diff --git a/README b/README new file mode 100644 index 0000000..8f082d8 --- /dev/null +++ b/README @@ -0,0 +1,66 @@ +Requirements +------------ + +nasm +gcc, clang or tcc + +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 0x8000 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 + +links +----- + +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/ -- cgit v1.2.3-54-g00ecf