From: "John M. Aldrich" Newsgroups: comp.os.msdos.djgpp Subject: Re: getCPU() patch Date: Tue, 10 Dec 1996 21:36:56 -0800 Organization: Three pounds of chaos and a pinch of salt Lines: 55 Message-ID: <32AE4878.533E@cs.com> References: <199612080220 DOT DAA11966 AT math DOT amu DOT edu DOT pl> Reply-To: fighteer AT cs DOT com NNTP-Posting-Host: ppp105.cs.com Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------5FD316334B86" DJ-Gateway: from newsgroup comp.os.msdos.djgpp Apparently-To: djgpp AT delorie DOT com This is a multi-part message in MIME format. --------------5FD316334B86 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mark Habersack wrote: > > Attached to this message you will find a version of my getCPU() routine > found in cpu.c of John Aldrich's DJVERIFY utility. This one should > work. I write should as it always did on my machine (P150) and also > on many others. Yet it mysteriously failed on some... As I told Mark earlier, I finally found the bug in his code. It was truly a work of art; it took me over 3 weeks to find and ultimately a marathon debugging session using edebug32, fsdb, and gdb. BTW, the fix has been tested and works on my machine; others are welcome to try it but it should work fine now. Well, words can't adequately describe it; see for yourself. ;) -- --------------------------------------------------------------------- | John M. Aldrich, aka Fighteer I | fighteer AT cs DOT com | | "Starting flamewars since 1993" | http://www.cs.com/fighteer | | *** NOTICE *** This .signature is generated randomly. | | If you don't like it, sue my computer. | --------------------------------------------------------------------- --------------5FD316334B86 Content-Type: text/plain; charset=us-ascii; name="CPU.DIF" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="CPU.DIF" *** cpu.c~ Sun Dec 8 12:51:42 1996 --- cpu.c Sun Dec 8 13:42:56 1996 *************** *** 72,78 **** "andl $0xFFFFFFFC, %%esp\n" /* This aligns stack to avoid AC fault */ "pushl %%ecx\n" "popfl\n" ! "movl $3, %0\n" /* Assume it's i486 */ "movl %%ecx, %%eax\n" "xorl $0x200000, %%eax\n" "pushl %%eax\n" --- 72,78 ---- "andl $0xFFFFFFFC, %%esp\n" /* This aligns stack to avoid AC fault */ "pushl %%ecx\n" "popfl\n" ! "movw $3, %0\n" /* Assume it's i486 */ "movl %%ecx, %%eax\n" "xorl $0x200000, %%eax\n" "pushl %%eax\n" --------------5FD316334B86--