OSDev.org

The Place to Start for Operating System Developers
It is currently Fri Apr 19, 2024 4:13 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: custom interrupts and such
PostPosted: Sat Jan 26, 2002 12:00 am 
Hello everyone.

I have a nearly finished boot sector going. Right
now it is real mode only. I would like to change
it to protected mode soon. However, I would like
some clarification. I have real mode and pmode
down okay I suppose, but what is "unreal" mode,
and virtual 86 mode? Who uses them, and why?

About the interrupts. I haven't found a lot of info
on custom interrupts. I would like to have interrupts
much like DOS, one for the disk, one for programs, a
main system call, etc. How can I write my own interrupt
handler for interrupts 20 through 25 or so?

Any help is appreciated. Thanks people!


Top
  
 
 Post subject: RE:custom interrupts and such
PostPosted: Sun Jan 27, 2002 12:00 am 
IMO protected mode=unreal mode.
There are 3 modes:
1. V86
2. Real Mode
3. Protected Mode

In protected mode you can access the mem above 1 Meg.
But, that also my problem, in protected mode you can't
call INTs the way you did in the bootsector.


Top
  
 
 Post subject: RE:custom interrupts and such
PostPosted: Sun Jan 27, 2002 12:00 am 
>but what is "unreal" mode<

It's identical to real mode, except that you can 32-bit addresses (and
they won't cause exception 0x0D).


Top
  
 
 Post subject: RE:custom interrupts and such
PostPosted: Thu Jan 31, 2002 12:00 am 
>but what is "unreal" mode,

In a nutshell:
You enter pmode, change the lengths of the
descriptors to 4GB (or whatever) and jmp
back to real mode... the segment lengths stay the
same, so you've got access to all your memory...
no protection, and no native 32-bit code though.

I wouldn't reccomend it.

>and virtual 86 mode?

Used in pmode to "emulate" x86 programs with
protection schemes implemented. Usually used to
emulator binaries from other operating systems.

It's very much like a debugger, actually.

>About the interrupts. I haven't found a lot of info
>on custom interrupts. I would like to have interrupts
>much like DOS, one for the disk, one for programs, a
>main system call, etc. How can I write my own interrupt
>handler for interrupts 20 through 25 or so?

You mean 0x20? I wouldn't reccoment 20... might
still conflict with hardware interrupts (?)

I'd also reccomend remapping (using CR3, and the
paging system) the operating system functions
into the users address space so they can, more or
less, call OS functions directly, not through
interrupts... might be faster... don't know how
well protection can be implemented, though.

>
>Any help is appreciated. Thanks people!


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot] and 166 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group