flat assembler
Message board for the users of flat assembler.

Index > OS Construction > Real-Mode <-> P-Mode Switchy

Author
Thread Post new topic Reply to topic
Valkyrie



Joined: 08 Dec 2004
Posts: 1
Location: Sophia North Carolina USA
Valkyrie 19 Jan 2006, 13:09
I now that when in p-mode you can switch to real-mode run an interrupt then jump back into p-mode.

I know this is underhanded, but easier than all the *fun* programming with the dma, pci, ect.

But does this switching, which may happen many times a second, put any undue stress on the CPU. I don't want to shorten my cpus life-span just for a neat shortcut

Thanks

_________________
I have elevated myself above the programmer. I am now a Coder! Watch me type, and be afraid.
Post 19 Jan 2006, 13:09
View user's profile Send private message Reply with quote
Octavio



Joined: 21 Jun 2003
Posts: 366
Location: Spain
Octavio 19 Jan 2006, 14:36
Valkyrie wrote:
But does this switching, which may happen many times a second, put any undue stress on the CPU.Thanks

No.
Post 19 Jan 2006, 14:36
View user's profile Send private message Visit poster's website Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u 19 Jan 2006, 19:19
It's no differant than running any other code and it may not be as slow as some people think.
For my OS i written a pmode floppy driver, this worked great, but would not let me load from a USB pen drives, as i already had a function to go back and forth to real mode, i converted it to do int 13h for floppy functions, i thought it would be slow, but OK to load stuff from usb etc.
To keep it simple it loads 512bytes in realmode switch to pmode loads the 512bytes to buffer and keeps switching until is loaded the file etc.
But when i tested it, to my supprize it faster than a windows floppy driver Confused .
Post 19 Jan 2006, 19:19
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
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 vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.