🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.micro.pc
Article #7306

Re: Interupt initiated user-defined functions in 'C' on IBM/XT

#7306
From: kneller
Date: Thu, 17 Jul 1986 09:53
33 lines
1990 bytes
In article <9918@cgl.ucsf.edu.ucsfcgl.UUCP> kneller@cgl.ucsf.edu.UUCP (Don Kneller) writes:
>In article <938@isis.UUCP> ross@isis.UUCP (Ross McConnell) writes:
>>Currently, we have
>>troubles obtaining the segment:offset representation of the interrupt vector.
>>The seg:offset obtained by ANDing a long pointer (AZTEC compiler V2.0) with  
>>0xFFFFL and ~0xFFFFL do not appear to correctly represent the location of the
>>function although AZTEC says the pointers are in 32-bit seg:offset formate.
>>
>>Any information will be appreciated and may be put on the network or sent to:
>
>I'm doing this from memory and my experience is with the Microsoft C
>compiler, but I think that addresses are stored in memory in order as:
>	low-word high-word
>
>The pointer would thus have the order:
>	offset   segment
>
>Given a 32-bit function pointer funp, the offset should be
>	*((unsigned int *) funp)
>
>and the segment should be
>	*((unsigned int *) funp + 1)

My mistake.  I should have said the the offset and segment can be determined by:
	*((unsigned int *) &funp)	 for the offset and
	*((unsigned int *) &funp + 1)	 for the segment
Obviously, we want to look at the value of the function pointer, not at what
it points to.
-- 
	Don Kneller
UUCP:	...ucbvax!ucsfcgl!kneller
ARPA:	kneller@ucsf-cgl.ARPA
BITNET:	kneller@ucsfcgl.BITNET
Technical Details
Message-ID: <9919@cgl.ucsf.edu.ucsfcgl.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utcs!mnetor!seismo!ll-xn!nike!ucbcad!ucbvax!ucsfcgl!kneller
References: <938@isis.UUCP> <9918@cgl.ucsf.edu.ucsfcgl.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!utcs!mnetor!seismo!ll-xn!nike!ucbcad!ucbvax!ucsfcgl!kneller
From: kneller@ucsfcgl.UUCP
Newsgroups: net.micro.pc
Subject: Re: Interupt initiated user-defined functions in 'C' on IBM/XT
Message-ID: <9919@cgl.ucsf.edu.ucsfcgl.UUCP>
Date: Thu, 17-Jul-86 05:53:55 EDT
Article-I.D.: cgl.9919
Posted: Thu Jul 17 05:53:55 1986
Date-Received: Fri, 18-Jul-86 01:02:38 EDT
References: <938@isis.UUCP> <9918@cgl.ucsf.edu.ucsfcgl.UUCP>
Reply-To: kneller@cgl.ucsf.edu.UUCP (Don Kneller%Langridge)
Organization: Computer Graphics Laboratory, UCSF
Lines: 33