Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!apple!altos!altos86!rcollins From: rcollins@altos86.Altos.COM (Robert Collins) Newsgroups: comp.os.msdos.programmer Subject: Re: iret and retf Message-ID: <123@altos86.Altos.COM> Date: 18 Mar 91 16:09:58 GMT References: <1991Mar14.031024.12576@msuinfo.cl.msu.edu> <1991Mar14.143454.18993@cbnewsh.att.com> Reply-To: rcollins@altos86.UUCP (Robert Collins) Distribution: na Organization: Altos Computer Systems, San Jose, CA Lines: 24 In article valley@uchicago (Doug Dougherty) writes: >rkl@cbnewsh.att.com (kevin.laux) writes: > >> RETF is used when interrupt handlers want to return one of the Flags >>bits. >>The RETF 0002h instruction will pop CS:IP off the stack and then will discard >>two bytes. > >I think you are wrong. No, he is absolutely right. However there are two ways to do this -- RETF 2, or manipulating the flags value on the stack and using IRET. Manipulating the flags value on the stack is more cumbersome, and not as convenient as using RETF 2. On the other hand, RETF 2 fails to restore the values of the other flags (like the interrupt flag). The style used depends on the person who programmed the code. As a BIOS programmer, I have seen both styles used inside the BIOS. -- "Worship the Lord your God, and serve him only." Mat. 4:10 Robert Collins UUCP: ...!sun!altos86!rcollins HOME: (408) 225-8002 WORK: (408) 432-6200 x4356