🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #5207

Re: iret and retf

#5207
From: Doug Dougherty
Date: Thu, 14 Mar 1991 18:47
11 lines
1013 bytes
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.
Technical Details
Message-ID: <valley.668976477@gsbsun>
Path: arc1-ca.pugleaf.net!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
References: <1991Mar14.031024.12576@msuinfo.cl.msu.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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: <valley.668976477@gsbsun>
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