Article View: comp.lang.pascal.borland
Article #708Re: What's wrong with this little TSR?
From: Horst Kraemer
Date: Tue, 25 Aug 1998 00:00
Date: Tue, 25 Aug 1998 00:00
40 lines
1742 bytes
1742 bytes
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.
Try this program under plain DOS.
begin
asm cli ; pushf ; sti ; popf ; hlt end;
writeln('hi, I am back');
end;
'hlt' will stop the processor until the next hardware interrupt
occurs.
{
This program
begin
asm sti; hlt end
end;
will end immediately because the timer interrupt is "waking up" the
hlt instruction.
}
If your program ends normally, you are correct.
If you have to reboot the machine, I am correct.
Regards
Horst
Technical Details
Message-ID:
<35e31b2f.3414235@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>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 110467,9bcc55cc3c0b88c1 X-Google-Attributes: gid110467,public X-Google-Thread: 10261c,9bcc55cc3c0b88c1 X-Google-Attributes: gid10261c,public X-Google-Thread: 111659,9bcc55cc3c0b88c1 X-Google-Attributes: gid111659,public X-Google-Thread: 110930,9bcc55cc3c0b88c1 X-Google-Attributes: gid110930,public X-Google-Thread: 1006de,9bcc55cc3c0b88c1 X-Google-Attributes: gid1006de,public From: horst.kraemer@snafu.de (Horst Kraemer) Subject: Re: What's wrong with this little TSR? Date: 1998/08/25 Message-ID: <35e31b2f.3414235@news.snafu.de> X-Deja-AN: 384677528 References: <35ded96b.41078299@news.rz.uni-karlsruhe.de> <35E20513.EF631A2F@hotmail.com> <35E2FD32.97351F78@eunet.at> <35E2E8DF.122B31B2@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