This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:multiasm:piot:chapter_4_7 [2025/05/31 09:50] – marcin | en:multiasm:piot:chapter_4_7 [2026/03/01 19:57] (current) – ktokarz | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Instruction Set ====== | ====== Instruction Set ====== | ||
| - | The assembler instruction set includes arithmetic, logical, control, and input/ | + | The assembler instruction set includes arithmetic, logical, control, and input/ |
| + | =====Basic instructions===== | ||
| - | **Basic commands** | + | <table tab_avr_dt> |
| + | < | ||
| + | ^ Data Transfer | ||
| + | | ldi | load immediate | ||
| + | | mov | copy register | ||
| + | | movw | ||
| + | </ | ||
| + | <table tab_avr_li> | ||
| + | < | ||
| + | ^ Logical Instructions | ||
| + | | and | ||
| + | | andi | logical AND with immediate | ||
| + | | or | logical OR | | ||
| + | | ori | ||
| + | | eor | ||
| + | | com | ||
| + | | neg | ||
| + | </ | ||
| - | + | <table tab_avr_ai> | |
| - | ^ Data Transfer | + | < |
| - | |ldi | load immediate| | + | |
| - | |mov | copy register| | + | |
| - | |movw | copy register pair| | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | ^ Logical | + | |
| - | |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 | ^ Arithmetic Instructions | ||
| |add | add without carry| | |add | add without carry| | ||
| Line 41: | Line 44: | ||
| |fmuls | |fmuls | ||
| |fmulsu | |fmulsu | ||
| - | |||
| //(1) Not all processors support commands// | //(1) Not all processors support commands// | ||
| + | </ | ||
| + | <table tab_avr_bs> | ||
| + | < | ||
| ^ Bit Shifts | ^ Bit Shifts | ||
| |lsl | logical shift left| | |lsl | logical shift left| | ||
| Line 50: | Line 55: | ||
| |ror | rotate right through carry| | |ror | rotate right through carry| | ||
| |asr | arithmetic shift right| | |asr | arithmetic shift right| | ||
| + | </ | ||
| + | <table tab_avr_bm> | ||
| + | < | ||
| ^ Bit Manipulation | ^ Bit Manipulation | ||
| |sbr | set bit(s) in register| | |sbr | set bit(s) in register| | ||
| Line 57: | Line 65: | ||
| |clr | clear register| | |clr | clear register| | ||
| |swap | swap nibbles| | |swap | swap nibbles| | ||
| + | </ | ||