SlideShare a Scribd company logo
1 of 12
Formatem rozkazu - nazywamy sposób
rozmieszczenia informacji w kodzie rozkazu.
Trybem adresowania - nazywamy sposób
określenia miejsca przechowywania argumentów
rozkazu.
Lista rozkazów procesora (ang. instruction
set) – zestaw podstawowych instrukcji, jakie
dany procesor potrafi wykonać.
Argumenty rozkazu mogą być przechowywane w rejestrach,
w pamięci lub w kodzie rozkazu.
 Adresowanie natychmiastowe
 Adresowanie bezpośrednie
 Adresowanie rejestrowe
 Adresowanie pośrednie
 Adresowanie indeksowe z przemieszczeniem
KOD ADRES (argument)
✦ Argument (operand) jest częścią rozkazu zatem
musi być znany w momencie pisania programu
✦ Nie ma odniesienia do pamięci w celu pobrania
argumentu
✦ Zaoszczędzony jeden cykl pamięci
✦ Wielkość operandu ograniczona przez rozmiar
pola adresowego
Rozkaz
MOV A,#25; zapisz do A wartość dziesiętną = 25
MOV A,#25H; zapisz do A wartość heksadecymalną = 25
MOV A,#100011B; zapisz do A wartość binarną = 100011
ADD A,#25; dodaj do A wartość dziesiętną = 25
ADD A,#25H; dodaj do A wartość heksadecymalną = 25
ADD A,#11111B; dodaj do A wartość binarną = 11111
Przy adresowaniu bezpośrednim kod rozkazu zawiera adres
komórki pamięci, w której przechowywany jest argument (operand).
KOD ADRES
Rozkaz
Zakres adresacji ograniczony przez wielkość pola adresowego
MOV A,25; zapisz do A argument z komórki pamięci o adresie 25(10)
MOV A,25H; zapisz do A argument z komórki pamięci o adresie 25(16)
MOV A,101010B; zapisz do A argument z komórki pamięci o adresie 101010(2)
ADD A,25; dodaj do A argument z komórki pamięci o adresie 25(10)
ADD A,25H; dodaj do A argument z komórki pamięci o adresie 25(16)
ADD A,101010B; dodaj do A argument z komórki pamięci o adresie 101010(2)
Przy adresowaniu rejestrowym w kodzie rozkazu określony jest
rejestr, w którym przechowywany jest argument.
Zaletami użycia tego trybu adresowania są krótkie kody rozkazów
oraz szybkie ich wykonywanie.
Argument (operand) znajduje się w rejestrze określonym
w polu adresowym
✦ Ograniczona liczba rejestrów (32)
✦ Małe pole adresowe (zwykle 3 do 5 bitów)
✦ krótsze rozkazy i czas pobrania z rejestru
✦ Ograniczona przestrzeń adresowa
Adresowanie pośrednie, zwane też adresowaniem rejestrowym
pośrednim, umożliwia modyfikację położenia argumentu w pamięci w
trakcie wykonywania programu.
W rozkazie znajduje się numer rejestru który zawiera adres
komórki pamięci z argumentem.
Przykłady:
MOV A,@R1; zapisz do A argument z komórki
pamięci o adresie zapisanym w rejestrze R1
ADD A,@R1; dodaj do A argument z komórki
pamięci o adresie zapisanym w rejestrze R1
MOV 25, #25; zapisz do komórki pamięci o adresie 25(10) wartość dziesiętną 25
MOV @R1,25H; zapisz do komórki pamięci o adresie z rejestru R1
wartość z komórki pamięci o adresie 25(16)
MOV #25,25H; BŁĘDNE!!!
CLR – zeruj
CLR A; zeruj akumulator (A)
011111011--000000000
CPL – neguj
CPL A; neguj zawartość akumulatora (A)
0100111 ---1011000
SETB – ustaw 1 logiczne
SETB A; ustaw 1 log w akumulatorze (A)
0100111 ---- 1111111

More Related Content

Featured

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 

