Article View: comp.lang.pascal.borland
Article #711Re: What's wrong with this little TSR?
From: Horst Kraemer
Date: Wed, 26 Aug 1998 00:00
Date: Wed, 26 Aug 1998 00:00
51 lines
2453 bytes
2453 bytes
On Tue, 25 Aug 1998 23:20:08 +0200, Michael Knapp
<michaelknapp@nol.at> wrote:
>Horst Kraemer schrieb:
>>
>> On Tue, 25 Aug 1998 18:39:59 +0200, Michael Knapp
>> <michaelknapp@nol.at> wrote:
>>
>> >> > asm { Enable INTERRUPTS again }
>> >> > sti;
>> >> > popf;
>>
>> >> ---> ???? popped the cleared I-flag here!
>>
>> >POPF has *NO* effect on the I-flag !!!
>>
>> Of course POPF will pop the I-flag.
>>
>
>Let's have a look at the Intel Instruction Set Reference Manual...
>
>POPF/POPFD�Pop Stack into EFLAGS Register
[...lots of unimportant stuff deleted...]
The problem is to _understand_ the Reference Manual
>[...]
>The interrupt flag (IF) is altered only when executing at a level at
>least as privileged as
>the IOPL.
>[...]
This refers to all modes (RM,PM,VRM)
Real mode is equivalent to privilege level 0. This is the most
privileged level and the most priviledged level cannot be less
priviledged than any IOPL. Thus IF is altered by POPF in RM.
Moreover we do not need the reference. On a simple 8088, IF _is_
altered by POPF, thus it necessary has to be altered in RM and VRM on
all later models in order not to break existent code. There is no
reason to change this behaviour.
Of course you did not test the program I included because you were to
proud to be convinced "by force" ? Could have saved you a lot of
time...
Regards
Horst
Technical Details
Message-ID:
<35e424de.7582707@news.snafu.de>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<35ded96b.41078299@news.rz.uni-karlsruhe.de> <35E20513.EF631A2F@hotmail.com> <35E2FD32.97351F78@eunet.at> <35E2E8DF.122B31B2@nol.at> <35e31b2f.3414235@news.snafu.de> <35E32A88.3305C41B@nol.at>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 110467,9bcc55cc3c0b88c1 X-Google-Attributes: gid110467,public X-Google-Thread: 10261c,9bcc55cc3c0b88c1 X-Google-Attributes: gid10261c,public X-Google-Thread: 1006de,9bcc55cc3c0b88c1 X-Google-Attributes: gid1006de,public X-Google-Thread: 111659,9bcc55cc3c0b88c1 X-Google-Attributes: gid111659,public X-Google-Thread: 110930,9bcc55cc3c0b88c1 X-Google-Attributes: gid110930,public From: horst.kraemer@snafu.de (Horst Kraemer) Subject: Re: What's wrong with this little TSR? Date: 1998/08/26 Message-ID: <35e424de.7582707@news.snafu.de> X-Deja-AN: 384934913 References: <35ded96b.41078299@news.rz.uni-karlsruhe.de> <35E20513.EF631A2F@hotmail.com> <35E2FD32.97351F78@eunet.at> <35E2E8DF.122B31B2@nol.at> <35e31b2f.3414235@news.snafu.de> <35E32A88.3305C41B@nol.at> Organization: [Posted via] Interactive Networx Newsgroups: comp.lang.pascal.borland,comp.lang.pascal.misc,de.comp.lang.pascal.misc,fido.ger.pascal,z-netz.sprachen.pascal