1
TOS Arno Puder
TOS Arno Puder 1 Demo Kernel /* tos/kernel/main.c */ #include - - PowerPoint PPT Presentation
TOS Arno Puder 1 Demo Kernel /* tos/kernel/main.c */ #include <kernel.h> WINDOW window_top = {0, 0, 80, 12, 0, 0, ' '}; WINDOW window_bottom = {0, 12, 80, 13, 0, 0, ' '}; void kernel_main() { for (int x = 0; x < 80 * 25 * 2; x++)
1
TOS Arno Puder
2
/* tos/kernel/main.c */ #include <kernel.h> WINDOW window_top = {0, 0, 80, 12, 0, 0, ' '}; WINDOW window_bottom = {0, 12, 80, 13, 0, 0, ' '}; void kernel_main() { for (int x = 0; x < 80 * 25 * 2; x++) { poke_b(0xb8000 + x, 0); }
while (1); }
3
4
removed from the drive.
the disk media as it rotates within the housing.
data on the disk; the tracks and sectors are not visible on actual disks.
left.
https://en.wikipedia.org/wiki/Floppy_disk
5
http://a.co/3jvn7M5
– Makefile will create tos.img that contains the TOS kernel. – Makefile will create image/disk_image that contains a FAT formatted floppy disk image. – .bochsrc refers to disk_image via the floppya parameter.
# Size of disk_image is 1.44 MB ls -l image/disk_image # disk_image is a FAT-formatted image file image/disk_image # Create a mount point and mount disk_image sudo mkdir /mnt/tos sudo mount image/disk_image /mnt/tos df # Shows tos.img and stage2.bin ls –l /mnt/tos # Un-mount disk_image sudo umount /mnt/tos df
6
and a floppy.
cannot be done with the regular cp command! (why?)
– Use dd (disk dump): dd if=image/disk_image of=/dev/fd0
– rawrite (http://www.chrysocome.net/rawwrite)
mount the floppy disk and just copy tos.img.
has a (USB) floppy drive.
7