6801 relative address calculations

Bruce Plecan nacelp at bright.net
Sun Feb 21 05:05:58 GMT 1999


-----Original Message-----
From: Scot Sealander <Sealand at clarityconnect.com>
To: gmecm at efi332.eng.ohio-state.edu <gmecm at efi332.eng.ohio-state.edu>
Date: Thursday, February 18, 1999 9:35 PM
Subject: Re: 6801 relative address calculations


All I get out of this is the "branch", anybody mind, explaining further..


>
>> F02F  20 0C     BRA $F03C  ; F030 + 0C = F03C
>
>That should be F031 + OC  = F03D
>
>
>
>> F095  CE 00 61  LDX $0061
>> F098  6F 00     CLR [X]
>> F09A  09        DEX
>> F09B  26 FB     BNE $F096 ; This jumps to the 00 in the LDX 
>>                             instruction!
>
>In this case, the PC at the BNE is F09D.  FB + F09D = F098
>
>So this is a loop to clear 0061 down to 0001.
>
>Scot Sealander   Sealand at clarityconnect.com
>




More information about the Gmecm mailing list