This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| en:multiasm:piot:chapter_4_7 [2024/09/27 20:21] – created pczekalski | en:multiasm:piot:chapter_4_7 [2025/05/31 06:50] (current) – marcin | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Instruction | + | ====== Instruction |
| + | |||
| + | The assembler instruction set includes arithmetic, logical, control, and input/ | ||
| + | |||
| + | |||
| + | **Basic commands** | ||
| + | |||
| + | |||
| + | |||
| + | ^ Data Transfer | ||
| + | |ldi | load immediate| | ||
| + | |mov | copy register| | ||
| + | |movw | copy register pair| | ||
| + | |||
| + | |||
| + | |||
| + | ^ Logical Instructions | ||
| + | |and | logical AND| | ||
| + | |andi | logical AND with immediate| | ||
| + | |or | logical OR| | ||
| + | |ori | logical OR with immediate| | ||
| + | |eor | exclusive OR| | ||
| + | |com | one's complement| | ||
| + | |neg | two's complement| | ||
| + | |||
| + | ^ Arithmetic Instructions | ||
| + | |add | add without carry| | ||
| + | |adc | add with carry| | ||
| + | |adiw | add immediate to word| | ||
| + | |sub | subtract without carry| | ||
| + | |subi | subtract immediate| | ||
| + | |sbc | subtract with carry| | ||
| + | |sbci | subtract immediate with carry| | ||
| + | |sbiw | subtract immediate from word| | ||
| + | |inc | increment| | ||
| + | |dec | decrement| | ||
| + | |mul | multiply unsigned// | ||
| + | |muls | multiply signed// | ||
| + | |mulsu | ||
| + | |fmul | fractional multiply unsigned// | ||
| + | |fmuls | ||
| + | |fmulsu | ||
| + | |||
| + | //(1) Not all processors support commands// | ||
| + | |||
| + | ^ Bit Shifts | ||
| + | |lsl | logical shift left| | ||
| + | |lsr | logical shift Right| | ||
| + | |rol | rotate left through carry| | ||
| + | |ror | rotate right through carry| | ||
| + | |asr | arithmetic shift right| | ||
| + | |||
| + | ^ Bit Manipulation | ||
| + | |sbr | set bit(s) in register| | ||
| + | |cbr | clear bit(s) in register| | ||
| + | |ser | set register| | ||
| + | |clr | clear register| | ||
| + | |swap | swap nibbles| | ||