Login
Search for:


Previous | Next

From: pzsolt (all posts)
Date: 2000-08-09
Subject: Re: Relative addressing
Hi Marko,

thanks for the quick answer! :-)

> $c0ff clc
> $c100 bcs $c0ff (branch not taken)
> $c102 bcc $c0ff (branch taken)
>
> 1 c0ff fetch "clc"
> 2 c100 fetch the operand for "clc" (thrown away)
> 3 c100 fetch "bcs"
> 4 c101 fetch the operand for "bcs"
> 5 c102 fetch "bcc"
> (during this fetch the processor notices that the "bcs" was not taken)
> 6 c103 fetch the operand for "bcc"
> 7 c104 fetch the next opcode
> (this is thrown away, as the branch is taken)
> 8 c1ff fetch the opcode of the branch target
> (oops, the high byte must be adjusted)
> 9 c0ff fetch "clc" ... (as in step 1)

In the example in the 4th cycle the CPU executes the comparison of the
"bcs". Am I right?

Thanks again!

Zsolt

Copyright © Plus/4 World Team, 2001-2024