kevin@harpo.doc.ic.ac.uk (Kevin Twidle) (09/06/89)
I have a TSR that I want to be able to call from a protected mode program running under DOS. This really boils down to causing an interrupt in protected mode. I know nothing about protected mode :-( It this possible? easy? hard? Can anyone give me some names of any good books on the subject? Thanks in advance Kevin (kpt@doc.ic.ac.uk) -- ----- Kevin Twidle Tel: +44 1 589 5111 x5068 Email: kpt@doc.ic.ac.uk Dept of Computing, Imperial College, 180 Queen's Gate, London SW7 2BZ, England "It's not the cough that carries you off, it's the coffin they carry you off in"
wei@hpctdls.HP.COM (Bill Ives) (09/06/89)
>/ hpctdls:comp.sys.ibm.pc / kevin@harpo.doc.ic.ac.uk (Kevin Twidle) / 11:07 am Sep 5, 1989 / >I have a TSR that I want to be able to call from a protected mode >program running under DOS. This really boils down to causing an >interrupt in protected mode. > >I know nothing about protected mode :-( It this possible? easy? hard? >Can anyone give me some names of any good books on the subject? >Thanks in advance >Kevin (kpt@doc.ic.ac.uk) What it really bois down to is how ( or through what program ) you got into protected mode from where you wish to run your TSR. Using protected mode ISR ( interrupt service routines ) is no easy affair since the vector table ( called the IDT - Interrupt Descriptor Table ) can be located anywhere and may be almost any size. I suggest you read INTEL'S 80386 Programmer's Reference Manual if you want the gory details. Some protected mode programs ( like Smalltalk V/286 ) are curtious enough to "mirror" the real mode vector table into their IDT so that TSR will be invoked AFTER switching back to real mode from protected mode. Other programs or operating systems are not as easy... it is practically impossible ( I would say impossible ) to have a TSR in OS/2 since it uses the protected mode previledge level features. As far as other good books.. I have found very little about pure protected mode programming -- some books give cursory glances at switching modes ( read <-> protected ) -- but other than that I have had to learn everything else on my own through expermentation ( remember there is no protected mode debugger available other than under OS/2 where you can't do any real protected mode programming anyway.) Drop me a line if you have any specific questions concerning protected mode programming... its not for the light of heart. Bill Ives HP CTD #include <standard-disclaimer-here>
frotz@drivax.UUCP (Frotz) (09/09/89)
wei@hpctdls.HP.COM (Bill Ives) writes: > ( remember there is no > protected mode debugger available other than under OS/2 where you can't > do any real protected mode programming anyway.) Apologies to the net for plugging company products, but there is at least one protected mode debuggers available other than under OS/2. Admittedly it is still not under DOS or a DOS extender;-( Digital Research makes a Real Time Protected Mode OS called FlexOS. It is supported on the 186, 286 and 386 platforms. The debugger I mentioned is FlexView (Yes, marketing likes this term "Flex";-). It supports 80-godzillian macros and it is reasonable protected mode debugger given the stiff competition of Codeview and Turbo Debugger. --Frotz @Digital Research, Incorporated amdahl!drivax!frotz 70 Garden Court, B15 (408) 649-3896 Monterey, California 93940 Ask for John Fa'atuai "Funny thing is the company might actually support at least some of my comments!-}"
rdas@hatter.Tops.Sun.COM (Robin Das) (09/14/89)
In article <KEVIN.89Sep5180728@harpo.doc.ic.ac.uk> kevin@harpo.doc.ic.ac.uk (Kevin Twidle) writes: >I have a TSR that I want to be able to call from a protected mode >program running under DOS. This really boils down to causing an >interrupt in protected mode. > >I know nothing about protected mode :-( It this possible? easy? hard? >Can anyone give me some names of any good books on the subject? > Protected mode has a different interrupt system. Any interrupts that occur look into the IDT (interrupt descriptor table) to determine the vector. You need to switch modes back down to Real Mode and then re-issue the interrupt. Any results need to be copied back to protected mode. With a DOS extender like Rational Systems' DOS 16/M, it can be done with some effort. Without an extender, you are going to have a really tough time with this problem.