Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
doc0856.pdf
Скачиваний:
0
Добавлен:
18.03.2024
Размер:
1.28 Mб
Скачать

AVR Instruction Set

SES – Set Signed Flag

Description:

Sets the Signed Flag (S) in SREG (Status Register).

 

Operation:

 

 

 

 

 

 

 

 

 

 

 

(i)

S ← 1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Syntax:

 

 

 

 

Operands:

 

 

Program Counter:

(i)

SES

 

 

 

 

None

 

 

 

 

 

PC ← PC + 1

 

16-bit Opcode:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1001

 

0100

 

0100

 

1000

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Status Register (SREG) and Boolean Formula:

 

 

 

 

 

I

 

 

T

 

 

H

 

S

V

N

Z

 

C

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

S:1

Signed Flag set

Example:

add

r2,r19

;

Add

r19 to r2

ses

 

;

Set

Negative Flag

Words: 1 (2 bytes)

Cycles: 1

135

0856I–AVR–07/10

SET – Set T Flag

Description:

Sets the T Flag in SREG (Status Register).

 

Operation:

 

 

 

 

 

 

 

 

 

 

 

(i)

T ← 1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Syntax:

 

 

 

 

Operands:

 

 

Program Counter:

(i)

SET

 

 

 

 

None

 

 

 

 

 

PC ← PC + 1

 

16-bit Opcode:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1001

 

0100

 

0110

 

1000

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Status Register (SREG) and Boolean Formula:

 

 

 

 

 

I

 

 

T

 

 

H

 

S

V

N

Z

 

C

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

T:1

T Flag set

Example:

set

; Set T Flag

Words: 1 (2 bytes)

Cycles: 1

136 AVR Instruction Set

0856I–AVR–07/10

AVR Instruction Set

SEV – Set Overflow Flag

Description:

Sets the Overflow Flag (V) in SREG (Status Register).

 

Operation:

 

 

 

 

 

 

 

 

 

 

 

(i)

V ← 1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Syntax:

 

 

 

 

Operands:

 

 

Program Counter:

(i)

SEV

 

 

 

 

None

 

 

 

 

 

PC ← PC + 1

 

16-bit Opcode:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1001

 

0100

 

0011

 

1000

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Status Register (SREG) and Boolean Formula:

 

 

 

 

 

I

 

 

T

 

 

H

 

S

V

N

Z

 

C

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

V:1

Overflow Flag set

Example:

add

r2,r19

;

Add

r19 to r2

sev

 

;

Set

Overflow Flag

Words: 1 (2 bytes)

Cycles: 1

137

0856I–AVR–07/10

SEZ – Set Zero Flag

Description:

Sets the Zero Flag (Z) in SREG (Status Register).

 

Operation:

 

 

 

 

 

 

 

 

 

 

 

(i)

Z ← 1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Syntax:

 

 

 

 

Operands:

 

 

Program Counter:

(i)

SEZ

 

 

 

 

None

 

 

 

 

 

PC ← PC + 1

 

16-bit Opcode:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1001

 

0100

 

0001

 

1000

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Status Register (SREG) and Boolean Formula:

 

 

 

 

 

I

 

 

T

 

 

H

 

S

V

N

Z

 

C

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Z:1

Zero Flag set

Example:

add

r2,r19

;

Add

r19 to r2

sez

 

;

Set

Zero Flag

Words: 1 (2 bytes)

Cycles: 1

138 AVR Instruction Set

0856I–AVR–07/10

Соседние файлы в предмете Микропроцессорные системы