🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.micro.pc
Article #6712

Interrupts and Microsoft C

#6712
From: J.ANTROSIGLIO
Date: Wed, 28 May 1986 18:17
34 lines
1841 bytes

	I have an interrupt service routine which is linked with
	my Microsoft 'C' application program. When the program is started
	it installs the pointer to the service routine in the vector table.
	As soon as the first interrupt is generated I get a stack overflow 
	message on the screen and the system hangs. If I disable the external
	interrupt source everything works fine. Sounds like a problem in the 
	interrupt service routine.

	History:
	This service routine is written in assembler and works fine when
	linked with compiled MS basic. To link with 'C' I changed it
	to assume the _TEXT segment for code and DGROUP for data, bss, and 
	stack, as per the Microsoft 'C' manual. I allocated more stack during
	the linking phase but that didn't seem to help.

	One thing that I'm doing that may be a problem is the way I
	install the interrupt vector. Rather than using the get/set interrupt
	vector functions in DOS I just poke the segment and offset into the
	vector page at address 0x2c (IRQ3). I don't understand why this should 
	cause a problem.  I did it this way with the compiled basic version.


	Is there anything special I need to do when installing a
	interrupt service routine which is  used by a Microsoft 'C'
	program. Any comments or code examples would be welcome.


					Thank You,
				
					John Antrosiglio
					ATT-Bell Labs
					ihnp4!hou2f!jca
Technical Details
Message-ID: <674@hou2f.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!cbosgd!ihnp4!houxm!hou2f!jca

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!cbosgd!ihnp4!houxm!hou2f!jca
From: jca@hou2f.UUCP (J.ANTROSIGLIO)
Newsgroups: net.micro.pc
Subject: Interrupts and Microsoft C
Message-ID: <674@hou2f.UUCP>
Date: Wed, 28-May-86 14:17:03 EDT
Article-I.D.: hou2f.674
Posted: Wed May 28 14:17:03 1986
Date-Received: Fri, 30-May-86 05:46:24 EDT
Organization: AT&T Bell Labs, Holmdel NJ
Lines: 34