Article View: borland.public.cppbuilder.nativeapi
Article #235Re: help sought, possible asm/cpu/other problem???
From: Bob Gonder
Date: Thu, 17 Jul 2008 00:15
Date: Thu, 17 Jul 2008 00:15
35 lines
1770 bytes
1770 bytes
Dennis Cote wrote:
>> lahf
>> if(!(_EAX & 0x4000)) //0x40 set in AH
>
>I think you are using the wrong constant. LAHF loads the 16 bit flags
>register into AH.
That would be hard to do as AH only has 8 bits.
> The zero flag is bit 6 in this register. To compare
Correct.
>using EAX the extended 32 bit register you need to shift your mask,
>0x0040 left by 16 bits to give 0x00400000.
Not correct.
AL is bits 0-7 of EAX.
AH is bits 8-15 of EAX ( 0x0100 to 0x8000 )
Bits 16-31 of EAX are not addressable.
The original code is correct for zf.
Though with all the assembly, it would
be clearer to continue with ASM.
mov edi, pAddr
repe scasb
je return0
};//end asm
if(!MM3AdminData.survivalmode)
if(MM3AdminData.callint3onerror) __asm int 3 ;
return 1 ;
return0:
return 0;
Technical Details
Message-ID:
<2h2t745h749qbu2s8nti518idp2chkiqdv@4ax.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.glorb.com!feeder.erje.net!news.isoc.lu!newsgroups.borland.com!not-for-mailReferences:
<487e5d3c$1@newsgroups.borland.com> <487e81e2$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,ced19374283c232f X-Google-Attributes: gid10cc67,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: Bob Gonder <none@nowhere.invalid> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: help sought, possible asm/cpu/other problem??? Date: Wed, 16 Jul 2008 17:15:33 -0700 Message-ID: <2h2t745h749qbu2s8nti518idp2chkiqdv@4ax.com> References: <487e5d3c$1@newsgroups.borland.com> <487e81e2$1@newsgroups.borland.com> X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 67.77.147.31 X-Trace: newsgroups.borland.com 1216253731 67.77.147.31 (16 Jul 2008 17:15:31 -0700) Lines: 37 Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.glorb.com!feeder.erje.net!news.isoc.lu!newsgroups.borland.com!not-for-mail