Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!asuvax!ncar!elroy.jpl.nasa.gov!swrinde!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!midway!valley From: valley@uchicago (Doug Dougherty) Newsgroups: comp.os.msdos.programmer Subject: Re: iret and retf Message-ID: Date: 14 Mar 91 18:47:57 GMT References: <1991Mar14.031024.12576@msuinfo.cl.msu.edu> Sender: news@midway.uchicago.edu (News Administrator) Organization: University of Chicago Lines: 11 leeda@frith.egr.msu.edu (Dae Hee Lee) writes: >When can I use retf instead of iret? >I was told that retf discards some register in a stack. Then, why and when can I discard any registers in a stack? >Thank you for your help! IRET pops 3 three words off the stack, IP, CS, flags, in that order. (I.e., IP is @SP, CS is [SP+2], flags is [SP+4], in pseudoassembler) So, if you use RETF instead of IRET, you will be leaving one word of flags on the stack. I think this is what INT 25/INT 26 do.