From: "Sly" Newsgroups: comp.os.msdos.djgpp Subject: Re: real mode calls pmode Date: 24 Feb 1997 01:18:52 GMT Organization: Sly Lines: 26 Message-ID: <01bc21e8$da6654c0$86081ecb@sly> References: <5emufu$e7u AT flex DOT uunet DOT pipex DOT com> NNTP-Posting-Host: max0ppp04.bne.aussie.net To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp nikki wrote in article > i have an interface driver for some hardware which sadly is written in old > 16 bit real mode code. one of the things it requires is that it can call > part of my code which i'm writing now under djgpp. if i want it to be able to > call my function wibble() from within code how exactly should i do this? > currently, i'm locking all the memory in the same way i would have done for > interrupts, then i pass the entry point to my function as > SEG=(((unsigned int)wibble)>>4) & 0xffff; > OFF=wib & 0xf > What I think you would have to do would be have a function stub that exists in conventional memory which is really just a jumping point to the actual function that exists elsewhere in memory. Real mode can only use code in the lower 640kb or something. That is, if this can be done at all... -- TTFN Sly (Steve)