OSDev.org

The Place to Start for Operating System Developers
It is currently Sun May 05, 2024 1:47 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Real-mode multitasking...
PostPosted: Sun Jun 15, 2003 11:00 pm 
I can't seem to get INT 1C to reenter after being entered once.
I made a simple program that prints either A or B depending on what's
the current task. Once INT 1C is called it prints the A and then
exits into task B but once INT 1C is then called again it locks up.
My code should work. I checked it many times. When returning to the
next task using push,push,IRET it *does* enter the task correctly
but once INT 1C is called again it locks. The stacks seem to be setup
correctly and everything in theory should work. I also ran (some) other
peoples demos of real-mode multitasking and even their demos did the
same wierd thing. I did the testing on Bochs along with DOSEMU and
both didn't work. Am I going nuts or is there ANY reason for this?
Anyways, could someone point me to real-mode multitasking examples
please so I can test them. I prefer assembly. I plan to make a
piggyback OS for DOS that multitasks both coms and exes and swaps to
XMS or EMS allowing DOS to do work that modern OS's do.
Any help and examples would be very useful right now.
%THANKS!%
PS: Sorry if the text looks funny, no thanks to Lynx :)


Top
  
 
 Post subject: RE:Real-mode multitasking...
PostPosted: Sun Jun 15, 2003 11:00 pm 
Could you give the src of the task being run. Do they happen to look something like this:
taskA:
while(1){
printf("A");
}
taskB:
while(1){
printf("B");
}
Or they are in asm and you write directly to mem?

Do you understand(know) that DOS interrupt(0x21) uses it's own fixed stacks(as far as i remember 3 of them) and some other fixed tables. When i say fixed, i mean that they are saved somewhere it DOS global vars, so if you want to have multitasking, then you would need to somehow save this global data for one task, and load the global data for the other, when switching the tasks.

Anton


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

All times are UTC - 6 hours


Who is online

Users browsing this forum: Amazonbot [bot] and 7 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