Okay, I have used branching instruction quite a few times especially in HC-12 assmebly. But then I noticed that some branching instruction needs the user to type in the displacement value, for example.
"Made up code, just to explain, not any real assembly."
ldaa m
ldab n
loop:
beq "displ" ;needs a displ value to jump to quit if beq satisfy
mul
staa
deca
blt "displ" ;needs a displ value to jump bacjk to loop if blt satisfy
quit:
out b
stop
So how do I determine the displ needed to add onto the Program counter to needed to perform the above jumps. I know the code above is not complete, nor is it meant to be.
I just want to understand how the displacement performs with the Program Counter.