<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Tue, 14 Mar 2006 22:08:14 +0100
From   : John Kortink <kortink@...>
Subject: Re: Web site: Mainly Master 512

On Tue, 14 Mar 2006 07:49:57 +0000, Andy Armstrong wrote:

>On 14 Mar 2006, at 07:10, John Kortink wrote:
>>
>> LDA #0
>> LDY #&FE
>> CLC
>> .loop
>> ADC addr,Y
>> DEY
>> BPL loop
>
>That stops after one iteration because Y is negative at the start.

Force of habit from the 32-bit world creeping in there ...

>You need something like
>
>LDA #0
>LDY #&FF
>CLC
>.loop
>ADC addr-1, Y
>DEY
>BNE loop

Sure. Or for the truly paranoid who like to always count
'up' (even though the carry out is the same) and never go
out on odd days of the month

LDA #0
LDY #1
CLC
.loop
ADC addr-1,Y
INY
BNE loop


John Kortink

-- 

Email    : kortink@...         
Homepage : http://www.inter.nl.net/users/J.Kortink

GoMMC, the ultimate BBC B/B+/Master storage system :
http://web.inter.nl.net/users/J.Kortink/home/hardware/gommc
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>