Featured (20)

Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 

adresowanie i rozkazy

  • 1.
  • 2. Formatem rozkazu - nazywamy sposób rozmieszczenia informacji w kodzie rozkazu. Trybem adresowania - nazywamy sposób określenia miejsca przechowywania argumentów rozkazu. Lista rozkazów procesora (ang. instruction set) – zestaw podstawowych instrukcji, jakie dany procesor potrafi wykonać.
  • 3. Argumenty rozkazu mogą być przechowywane w rejestrach, w pamięci lub w kodzie rozkazu.  Adresowanie natychmiastowe  Adresowanie bezpośrednie  Adresowanie rejestrowe  Adresowanie pośrednie  Adresowanie indeksowe z przemieszczeniem
  • 4. KOD ADRES (argument) ✦ Argument (operand) jest częścią rozkazu zatem musi być znany w momencie pisania programu ✦ Nie ma odniesienia do pamięci w celu pobrania argumentu ✦ Zaoszczędzony jeden cykl pamięci ✦ Wielkość operandu ograniczona przez rozmiar pola adresowego Rozkaz
  • 5. MOV A,#25; zapisz do A wartość dziesiętną = 25 MOV A,#25H; zapisz do A wartość heksadecymalną = 25 MOV A,#100011B; zapisz do A wartość binarną = 100011 ADD A,#25; dodaj do A wartość dziesiętną = 25 ADD A,#25H; dodaj do A wartość heksadecymalną = 25 ADD A,#11111B; dodaj do A wartość binarną = 11111
  • 6. Przy adresowaniu bezpośrednim kod rozkazu zawiera adres komórki pamięci, w której przechowywany jest argument (operand). KOD ADRES Rozkaz Zakres adresacji ograniczony przez wielkość pola adresowego
  • 7. MOV A,25; zapisz do A argument z komórki pamięci o adresie 25(10) MOV A,25H; zapisz do A argument z komórki pamięci o adresie 25(16) MOV A,101010B; zapisz do A argument z komórki pamięci o adresie 101010(2) ADD A,25; dodaj do A argument z komórki pamięci o adresie 25(10) ADD A,25H; dodaj do A argument z komórki pamięci o adresie 25(16) ADD A,101010B; dodaj do A argument z komórki pamięci o adresie 101010(2)
  • 8. Przy adresowaniu rejestrowym w kodzie rozkazu określony jest rejestr, w którym przechowywany jest argument. Zaletami użycia tego trybu adresowania są krótkie kody rozkazów oraz szybkie ich wykonywanie.
  • 9. Argument (operand) znajduje się w rejestrze określonym w polu adresowym ✦ Ograniczona liczba rejestrów (32) ✦ Małe pole adresowe (zwykle 3 do 5 bitów) ✦ krótsze rozkazy i czas pobrania z rejestru ✦ Ograniczona przestrzeń adresowa
  • 10. Adresowanie pośrednie, zwane też adresowaniem rejestrowym pośrednim, umożliwia modyfikację położenia argumentu w pamięci w trakcie wykonywania programu. W rozkazie znajduje się numer rejestru który zawiera adres komórki pamięci z argumentem.
  • 11. Przykłady: MOV A,@R1; zapisz do A argument z komórki pamięci o adresie zapisanym w rejestrze R1 ADD A,@R1; dodaj do A argument z komórki pamięci o adresie zapisanym w rejestrze R1 MOV 25, #25; zapisz do komórki pamięci o adresie 25(10) wartość dziesiętną 25 MOV @R1,25H; zapisz do komórki pamięci o adresie z rejestru R1 wartość z komórki pamięci o adresie 25(16) MOV #25,25H; BŁĘDNE!!!
  • 12. CLR – zeruj CLR A; zeruj akumulator (A) 011111011--000000000 CPL – neguj CPL A; neguj zawartość akumulatora (A) 0100111 ---1011000 SETB – ustaw 1 logiczne SETB A; ustaw 1 log w akumulatorze (A) 0100111 ---- 1111111