interrupt type in Turbo C

David Weigant t-davidw at microsoft.UUCP
Mon Jul 31 11:05:59 AEST 1989


In article <24259 at abbott.mips.COM> blanier at mips.COM (Brian Lanier) writes:
>In article <2388 at pur-phy> murphy at pur-phy (William J. Murphy) writes:
>>I looked at the manual for TC and found that this is specific
>>to TC, so my question is how would I implement this in MicroSoft C 5.1?
>
>From what I have read, the way to accomplish this in MSC is to use the
>-S switch to generate the source listing and change "ret" to "iret". Of
>course,  you then have to assemble/link that code in with the C.

The interrupt keyword is supported by both MSC and QC, so it is not
necessary to hack the generated source listing or modify the .exe with
debug.  You can find information on using the interrupt keyword in the
readme.doc that comes with MSC 5.x or you can query on 'interrupt' inside
QC 2.00.

For getting and setting interrupt vectors, the functions _dos_getvect
and _dos_setvect can be used.  They map to DOS functions 0x35 and 0x25
respectively.

Hope this helps
David Weigant



More information about the Comp.lang.c mailing list