From: "jd marrow" Newsgroups: comp.os.msdos.djgpp Subject: Re: Timer irq 8 and local multitask. Date: 19 Dec 1996 20:25:41 GMT Organization: pachyderm software Lines: 45 Message-ID: <01bbedea$4c48f300$e4d823c7@monkey> References: <591pu6$1mv AT galileo DOT polito DOT it> NNTP-Posting-Host: nyc-ny41-04.ix.netcom.com To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp take a look at lwp0.7, which implements [very] light weight threads... you should find what you're looking for in the source code. jdm disclaimer: i haven't used lwp; i just browsed the source... can't even tell you for sure how well, or whether, it works! :) -- //// jean-david marrow //// pachyderm software //// pachydrm AT ix DOT netcom DOT com Jurgen Schwietering wrote in article <591pu6$1mv AT galileo DOT polito DOT it>... | Someone who likes hardware interrupts and multitasking? | [...] | I install a handler at interrupt 0x08 (timer) which will chain also to the | old routine. The routine will count (millseconds resolution) a certain | amount of ticks and when necessary call a function which will invoke a | part of the code bye manipulating the stack. So the timer will continue to | count and the routine will do what it needs to do (setting up an | apropriate semaphore and some longer stuff using serial port). When this | routine finishes it will restore th values of the interrupted | programme (stack, registers) manipulating the return stack and finally | doing the ret. During the execution of the secondary routine may | occure other timer interrupts (and they will occur) so a semaphore will | tell the timer to return immediatly to the interrupted routine (which will | be in that moment the secondary routine). [...] | So this is my question: how can handle all this with the dpmi ifc? Any | sample code under djgpp doing something similar (multitasing kernels do | quite the same)? | | Thank you for your attention | Jurgen | |