Posts

my latest os code, but its almost basically taken 95% from gemini. (i was on the right path, but i think my bad fat info ruined it)

 ; floppy_boot.asm ; A simple legacy boot sector example to read a sector from floppy and jump to it. ; ; To assemble with NASM: nasm -f bin floppy_boot.asm -o floppy_boot.bin ; To write to a floppy image (e.g., in a VM): dd if=floppy_boot.bin of=floppy.img bs=512 count=1 conv=notrunc org 0x7C00               ; Boot sectors are loaded at 0x7C00 BITS 16                  ; We are in 16-bit real mode start:     jmp short setup_segments ; --- Data --- ; These are placeholders for a typical boot sector. ; In a real scenario, you'd have more data here, including a Partition Table. OEM_ID                  db "MSWIN4.1"   ; OEM ID BytesPerSector          dw 512          ; Bytes per sector SectorsPerCluster       db 1            ; Sectors per cl...

hoo-ray for nippl.. i mean gemini by google! (how to create simple assembly boot code)

 eventually i will post my new boot code here, but really? - all you need to do is ask gemni or various other bots questions about how to create boot code, and / or give example code!

woo hoo, here is an easy way to make UEFI boot code for YOUR os :D

 ok, i actually switched my code from old style floppy boot sector code, to UEFI boot code. now, its not as easy as compile and go, and you have to know C because there are some errors in the code you will have to fix to get it to compile properly, but "gnu-efi" makes it relativly easy to make uefi boot code. it can be found here: https://sourceforge.net/p/gnu-efi/code/ci/master/tree/ if you want to know how to use it? both co-pilot for windows 11 and gemini from google can answer your questions, no, im not joking, they are THAT smart :o ( i know, i was surprised too... they have also been helping me learn python!)

just a quick note, or question, or both....

im wondering if the "FAT" (file allocation table) is even needed for a non DOS o/s... it might have been needed way back when, but i bet its not needed now. it might never have been needed.    

thinking about picking up this o/s of mine again. 2024-06-03

instructions

1. save my code to a file named c\boot.asm 2. assemble with nasm, nasm -f boot.asm -o boot.bin 3. write to disk on macos, dd=if~/Desktop/example/boot.bin of=~/my-VMs/a.img bs=512b

this is more what a bare boot sector should look like, just add code in the right spots.

 use32 start: jmp code; db 0 'dreamos '; dw 512; ;bytes per sector db 2 ;sectors per cluster dw 0 ;reserved sectors db 1 ;fats on disk dw 1 ;root directory entries dw 20 ;total sectors db 11111110b ;media desciptor dw 20 ;sectors per fat dw 1 ;sectors per track dw 2 ;heads dw 0 ;hidden sectors dd 0; db 0; drive number db 0; db 29h; dd 1; db 'dreamos    '; db 0,0,0,0,0,0,0,0; code: jmp real_start our_section: db 0080 ;our section real_start: jmp lets_exit; try_again: ;base equ $-start base2 equ 510-$; after_code: db base2 dup (0); db 0x55; db 0xaa; next_sector: jmp b_next_sector; blah_sig:  db 'Nick'; b_next_sector: base3 equ 1024-$; db base3 dup (?); lets_exit;