SAM47 INSTRUCTION SET

KS57C2308/P2308/C2316/P2316

 

 

Flexible Bit Manipulation

In addition to normal bit manipulation instructions like set and clear, the SAM47 instruction set can also perform bit tests, bit transfers, and bit Boolean operations. Bits can also be addressed and manipulated by special bit addressing modes. Three types of bit addressing are supported:

mema.b

memb.@L

@H+DA.b

The parameters of these bit addressing modes are described in more detail in Table 5-2.

Table 5-2. Bit Addressing Modes and Parameters

Addressing Mode

Addressable Peripherals

Address Range

 

 

 

mema.b

ERB, EMB, IS1, IS0, IEx, IRQx

FB0H–FBFH

 

 

 

 

Ports

FF0H–FFFH

 

 

 

memb.@L

Ports and BSC

FC0H–FFFH

 

 

 

@H+DA.b

All bit-manipulatable peripheral hardware

All bits of the memory bank specified by

 

 

EMB and SMB that are bit-manipulatable

 

 

 

Instructions Which Have Skip Conditions

The following instructions have a skip function when an overflow or borrow occurs:

XCHI INCS

XCHD DECS

LDIADS

LDDSBS

If there is an overflow or borrow from the result of an increment or decrement, a skip signal is generated and a skip is executed. However, the carry flag value is unaffected.

The instructions BTST, BTSF, and CPSE also generate a skip signal and execute a skip when they meet a skip condition, and the carry flag value is also unaffected.

Instructions Which Affect the Carry Flag

The only instructions which do not generate a skip signal, but which do affect the carry flag are as follows:

ADC

LDB

C,(operand)

SBC

BAND

C,(operand)

SCF

BOR

C,(operand)

RCF

BXOR

C,(operand)

CCF

IRET

 

RRC

 

 

 

 

 

5-4

Page 78
Image 78
Samsung KS57C2308 manual Flexible Bit Manipulation, Instructions Which Have Skip Conditions