Search found 19 matches

by hahnski07
Fri Oct 02, 2009 11:40 am
Forum: Advanced OS Development
Topic: Interesting error
Replies: 3
Views: 13092

Re: Interesting error

You're right... for some reason I didn't have the last part of the kernel loading in my bootsector.

Thanks for the help
by hahnski07
Fri Oct 02, 2009 3:36 am
Forum: Advanced OS Development
Topic: Interesting error
Replies: 3
Views: 13092

Interesting error

I have been plagued the last couple weeks by an error that i thought was in the code. However, it appears that my entire kernel is cut off at 0x100200 for some reason and the rest of the memory is filled w/ 0s. I'm very confused by this.
by hahnski07
Fri Oct 02, 2009 2:50 am
Forum: Advanced OS Development
Topic: Tutorial 15 error
Replies: 2
Views: 10357

Re: Tutorial 15 error

Well that makes sense because my entire kernel is written in assembly.
by hahnski07
Thu Oct 01, 2009 3:17 am
Forum: Advanced OS Development
Topic: Tutorial 15 error
Replies: 2
Views: 10357

Tutorial 15 error

In Tutorial 15 you listed the default interrupt handler code as this:

Code: Select all

void int_handler_5 () {

   _asm add esp, 12
   _asm pushad

   // do whatever...

   _asm popad
   _asm iretd
}


The only way I could get it to work was for me to remove the add esp, 12 line.

Explanations?
by hahnski07
Fri Aug 14, 2009 11:59 pm
Forum: Beginning OS Development
Topic: Protected mode problems
Replies: 23
Views: 32820

Re: Protected mode problems

Yeah, 64k could be kinda limiting, I'm just trying to make it as fast and space efficient as possible... maybe I'm just sick of Windows taking five minutes to boot :twisted:
by hahnski07
Fri Aug 14, 2009 11:18 pm
Forum: Beginning OS Development
Topic: Protected mode problems
Replies: 23
Views: 32820

Re: Protected mode problems

Here's a thought, the kernel is supposed to be loaded to 0x100000, right?

Why not set ds to 0xFFFF and di to 0x0010 after A20 has been enabled and load the kernel to the right place from 16 bit code?
by hahnski07
Fri Aug 14, 2009 7:49 pm
Forum: Beginning OS Development
Topic: Protected mode problems
Replies: 23
Views: 32820

Re: Protected mode problems

The OEM Parameter Block, Describes the disk as FAT12.
by hahnski07
Fri Aug 14, 2009 12:27 pm
Forum: Beginning OS Development
Topic: Protected mode problems
Replies: 23
Views: 32820

Re: Protected mode problems

I see what you're saying now and I moved my 16 bit functions right after the OEM, the only reason I hadn't done that in the first place was cause I didn't want to have to scroll through the functions every time to get a point in my code :)
by hahnski07
Fri Aug 14, 2009 11:56 am
Forum: Beginning OS Development
Topic: Protected mode problems
Replies: 23
Views: 32820

Re: Protected mode problems

Well that seems to work, but I am still very confused. When my bootloader and stage2 were still serparate I was having the exact same problems, but I have not heard anyone else encountering the same issues. Mixing 16 bit and 32 bit code the way you are currently doing can cause possible alignment is...
by hahnski07
Fri Aug 14, 2009 1:56 am
Forum: Beginning OS Development
Topic: Protected mode problems
Replies: 23
Views: 32820

Re: Protected mode problems

What do you mean by odd 16 and 32 bit sections?

It is essentialy the bootsector and stage two crammed in the same place.
by hahnski07
Fri Aug 14, 2009 12:40 am
Forum: Beginning OS Development
Topic: Protected mode problems
Replies: 23
Views: 32820

Re: Protected mode problems

It seems like 0x012d should be the offset but for some reason cs is not being added in, any reason why it's doing this?
by hahnski07
Fri Aug 14, 2009 12:29 am
Forum: Beginning OS Development
Topic: Protected mode problems
Replies: 23
Views: 32820

Re: Protected mode problems

I debugged it till it got to the jmp into protected mode and this is what boch's gave me

Code: Select all

jmp far 0000:012d


what? Shouldn't it be jmp far 0008:7C?? or something like that?
by hahnski07
Fri Aug 14, 2009 12:21 am
Forum: Beginning OS Development
Topic: Protected mode problems
Replies: 23
Views: 32820

Re: Protected mode problems

It seems I spoke too early, it still doesn't work. So weird
by hahnski07
Thu Aug 13, 2009 11:59 pm
Forum: Beginning OS Development
Topic: Protected mode problems
Replies: 23
Views: 32820

Re: Protected mode problems

That makes sense now that I look at it, but I had copied that part from the downloaded example which means that the example is wrong. At this point in time my kernel is still flat. Fortunately because I was able to combine the loading of the FAT and the Root Directory, I will still have enough space...
by hahnski07
Thu Aug 13, 2009 7:22 pm
Forum: Beginning OS Development
Topic: Protected mode problems
Replies: 23
Views: 32820

Re: Protected mode problems

any suggestions?