Xref: utzoo alt.msdos.programmer:2056 comp.os.msdos.programmer:590 Path: utzoo!utgpu!cunews!bnrgate!bwdls58!mlord From: mlord@bwdls58.bnr.ca (Mark Lord) Newsgroups: alt.msdos.programmer,comp.os.msdos.programmer Subject: Re: Propagating Device Driver error status into C runtime errno variable. Keywords: DOS, Device Driver Message-ID: <3951@bwdls58.UUCP> Date: 21 Aug 90 15:04:14 GMT References: <163@matrix.UUCP> Sender: mlord@bwdls58.UUCP Reply-To: mlord@bwdls58.bnr.ca (Mark Lord) Distribution: na Organization: Bell-Northern Research, Ottawa, Canada Lines: 17 In article <163@matrix.UUCP> venkat@matrix.UUCP (D Venkatrangan) writes: > >Who sets the Carry Flag for the return from int21h and what should the driver's >interrupt routine do for that flag to be set? > The IRET instruction does an implicit POPF, which restores the carry flag and all other flags to the values they had before the interrupt. Instead of doing an IRET, do a POPF, set the carry flag manually, and then do the appropriate type of RET (FAR ?). Or twiddle the saved carry bit on the stack before doing an IRET. Have Fun. -- ___Mark S. Lord__________________________________________ | ..uunet!bnrgate!bmerh724!mlord | Climb Free Or Die (NH) | | Ottawa, Ontario. 613-763-7482 | Personal views only. | |________________________________|________________________|