Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:multiasm:piot:chapter_4_7 [2025/05/31 09:50] marcinen: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/output operations. Arithmetic instructions include addition, subtraction, multiplication, and division. Logical instructions include operations such as AND, OR, XOR, and NOT. Control instructions include jumps, loops, and conditions. Input/output instructions include operations on ports and registers. Understanding the instruction set is crucial for effective programming in assembler. This course will discuss the most commonly used instructions and their application in assembler code. Practical examples will show how to use instructions in AVR programming. The instruction set allows full control over the processor and its functions.+The assembler instruction set includes arithmetic, logical, control, and input/output operations. Arithmetic instructions include addition, subtraction, multiplication, and division. Logical instructions include operations such as AND, OR, XOR, and NOT. Control instructions include jumps, loops, and conditions. Input/output instructions include operations on ports and registers. Understanding the instruction set is crucial for effective programming in assembler. This course will discuss the most commonly used instructions and their application in assembly code. Practical examples will show how to use instructions in AVR programming. The instruction set allows full control over the processor and its functions.
  
 +=====Basic instructions=====
  
-**Basic commands**+<table tab_avr_dt> 
 +<caption>Data Transfer Instructions</caption> 
 +^  Data Transfer                        || 
 +|  ldi            |  load immediate      | 
 +|  mov            |  copy register       | 
 +|  movw            copy register pair  | 
 +</table>
  
 +<table tab_avr_li>
 +<caption>Logical Instructions</caption>
 +^  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            |
 +</table>
  
- +<table tab_avr_ai> 
-^  Data Transfer  ^^ +<caption>Arithmetic Instructions</caption>
-|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  ^^ ^  Arithmetic Instructions  ^^
 |add  |  add without carry| |add  |  add without carry|
Line 41: Line 44:
 |fmuls  |  fractional multiply signed//(1)//| |fmuls  |  fractional multiply signed//(1)//|
 |fmulsu  |  fractional multiply signed with unsigned//(1)//| |fmulsu  |  fractional multiply signed with unsigned//(1)//|
- 
 //(1) Not all processors support commands// //(1) Not all processors support commands//
 +</table>
  
 +<table tab_avr_bs>
 +<caption>Bit Shift Instructions</caption>
 ^  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>
  
 +<table tab_avr_bm>
 +<caption>Bit Manipulation Instructions</caption>
 ^   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|
 +</table>
en/multiasm/piot/chapter_4_7.1748674228.txt.gz · Last modified: by marcin
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0