flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > Adding Kernel file to Floppy Goto page Previous 1, 2 |
Author |
|
edfed 05 May 2011, 13:38
if you don't what to use the real floppy under DOS, try this
int13v.inc if you want to write files on drive sectors, you can try that: bootwriter.com |
|||
05 May 2011, 13:38 |
|
Dex4u 05 May 2011, 15:19
typedef wrote: well, iam trying to avoid emulators right now. You can get the fasm ver, from dexos source code zip 'DexSource.zip' From my down load page http://www.dex-os.com/downloadpage.htm In the zip is a folder called bootprog and in there, is a file called boot12.asm that will assemble with fasm. You can also test your OS by get a dexos floppy image and removing all the dexos programs and putting your kernel32.exe file on the floppy/image and rebooting. |
|||
05 May 2011, 15:19 |
|
typedef 05 May 2011, 17:44
i was really wondering as to how M$ writes it's M$-DOS startup disk that they write 15 files to it with a bootable sector still intact.
|
|||
05 May 2011, 17:44 |
|
typedef 05 May 2011, 22:46
egos wrote: Save BPB structure (or rewrite it with same values). Does that mean I can just visibly copy and paste the files to the floppy if I add the BPB structure to the start of my bootloader. ? And also, that program I was referred to does not help. Although I cracked it so I don't have to register. |
|||
05 May 2011, 22:46 |
|
typedef 05 May 2011, 22:50
Enko wrote:
Which if you don't format it, you can no longer access it. |
|||
05 May 2011, 22:50 |
|
Enko 06 May 2011, 00:21
typedef wrote:
, the bpb should be inside the bootloader, so this way windows can recognize the format of the drive. that is why the first three bytes 6B 3C and 90 disassemble to JMP SHORT 3C NOP. (The 3C value may be different.) The reason for this is to jump over the disk format information (the BPB and EBPB). Since the first sector of the disk is loaded into ram at location 0x0000:0x7c00 and executed, without this jump, the processor would attempt to execute data that isn't code. http://wiki.osdev.org/FAT12 |
|||
06 May 2011, 00:21 |
|
typedef 06 May 2011, 00:41
Enko wrote:
Why windows, I thought when I boot from my Loader there won't be windows anywhere ? Or Do you mean after I..... can you explain it again, sorry |
|||
06 May 2011, 00:41 |
|
typedef 06 May 2011, 02:27
Thank you all for helping out.
It seems like I have to go with VirtualPC now. I used an old Software I had in my PC long time ago. MagicISO, is the name. I am now able to make ISOs and boot from VPC.... I'll also crack this MagicISO because it is bugging me about registration. So, thanks to you all Last edited by typedef on 06 May 2011, 04:31; edited 1 time in total |
|||
06 May 2011, 02:27 |
|
Enko 06 May 2011, 03:53
typedef wrote:
when I sad windows, I meant any operative sistem. The bootloader is writen in the first sector of the disk, but in the same sector, is writen the FAT format. So, if you write a bootloader without the fat headers, the disk wont be recognized, but it doesnt meen it will not boot your os. The flopy should be somthing like this: JUMP ADRESS FAT HEADER FAT DIRECTORIES FILES If you have a boot with fat12 format, than you can add files using any operativ sistem, like windows to the disk. But then, it doesnt mean anything for your os util you develope a filesistem. And to have a runing filesistem, i guess first you will need some kind of basic memory manager. So, just for starting, i think you dont need to burn your brain with the fat12/16 thing. you can just do this: Main flopy image: Code: format binary include "boot.asm" include "kernel.asm" db (1440*1024) - $ dup 0 this will ensamble the file boot.asm and kernel.asm and generate a single file with both of them merged. then writes 0 till the size is 1.44mb. (at least it should, but thears some bug, its actually 1.34... xd) the boot.asm Code: use16 org 0 jmp 0x07C0:start ;read from flopy the kernel and load it to memory ;init the things you need to init ;jump protected mode perhaps? ;protected mode switch cli lgdt [gdtr] mov eax, cr0 or al, 1 mov cr0, eax jmp pword 0x00008:0x10000 ;jump to kernel and the kernel file is: Code: use32 org 0x10000 include "kernel.inc" kernel: here is the kernel in protected mode if you wirte the image on a flopy, no program would recognize it becouse it doesnt have any format. lets say its RAW. But the os will work fine, it doesnt metter for your os until you have to build a FileSistem. and one other thing. In microsoft VirtualPC the flopy size should be exact 1.44mb or it will not acept the binary image. wmware will acept any flopy image, it doesn-t care the size. virtualbox is the worth, it will not acept a flopy image without a valid format... obviosly its not designed for lame os developers xD I couldn-t explain my self better, becouse it was 2 years ago I tried to write an os. I started reading first the Intel Manuals. Then about protected mode. Then maked a bootloader that loads the kernel, switchs to protected mode and then jumps to the kernel. The kernel was composed by In out routins, keyboard input, screen output. nothing else. The next step shoulded be memory manager, ther filesistem and then executable format. but I hadn-t time to continue. bye the way, stop cracking abandonware software. |
|||
06 May 2011, 03:53 |
|
typedef 07 May 2011, 05:07
actually i just included my small kernel at the end of my bootloader and copy it to 08000h byte by byte and then jump there.
from there it will init other more things. my kernel takes up more of the 512 than the bootloader does. |
|||
07 May 2011, 05:07 |
|
Goto page Previous 1, 2 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.