Path: utzoo!utgpu!water!watmath!clyde!att!pacbell!ames!mailrus!uflorida!gatech!hubcap!grimlok From: grimlok@hubcap.UUCP (Mike Percy) Newsgroups: comp.lang.c Subject: Re: Turbo C Message-ID: <2267@hubcap.UUCP> Date: 22 Jul 88 14:04:16 GMT References: <4244@rpp386.UUCP> Organization: Clemson University, Clemson, SC Lines: 63 From article <4244@rpp386.UUCP>, by jfh@rpp386.UUCP (John F. Haugh II): > In article <16577@brl-adm.ARPA> C08922DB%WUVMD.BITNET@cunyvm.cuny.edu writes: >>I am interested in understanding the structure of the function type >>"interrupt" in Turbo C. Basically, what is special about this function >>definition, and what approaches can be used in other compilers to simulate >>this feature? Optimum-C is what I'm using. Well, how about this (file = int.c) void interrupt test() { } then I do a tcc -S on it and get name int int_text segment byte public 'code' dgroup group _data,_bss assume cs:int_text,ds:dgroup int_text ends _data segment word public 'data' _d@ label byte _data ends _bss segment word public 'bss' _b@ label byte _bss ends int_text segment byte public 'code' ; Line 2 _test proc far push ax push bx push cx push dx push es push ds push si push di push bp mov bp,dgroup mov ds,bp ; Line 3 @1: pop bp pop di pop si pop ds pop es pop dx pop cx pop bx pop ax iret _test endp int_text ends _data segment word public 'data' _s@ label byte _data ends int_text public _test int_text ends end Oh yeah, that was with all other options default (small MM, etc.)