🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #243

Re: help sought, possible asm/cpu/other problem???

#243
From: Dennis Cote
Date: Thu, 17 Jul 2008 14:11
27 lines
1857 bytes
Bob Gonder wrote:
> 
> That would be hard to do as AH only has 8 bits.
> AL is bits 0-7 of EAX.
> AH is bits 8-15 of EAX ( 0x0100 to 0x8000 )

You are correct. My memory must have failed me. I assumed that LAHF 
loaded the entire flags register, but it only loads the low byte of the 
flags register.

> 
> 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

That is true as well.

The only other thing I can think of is that the ES register (used 
implicitly by the SCAS instructions) may have a different value than the 
DS register for some reason, thus EDI (i.e. pAddr) is not pointing at 
the expected memory when the SCAS is executed.

Dennis Cote
Technical Details
Message-ID: <487f531b$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!newshub.sdsu.edu!news.linkpendium.com!news.linkpendium.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <487e5d3c$1@newsgroups.borland.com> <487e81e2$1@newsgroups.borland.com> <2h2t745h749qbu2s8nti518idp2chkiqdv@4ax.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
Date: Thu, 17 Jul 2008 08:11:39 -0600
From: Dennis Cote <dennis.cote@gmail.com>
User-Agent: Thunderbird 2.0.0.14 (Windows/20080421)
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: help sought, possible asm/cpu/other problem???
References: <487e5d3c$1@newsgroups.borland.com> <487e81e2$1@newsgroups.borland.com> <2h2t745h749qbu2s8nti518idp2chkiqdv@4ax.com>
In-Reply-To: <2h2t745h749qbu2s8nti518idp2chkiqdv@4ax.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 142.179.167.5
Message-ID: <487f531b$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1216303899 142.179.167.5 (17 Jul 2008 07:11:39 -0700)
Lines: 28
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!newshub.sdsu.edu!news.linkpendium.com!news.linkpendium.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail