Branching and Looping. Chapter 5. Branching and Looping. 68HC12 Branch Instructions WHYP Branching and Looping Words Recursion in WHYP. Branch Displacement. Negative Branch. Branch on Z flag. Branch on Z flag. Branch on Z flag. Branch on N flag. Branch on N flag.
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
FALSE = 0
8 MHz clock: #ms = #clock_cycles/8 = 7.75 +1.375*N
N = (#ms - 7.75)/1.375
Ex: 50 ms delay: N = (50000 - 7.75)/1.375 = 36358
Note: A 10 second delay on the MC68HC12A4EVB
takes about 17 seconds because one wait state
has been added to each access to external RAM.
The 68HC11 takes over twice as long to execute
the same delay instructions.
to return stack
and loops back to
return stack and exit loop
The WHYP word I copies the index value from
the return stack to the top of the parameter stack.
: test ( -- )
11 1 DO
1 2 3 4 5 6 7 8 9 10
Exits a DO loop prematurely
n! = n * (n - 1)!