1/29
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
ADC
Add with carry | ADC Rd, Rr |
Adds two registers and the contents of the C bit in the SREG and places the result in the destination register Rd.
ADD
Add without carry | ADD Rd, Rr |
Adds two registers and places the result in the destination register Rd. This command does not consider the C bit from the SREG.
AND
Logical AND | AND Rd, Rr |
Computes the logical and of the contents of register Rd and register Rr and stores the result in register Rd.
ANDI
Logical AND with Immediate | ANDI Rd, K |
Computes the logical and of the contents of register Rd and constant K and stores the result in register Rd.
ASR
Arithmetic Shift Right | ASR Rd |
Shifts all bits in Rd one place to the right. Bit 7 of Rd is held constant. Bit 0 of Rd is loaded into the C flag of the SREG. This operation effectively divides a signed value by 2 without changing its sign. The C flag can be used to round the result.
BRBC
Branch if Bit is Clear | BRBC s, k |
Conditional relative branch predicated by a single bit in the status register (SREG). This instruction tests a single bit in the SREG specified by the programmer. If the specified bit in teh SREG is clear, this instruction branches to an instruction relative to the PC. If the specified bit in the SREG is set, no branch is take. This instruction branches relative to the PC in either direction ( PC - 63 <= destination <= PC + 64). The parameter k is the offset from the PC and is represented in two’s complement form.
BRBS
Branch if Bit is Set | BRBS s, k |
Conditional relative branch predicated by a single bit in the status register (SREG). This instruction tests a single bit in SREG specified by the programmer. If the specified bit in the SREG is set, this instruction branches to an instruction relative to the PC. If the specified bit in the SREG is clear, no branch is take. This instruction branches relative to the PC in either direction (PC - 63 <= destination <= PC + 64). The parameter k is the offset from the PC and is represented in two’s complement form.
CALL
Call to a subroutine | CALL k |
This instruction makes an unconditional absolute branch to a subroutine located anywhere within Program Memory. This instruction stores the return address ( the address of the instruction immediately after the CALL) on the stack. After the return address is stored on the stack, this instruction decrements the stack pointed by 2 (uses a post-decrement scheme).
COM
One’s complement | COM Rd |
This instruction computes the cone’s complement of the value in Rd and stores the result in Rd.
CP
Compare Registers | CP Rd, Rr |
This instruction compares the values of registers Rd and Rr. The values in Rd and Rr are not modified by this instruction
CPI
Compare Register with Immediate | CPI Rd, K |
This instruction compares the value of register Rd and a constant value. The value in Rd is not modified by this instruction.
EOR
Exclusive OR | EOR Rd, Rr |
This instruction computes the logical exclusive-or of register Rd and register Rr and places the result in the destination register Rd.
IN
Load an I/O location into a register | IN Rd, A |
This instruction loads the data at an address in I/O space into register Rd.
JMP
Jump | JMP k |
This instruction makes an unconditional absolute branch to a location anywhere within Program Memory.
LDI
Load Immediate | LDI Rd, K |
This instruction loads an 8-bit constant into register Rd.
LDS
Load Direct from Data Space | LDS Rd, k |
This instruction loads one byte from data space into register Rd. The data space consists of the register file, I/O memory, and internal SRAM.
LSR
Logical Shift Right | LSR Rd |
Shifts all bits in Rd one place to the right. Bit 7 of Rd is cleared. Bit 0 of Rd is loaded into the C flag of the SREG. This operation effectively divides an unsigned value by two. The C flag can be used to round the result.
MOV
Move value from register | MOV Rd, Rr |
This instruction moves the value in Rr into Rd. The value in Rr remains unchanged, while the destination register Rd is loaded with a copy of Rr.
NEG
Two’s complement | NEG Rd |
This instruction replaces the contents of register Rd with its two’s complement; the value $80 is left unchanged
NOP
No operation | NOP |
This instruction performs a single-cycle No Operation.
OR
Logical OR | OR Rd, Rr |
Computes the bitwise logical OR of the contents of registers Rd and Rr and places the result in Rd.
ORI
Logical OR with Immediate | ORI Rd, K |
Computes the bitwise logical OR of the contents of register Rd and constant and places the result in Rd.
OUT
Store Register Value into I/O location | OUT A, Rr |
This instruction stores the value of register Rr into an address in I/O space.
POP
Pop value from stack into register | POP Rd |
This instruction loads register Rd with a value from the stack. The stack pointer (SP) is incremented by 1 before the pop. The stack is not scrubbed as a result of this operation.
PUSH
Push Register Value onto Stack | PUSH Rr |
This instruction stores the value of register Rr on the stack. The stack pointer (SP) is decremented by 1 after the push. The value in register Rr is not affected by this instruction.
RCALL
Relative call to subroutine | RCALL k |
This instruction makes a relative call to an address within PC - 2K + 1 and PC + 2K instruction words. The address of the instruction after the RCALL is stored onto the stack as the return address. The stack pointer (SP) is decremented by two bytes (one instruction word) after the return address is stored.
RET
Return from subroutine | RET |
This instruction actualizes a return from a subroutine. The return address is loaded from the stack. The stack pointer (SP) is incremented by two bytes (one instruction word) before the return address is retrieved from the stack.
RETI
Return from Interrupt | RETI |
This instruction actualizes a return from an interrupt. The return address is loaded from the stack. The stack pointer (SP) is incremented by two bytes (one instruction word) before the return address is retrieved from the stack. This instruction sets the Global Interrupt flag in SREG to permit further interrupts.
RJMP
Relative jump | RJUMP k |
This instruction makes an unconditional absolute branch to a location within PC - 2K + 1 and PC + 2K instruction words in Program Memory.
STS
Store direct to data space | STS k, Rr |
This instruction stores one byte from register Rr into data space. The data space consists of the register file, I/O memory, and internal SRAM.