- Loops, Conditional jump instructions
- Conditions determeining conditional jump
- Unconditional long & short jumps
- Calculate target addresses for jumps
- using stack in subroutines
- Crystal frequenscy vs machine cycle
- Code programs to generate time delay
Looping ex.3-1
MOV A,#0 ;;init
MOV R2,#10
Again: ADD A,#03 ;;loop body
DJNZ R2,Again ;;while test
MOV R5,A ;;after loop
> init: A=0; R2=10;
> Loop: do {A+=3;} While (--R2!-0);
DJNZ means "decrement, jump if not zero"
> after: R5 = A;
No comments:
Post a Comment