More Questions...

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
elderK

More Questions...

Post by elderK »

Hey Guys, Im curious.

How difficult do you think it would be to setup basic Paging and Exception handling in pure Assembly?

Im doing yet another redesign. :)

As far as I see it,

The Page directory is just an array of 1024 unsigned integers.
These integers hold the Address of the corresponding Page Directory Entries, which themselves are 1024 unsigned integers.
Which hold the address of the 4KiB Page, and flags.

So, Setting up paging shouldnt be too diffucilt in Assembly?

Interrupt handling scares me more. Atleast, a little.
Ill read the Intel Documentation on those subjects again.

But advice, as always is welcome and appreciated.

~Zeii.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:More Questions...

Post by Pype.Clicker »

well, setting paging in assembly is something i've seen again and again. It requires patience, care, and attention, but it certainly can be done.

Interrupt handling per se can also be done in assembly (btw, the stub already has to be in assembly and IDT setup isn't much more complicated there).

Now, it'll all depend on what your asm page fault handler will have to do. It's not so unusual to have to walk a binary tree or another quite complex structure to decide what action should be taken on a page fault (not speaking of copy-on-write and the like), and that's something i wouldn't like to do in ASM.
Dax

Re:More Questions...

Post by Dax »

zeii wrote:Hey Guys, Im curious.

How difficult do you think it would be to setup basic Paging and Exception handling in pure Assembly?
Depends on how much experience you have and how much you know on that topic, as everything in life. How difficult is it for you? As for me, it's not difficult.
Im doing yet another redesign. :)

As far as I see it,

The Page directory is just an array of 1024 unsigned integers.
These integers hold the Address of the corresponding Page Directory Entries, which themselves are 1024 unsigned integers.
Which hold the address of the 4KiB Page, and flags.

So, Setting up paging shouldnt be too diffucilt in Assembly?
Same answer as above.
Interrupt handling scares me more. Atleast, a little.
Ill read the Intel Documentation on those subjects again.

But advice, as always is welcome and appreciated.

~Zeii.
The best advice I can give you right now is that it takes commitment to achieve something.

In my experience the osfaq is a great resource as is osdever.net and google is and will always be your friend. But eventually it all comes down to actually do it, so start coding, bit by bit (errr, byte by byte I mean), step by step.

There are enough people here to support you and help you solve your problems, but to get a concrete answer, you have to ask a concrete question.

Do you have created your own bootloader yet? Or have you decided to use a bootloader such as grub to get you started? What is actually holding you back RIGHT NOW? Or arent you being held back at all and is everything going just fine?

So far my advice, I hope it helps you. Either way, let me know.
elderK

Re:More Questions...

Post by elderK »

Thanks Dax,
I have a bootloader written that loads the Kernel, and the Kernel itself sets up Paging and Interrupt/Exception handling.

Although, as ive said - im redesigning.

When I find the time, I will begin implementing Exception/Interrupt handling in Assembly, aswell as paging.

Ive been revising the structures needed.

~Z
Post Reply