flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Dex4u 21 Feb 2006, 18:22
Yes you should get bootprog.zip from here: http://alexfru.chat.ru/epm.html#bootprog
Not only is it a great bootloader (eg: will load any bin, com, exe file, from anywere on a floppy, by a certain name), but it comes with welcommented asm code. |
|||
![]() |
|
calpol2004 21 Feb 2006, 19:38
not really what im looking for. Reason i wanted to get into OS construction so all the code would be mine. no dependencies on anything (except of course the BIOS). i'll take a look at it's source maybe find out how i need to load the kernel properly. btw when i try to switch to protected mode, is it possible to not switch to pmode in the bootloader and wait until the kernel is loaded then do it then in the kernel? i want to do this because when i switch to protected mode in the bootloader all the text i had written in real mode never appears on the screen, this may be because i put "use32" after i've switched to protected, doesn't seem to like me declaring this half way through the code
![]() |
|||
![]() |
|
Dex4u 22 Feb 2006, 00:44
Your bootloader can load a pmode kernel or a kernel that starts in realmode and then goes to pmode, thats up to you, but if you want to load your kernel over 1mb you will need to use unrealmode or pmode.
My kernel starts in realmode and then goes to pmode. Enter pmode simple example. Code: ;************************************; \\|//; (@ @); Dex4u;; Assemble with fasm; c:\fasm Testboot.asm Testboot.bin;;************************************org 0x7C00use16;****************************; Realmode startup code.;****************************start: xor ax,ax mov ds,ax mov es,ax mov ss,ax mov sp,0x7C00;*****************************; Setting up, to enter pmode.;***************************** cli lgdt [gdtr] mov eax, cr0 or al,0x1 mov cr0,eax jmp 0x10: protected;*****************************; We are entering Pmode. ;*****************************use32protected: mov ax,0x8 mov ds,ax mov es,ax mov ss,ax mov esp,0x7C00;*****************************; Turn floppy off (if space).;***************************** mov dx,3F2h mov al,0 out dx,al;*****************************; Print a P if we enter Pmode. |
|||
![]() |
|
calpol2004 22 Feb 2006, 13:12
exactly the kind of thing i was lookin for.. ill let you know how i get on with implementing it.
|
|||
![]() |
|
calpol2004 23 Feb 2006, 19:00
your pmode example worked great, now i've just about got my head around loading a kernel from a FAT12 file system though im having trouble with virtual pc 2004. so far i've just been using a simple tool (someone on this forum made it, don't remember who
![]() ![]() |
|||
![]() |
|
Dex4u 23 Feb 2006, 19:42
If you go here: http://bos.asmhackers.net/downloads.php
and get "BOS version 0.04, with source" and read the bach file, which shows the commands to get round that problem, using "partcopy.exe". |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.