🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #6723

Re: Notes about Borland C++ interrupt keyword

#6723
From: Alex Nicolaou
Date: Tue, 21 May 1991 19:51
27 lines
2024 bytes
In article <00948EEF.C05FAA40@MAPLE.CIRCA.UFL.EDU> sorrow@oak.circa.ufl.edu writes:
>Actually, I found out that I must be doing something terribly wrong.  When
>I installed my own mouse interrupt handler, if the function was declared
>as "void far interrupt" it would die.  "void far" worked just fine.  

 ** Hmm. What do you mean you "installed my own mouse interrupt handler"? If
you mean via the services provided by the mouse driver (12h or 24h, I think)
which make the mouse driver call your function, then NO, you CANNOT use the
interrupt keyword; for a very simple reason: you aren't the interrupt handler,
you are being called by it, and you are supposed to be a routine. If you use
an interrupt function, the BC++ compiler will put an iret instruction in 
for you, and that will terminate the interrupt handling prematurely - your
Microsoft compatible driver will not have finished its work and your computer
will dissappear into limbo. Incidentally, if you are doing this and then 
accessing data, you'd better be sure that you're restoring DS yourself, since
the MS mouse driver won't do it for you - if you compile in Medium or Large
models this is an absolute must, in smaller models you ought to do it for 
painless changes later.

>I just
>don't USE the interrupt keyword.  The documentation is too skimpy on it
>for me to be able to use it decently.

 ** Interrupts are a pain, but that is not a function of the documentation.
Yes, I am another borland fan :-)

alex
Technical Details
Message-ID: <1991May21.195106.1530@watcgl.waterloo.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watcgl!anicolao
References: <1991May20.171545.23591@amc.com> <1991May20.230908.7178@maytag.waterloo.edu> <00948EEF.C05FAA40@MAPLE.CIRCA.UFL.EDU>

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.msdos.programmer,comp.sys.ibm.pc.programmer,alt.msdos.programmer
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watcgl!anicolao
From: anicolao@watcgl.waterloo.edu (Alex Nicolaou)
Subject: Re: Notes about Borland C++ interrupt keyword
Message-ID: <1991May21.195106.1530@watcgl.waterloo.edu>
Organization: University of Waterloo
References: <1991May20.171545.23591@amc.com> <1991May20.230908.7178@maytag.waterloo.edu> <00948EEF.C05FAA40@MAPLE.CIRCA.UFL.EDU>
Date: Tue, 21 May 1991 19:51:06 GMT
Lines: 27