abuckau907 (02-10-2013),Void (02-10-2013)
So I've been creating user space apps for a little over 5 years, and I thought it was time to test my skills for the ultimate test.
For simplicity in the beginning, I'm going to have GRUB be my bootloader for sake of ease, so I can do more work on the kernel than just trying to get it to boot.
But for fun, I just dusted my assembly abilities and created a simple bootloader that loads the next sector into memory and executes from there.
Sectors are loaded into ES:BX which in this case is 0x1000:0. Just jumped there and it works
Right now I'm working on the monitor part of the kernel in 32 bit C. I made a bad habit by being so dependent on bios and dos interrupts for everything, but I guess it's time to break old habits.
Either way, I just created what's below for fun, just to brush up my assembly again and get into the mode of low levelness again
wish me luck on this journey
Last edited by ɑrtemis; 02-10-2013 at 02:03 PM.
abuckau907 (02-10-2013),Void (02-10-2013)
Make your own bootloader, it's not that hard.
Props Patrick. Maybe it's time for me to dive off the userland bandwagon too . I took a look at writing some drivers but didn't have anything I needed them for so I couldn't be fucked BSoDing the shit out of myself for no gain :3
You can win the rat race,Originally Posted by Jeremy S. Anderson
But you're still nothing but a fucking RAT.
++Latest Projects++
[Open Source] Injection Library
Simple PE Cipher
FilthyHooker - Simple Hooking Class
CLR Injector - Inject .NET dlls with ease
Simple Injection - An in-depth look
MPGH's .NET SDK
eJect - Simple Injector
Basic PE Explorer (BETA)
Update 3: Realized there was a total fatal flaw in my boot loader, causing it to crash for any file larger than 512 bytes, so with the reference to some guides I ended up completely rewriting it
But now It loads any size file, so yay
32/I is just a temporary name until I can think of something better, but I think it sounds elite as is. 32 bit control program for x86 intels (cough totally didn't rip off control program for microcomputers cp/m cough cough)
so yeah, implementing the A20 line and such. Have much left on my todo list
That probably isn't a great idea. Graphics are _literally_ the last part of your OS, and depending on the kernel architecture you're going for, it probably isn't even going to be apart of your kernel. (I.e, it will probably be a driver). It is possible to start with the graphics etc, but you will probably be reinventing the wheel about a dozen times if you work your way from the top to the bottom.
A kernel dev. team I know went straight to FS development and they have tons of redundancies in their code because of it (i.e, they didn't have a memory manager or suballocator that did x, so the reimplemented 'x' in their display driver)
The order of focus for you IMO should be:
Setup your Interrupt Service Routines (at least a template) for devices such as the keyboard & Programmable Interrupts Controller (You'll use it in the near future)
Memory Manager (Virtual Memory, either paged or segmented [I would go with paged])
Multi-threading
Virtual File-System
Executable image format and an executable image loader.
Some filesystem driver that can be mounted on your VFS
Finish up memory paging by implementing the ability to cache memory pages onto disk.
I probably missed a couple of steps, but once you get that done, you have a kernel that is ready for things like graphics drivers and GUI management.
Last edited by radnomguywfq3; 02-12-2013 at 02:49 AM.
There are two types of tragedies in life. One is not getting what you want, the other is getting it.
If you wake up at a different time in a different place, could you wake up as a different person?
Sorry for cauusing any confusion, but I meant just printing text (hex, decimal, ascii) by writing to video memory so it can help debugging by dumping registers and such to the screen, and setting up a basic CLI so I can test various things
Nothing big like a GUI or graphics drivers. Sorry for the miscommunication, I realize saying "monitor part" was probably not the best wording xD
Last edited by ɑrtemis; 02-12-2013 at 06:58 AM.
UPDATE NUMBAH FOUR!!
Implemented a Hex to Decimal to Ascii ability so I can get stuff like free RAM and display it.
Implemented probing free low ram (lulz 3 lines of code) but today I didn't make much progress
Here's a gif
You can win the rat race,Originally Posted by Jeremy S. Anderson
But you're still nothing but a fucking RAT.
++Latest Projects++
[Open Source] Injection Library
Simple PE Cipher
FilthyHooker - Simple Hooking Class
CLR Injector - Inject .NET dlls with ease
Simple Injection - An in-depth look
MPGH's .NET SDK
eJect - Simple Injector
Basic PE Explorer (BETA)
ɑrtemis (02-12-2013)
Good job my son
Just kidding, currently having some triple faulting issues with my GDT and protected mode so working on that on the moment
hard to understand
Did somebody say FREE RAM!? Download More RAM!
Sorry for not contributing.