Samsung KS57C2308 Manual page 79

Single-chip cmos microcontroller
Table of Contents

Advertisement

KS57C2308/P2308/C2316/P2316
ADC and SBC Instruction Skip Conditions
The instructions "ADC A,@HL" and "SBC A,@HL" can generate a skip signal, and set or clear the carry flag,
when they are executed in combination with the instruction "ADS A,#im".
If an "ADS A,#im" instruction immediately follows an "ADC A,@HL" or "SBC A,@HL" instruction in a program
sequence, the ADS instruction does not skip the instruction following ADS, even if it has a skip function. If,
however, an "ADC A,@HL" or "SBC A,@HL" instruction is immediately followed by an "ADS A,#im" instruction,
the ADC (or SBC) skips on overflow (or if there is no borrow) to the instruction immediately following the ADS,
and program execution continues. Table 5-3 contains additional information and examples of the "ADC A,@HL"
and "SBC A,@HL" skip feature.
Sample
Instruction Sequences
ADC A,@HL
ADS A,#im
xxx
xxx
SBC A,@HL
ADS A,#im
xxx
xxx
Table 5-3. Skip Conditions for ADC and SBC Instructions
If the result of
instruction 1 is:
1
Overflow
2
3
No overflow
4
1
Borrow
2
3
No borrow
4
Then, the execution
sequence is:
1, 3, 4
1, 2, 3, 4
1, 2, 3, 4
1, 3, 4
SAM47 INSTRUCTION SET
Reason
ADS cannot skip
instruction 3, even if it
has a skip function.
ADS cannot skip
instruction 3, even if it
has a skip function.
5-5

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

P2308C2316P2316Ks57p2308Ks57c2316Ks57p2316

Table of Contents