SlideShare a Scribd company logo
1 of 22
Download to read offline
De ce s˘a s, tii limbaj de asamblare?
R˘azvan Deaconescu
razvan.deaconescu@cs.pub.ro
Informatica la Castel 2016 (Macea, Arad)
24 august 2016
1 / 22
Exemple din securitatea ofensiv˘a
offensive security
serviciu de tip hello configurat pe mas, in˘a virtual˘a
Smashing the Stack for Fun and Profit (aleph1)
https://www.exploit-db.com/local/
https://www.exploit-db.com/shellcode/
https://www.exploit-db.com/docs/39665.pdf
2 / 22
Nevoia de optimizare
Make it work. Make it right. Make it fast.
Kent Beck
http://osxr.org:8080/glibc/source/sysdeps/x86/bits/string.h
3 / 22
Nevoia de debugging
printf debugging
valori variabile
funct, ii apelate (fluxul programului)
valori din memorie
valorile registrelor procesorului
codul rulat de procesor
4 / 22
Dezvoltare low-level
sisteme ˆıncoporate (embedded systems)
Board Support Package: bootloader, kernel, drivere
software de sistem (system software)
dezvoltare de kernel (kernel development)
5 / 22
ˆInainte de a ˆıncepe
mai mult citim decˆat scriem
ca s˘a scrii poves, ti bune trebuie s˘a cites, ti poves, ti bune
ca s˘a scrii cod bun trebuie s˘a cites, ti cod bun
mai mult ca orice, limbajul de asamblare mai mult se cites, te
ˆInv˘at, ˘am limbaj de asamblare ca s˘a ˆınt, elegem, mult mai rar
s˘a scriem.
R. Deaconescu, 2016, Macea, Arad
6 / 22
De ce e mai us, or?
mas, ini virtuale
emulatoare
documentat, ie
7 / 22
Funct, ionarea sistemului de calcul
8 / 22
Concepte
memorie
adres˘a de memorie
cod mas, in˘a (instruct, iuni)
procesor
registre
operat, ii / mnemonici
operanzi: registre, adrese de memorie, valori
9 / 22
Bazele limbajului de asamblare
datele rezid˘a ˆın memorie
datele sunt aduse din memorie ˆın registrele procesorului
procesorul face operat, ii cu datele din registre
rezultatele operat, iilor sunt scrise ˆınapoi ˆın memorie
unele informat, ii pot fi preluate s, i transmise c˘atre dispozitive
de intrare/ies, ire
10 / 22
Operat, ii de asamblare
11 / 22
Exemple ˆın limbaj de asamblare
asm/hello.asm
asm/print_n.asm
asm/print_n_xor.asm
12 / 22
Compiler Explorer
https://gcc.godbolt.org/
13 / 22
ˆInt, elegerea sistemului de calcul
De ce ˆınvat, ˘a oamenii obis, nuit, i s˘a cˆante la instrumente muzicale?
De ce fac oamenii obis, nuit, i sport ˆın mod activ?
De ce le place oamenilor (ˆın special copiilor) s˘a demonteze lucruri?
Mastery, Autonomy and Purpose (Dan Pink: Drive)
curiozitate s, i expertiz˘a
14 / 22
John “maddog” Hall: The Third Language
https://www.lpi.org/the-third-language/
http://www.techworld.com/operating-systems/
john-maddog-hall-why-raspberry-pi-is-only-beginning-3453073/
2/
15 / 22
Joel Spolsky: Law of Leaky Abstractions
http:
//www.joelonsoftware.com/articles/LeakyAbstractions.html
16 / 22
Parcurgerea unei matrice
Demo: walk matrix row major.c, walk matrix column major.c
17 / 22
Shlemiel the Painter’s Algorithm
Joel Spolsky: Back to Basics
http:
//www.joelonsoftware.com/articles/fog0000000319.html
18 / 22
Poves, ti, povestiri, amintiri
Minunata c˘al˘atorie a lui R˘azvan ,,Senpai” Deaconescu ˆın
lumea calculatoarelor
19 / 22
Cum ˆınv˘at, /cum aprofundez
Nu ˆınv˘at, a ceva ca s˘a ˆınvet, i ceva / c˘a e bine / c˘a se caut˘a / c˘a
vrei s˘a s, tii.
Pune-t, i obiective s, i ˆınvat, ˘a ca o consecint, ˘a. Means to an end.
competit, ii de tip CTF (Capture the Flag)
site-uri de tip wargames
profiling la aplicat, ii
programeaz˘a pe platforme ARM (sau MIPS): Raspberry Pi
Randal E. Bryant, David R. O’Hallaron: Computer Systems:
A Programmer’s Perspective
20 / 22
La final
ˆInvat, ˘a ˆın profunzime.
Stric˘a lucrurile.
Detaliile fac diferent, a.
R˘abdarea este o virtute.
When solving problems, dig at the roots instead of just hacking at
the leaves.
Anthony J. D’Angelo
Laborator de introducere ˆın limbaj de asamblare: joi, 25 august
2016, ora 21:00
21 / 22
Mult, umesc!
http://www.slideshare.net/razvandeaconescu/de-ce-s-tii-limbaj-de-asamblare
https://github.com/razvand/slides/tree/master/de-ce-asamblare
22 / 22

More Related Content

Viewers also liked

Electrical engineer cover letter
Electrical engineer cover letterElectrical engineer cover letter
Electrical engineer cover letterannedavis116
 
Electrical supervisor recommendation letter
Electrical supervisor recommendation letterElectrical supervisor recommendation letter
Electrical supervisor recommendation letterkmrbi14
 
Gramatica limbii engleze
Gramatica limbii englezeGramatica limbii engleze
Gramatica limbii englezepaveladrian86
 
Career Development Workshop: Resume and Cover Letter Basics
Career Development Workshop: Resume and Cover Letter BasicsCareer Development Workshop: Resume and Cover Letter Basics
Career Development Workshop: Resume and Cover Letter Basicslmdejose
 
Reference letter template
Reference letter templateReference letter template
Reference letter templateenglishbites
 
Letters of recomendation
Letters of recomendationLetters of recomendation
Letters of recomendationVladimir
 
Letter of Recommendation
Letter of RecommendationLetter of Recommendation
Letter of RecommendationKevin Flynn
 

Viewers also liked (9)

msdos
msdosmsdos
msdos
 
Electrical engineer cover letter
Electrical engineer cover letterElectrical engineer cover letter
Electrical engineer cover letter
 
Electrical supervisor recommendation letter
Electrical supervisor recommendation letterElectrical supervisor recommendation letter
Electrical supervisor recommendation letter
 
Gramatica limbii engleze
Gramatica limbii englezeGramatica limbii engleze
Gramatica limbii engleze
 
Career Development Workshop: Resume and Cover Letter Basics
Career Development Workshop: Resume and Cover Letter BasicsCareer Development Workshop: Resume and Cover Letter Basics
Career Development Workshop: Resume and Cover Letter Basics
 
Reference letter template
Reference letter templateReference letter template
Reference letter template
 
Applications
ApplicationsApplications
Applications
 
Letters of recomendation
Letters of recomendationLetters of recomendation
Letters of recomendation
 
Letter of Recommendation
Letter of RecommendationLetter of Recommendation
Letter of Recommendation
 

Similar to De ce să știi limbaj de asamblare

Hardware Open Source
Hardware Open SourceHardware Open Source
Hardware Open SourceTiago Maluta
 
C language in our world 2017
C language in our world 2017C language in our world 2017
C language in our world 2017Juraj Michálek
 
How to save the environment
How to save the environmentHow to save the environment
How to save the environmentAaron Zauner
 
Free Software for Free Sound
Free Software for Free SoundFree Software for Free Sound
Free Software for Free SoundXavier Amatriain
 
Porting your favourite cmdline tool to Android
Porting your favourite cmdline tool to AndroidPorting your favourite cmdline tool to Android
Porting your favourite cmdline tool to AndroidVlatko Kosturjak
 
Lab slides - hardware and software
Lab slides - hardware and softwareLab slides - hardware and software
Lab slides - hardware and softwareTak Lee
 
Regex Considered Harmful: Use Rosie Pattern Language Instead
Regex Considered Harmful: Use Rosie Pattern Language InsteadRegex Considered Harmful: Use Rosie Pattern Language Instead
Regex Considered Harmful: Use Rosie Pattern Language InsteadAll Things Open
 
Tips And Tricks For Bioinformatics Software Engineering
Tips And Tricks For Bioinformatics Software EngineeringTips And Tricks For Bioinformatics Software Engineering
Tips And Tricks For Bioinformatics Software Engineeringjtdudley
 
IoTivity Tutorial: Prototyping IoT Devices on GNU/Linux
IoTivity Tutorial: Prototyping IoT Devices on GNU/LinuxIoTivity Tutorial: Prototyping IoT Devices on GNU/Linux
IoTivity Tutorial: Prototyping IoT Devices on GNU/LinuxSamsung Open Source Group
 
Why kernelspace sucks?
Why kernelspace sucks?Why kernelspace sucks?
Why kernelspace sucks?OpenFest team
 
Descripción Software libre
Descripción Software libreDescripción Software libre
Descripción Software libregrupocisnerino
 
Experiences with Oracle SPARC S7-2 Server
Experiences with Oracle SPARC S7-2 ServerExperiences with Oracle SPARC S7-2 Server
Experiences with Oracle SPARC S7-2 ServerJomaSoft
 
Structure programming – Java Programming – Theory
Structure programming – Java Programming – TheoryStructure programming – Java Programming – Theory
Structure programming – Java Programming – TheoryOXUS 20
 
Erlang Developments: The Good, The Bad and The Ugly
Erlang Developments: The Good, The Bad and The UglyErlang Developments: The Good, The Bad and The Ugly
Erlang Developments: The Good, The Bad and The Uglyenriquepazperez
 
Linux & Open Source - Alternative Software
Linux & Open Source - Alternative SoftwareLinux & Open Source - Alternative Software
Linux & Open Source - Alternative SoftwareSebastiano Merlino (eTr)
 

Similar to De ce să știi limbaj de asamblare (20)

There is more to C
There is more to CThere is more to C
There is more to C
 
Hardware Open Source
Hardware Open SourceHardware Open Source
Hardware Open Source
 
C language in our world 2017
C language in our world 2017C language in our world 2017
C language in our world 2017
 
How to save the environment
How to save the environmentHow to save the environment
How to save the environment
 
Free Software for Free Sound
Free Software for Free SoundFree Software for Free Sound
Free Software for Free Sound
 
6202942
62029426202942
6202942
 
Porting your favourite cmdline tool to Android
Porting your favourite cmdline tool to AndroidPorting your favourite cmdline tool to Android
Porting your favourite cmdline tool to Android
 
Lab slides - hardware and software
Lab slides - hardware and softwareLab slides - hardware and software
Lab slides - hardware and software
 
Regex Considered Harmful: Use Rosie Pattern Language Instead
Regex Considered Harmful: Use Rosie Pattern Language InsteadRegex Considered Harmful: Use Rosie Pattern Language Instead
Regex Considered Harmful: Use Rosie Pattern Language Instead
 
Tips And Tricks For Bioinformatics Software Engineering
Tips And Tricks For Bioinformatics Software EngineeringTips And Tricks For Bioinformatics Software Engineering
Tips And Tricks For Bioinformatics Software Engineering
 
iSoligorsk #3 2013
iSoligorsk #3 2013iSoligorsk #3 2013
iSoligorsk #3 2013
 
IoTivity Tutorial: Prototyping IoT Devices on GNU/Linux
IoTivity Tutorial: Prototyping IoT Devices on GNU/LinuxIoTivity Tutorial: Prototyping IoT Devices on GNU/Linux
IoTivity Tutorial: Prototyping IoT Devices on GNU/Linux
 
Why kernelspace sucks?
Why kernelspace sucks?Why kernelspace sucks?
Why kernelspace sucks?
 
Beagle board101 esc-boston-2009b
Beagle board101 esc-boston-2009bBeagle board101 esc-boston-2009b
Beagle board101 esc-boston-2009b
 
Descripción Software libre
Descripción Software libreDescripción Software libre
Descripción Software libre
 
Experiences with Oracle SPARC S7-2 Server
Experiences with Oracle SPARC S7-2 ServerExperiences with Oracle SPARC S7-2 Server
Experiences with Oracle SPARC S7-2 Server
 
Structure programming – Java Programming – Theory
Structure programming – Java Programming – TheoryStructure programming – Java Programming – Theory
Structure programming – Java Programming – Theory
 
Erlang Developments: The Good, The Bad and The Ugly
Erlang Developments: The Good, The Bad and The UglyErlang Developments: The Good, The Bad and The Ugly
Erlang Developments: The Good, The Bad and The Ugly
 
Linux & Open Source - Alternative Software
Linux & Open Source - Alternative SoftwareLinux & Open Source - Alternative Software
Linux & Open Source - Alternative Software
 
Kpax
KpaxKpax
Kpax
 

More from Răzvan Deaconescu

CTF: One for All. And More for Me
CTF: One for All. And More for MeCTF: One for All. And More for Me
CTF: One for All. And More for MeRăzvan Deaconescu
 
De ce să învăț securitate?
De ce să învăț securitate?De ce să învăț securitate?
De ce să învăț securitate?Răzvan Deaconescu
 
Extreme, absolutisme și relativisme
Extreme, absolutisme și relativismeExtreme, absolutisme și relativisme
Extreme, absolutisme și relativismeRăzvan Deaconescu
 
Tranzacții, piețe libere și sex
Tranzacții, piețe libere și sexTranzacții, piețe libere și sex
Tranzacții, piețe libere și sexRăzvan Deaconescu
 
Common Bullshit: Când oamenii mănâncă ... rahat
Common Bullshit: Când oamenii mănâncă ... rahatCommon Bullshit: Când oamenii mănâncă ... rahat
Common Bullshit: Când oamenii mănâncă ... rahatRăzvan Deaconescu
 
Despre dezvăț: Uneori strici ca să contruiești
Despre dezvăț: Uneori strici ca să contruieștiDespre dezvăț: Uneori strici ca să contruiești
Despre dezvăț: Uneori strici ca să contruieștiRăzvan Deaconescu
 
Organizarea unei echipe didactice
Organizarea unei echipe didacticeOrganizarea unei echipe didactice
Organizarea unei echipe didacticeRăzvan Deaconescu
 
MOOC-uri, comunitati, mentori, universitati si hub-uri
MOOC-uri, comunitati, mentori, universitati si hub-uriMOOC-uri, comunitati, mentori, universitati si hub-uri
MOOC-uri, comunitati, mentori, universitati si hub-uriRăzvan Deaconescu
 
Despre eficiență: Cum și cu ce tool faci cât mai bine un lucru
Despre eficiență: Cum și cu ce tool faci cât mai bine un lucruDespre eficiență: Cum și cu ce tool faci cât mai bine un lucru
Despre eficiență: Cum și cu ce tool faci cât mai bine un lucruRăzvan Deaconescu
 

More from Răzvan Deaconescu (20)

Călătoria și destinația
Călătoria și destinațiaCălătoria și destinația
Călătoria și destinația
 
CTF: One for All. And More for Me
CTF: One for All. And More for MeCTF: One for All. And More for Me
CTF: One for All. And More for Me
 
De ce să învăț securitate?
De ce să învăț securitate?De ce să învăț securitate?
De ce să învăț securitate?
 
Notele contează
Notele conteazăNotele contează
Notele contează
 
Extreme, absolutisme și relativisme
Extreme, absolutisme și relativismeExtreme, absolutisme și relativisme
Extreme, absolutisme și relativisme
 
Tranzacții, piețe libere și sex
Tranzacții, piețe libere și sexTranzacții, piețe libere și sex
Tranzacții, piețe libere și sex
 
Despre congruență
Despre congruențăDespre congruență
Despre congruență
 
Frame. Framing. Reframing
Frame. Framing. ReframingFrame. Framing. Reframing
Frame. Framing. Reframing
 
Reversing is Fun
Reversing is FunReversing is Fun
Reversing is Fun
 
Secretul succesului
Secretul succesuluiSecretul succesului
Secretul succesului
 
De ce ne plac anti-eroii
De ce ne plac anti-eroiiDe ce ne plac anti-eroii
De ce ne plac anti-eroii
 
Common Bullshit: Când oamenii mănâncă ... rahat
Common Bullshit: Când oamenii mănâncă ... rahatCommon Bullshit: Când oamenii mănâncă ... rahat
Common Bullshit: Când oamenii mănâncă ... rahat
 
Lucruri care contează
Lucruri care conteazăLucruri care contează
Lucruri care contează
 
Cuvintele au putere
Cuvintele au putereCuvintele au putere
Cuvintele au putere
 
Cum sa predai de nota 10
Cum sa predai de nota 10Cum sa predai de nota 10
Cum sa predai de nota 10
 
Open Source for Students
Open Source for StudentsOpen Source for Students
Open Source for Students
 
Despre dezvăț: Uneori strici ca să contruiești
Despre dezvăț: Uneori strici ca să contruieștiDespre dezvăț: Uneori strici ca să contruiești
Despre dezvăț: Uneori strici ca să contruiești
 
Organizarea unei echipe didactice
Organizarea unei echipe didacticeOrganizarea unei echipe didactice
Organizarea unei echipe didactice
 
MOOC-uri, comunitati, mentori, universitati si hub-uri
MOOC-uri, comunitati, mentori, universitati si hub-uriMOOC-uri, comunitati, mentori, universitati si hub-uri
MOOC-uri, comunitati, mentori, universitati si hub-uri
 
Despre eficiență: Cum și cu ce tool faci cât mai bine un lucru
Despre eficiență: Cum și cu ce tool faci cât mai bine un lucruDespre eficiență: Cum și cu ce tool faci cât mai bine un lucru
Despre eficiență: Cum și cu ce tool faci cât mai bine un lucru
 

Recently uploaded

Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxPooja Bhuva
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17Celine George
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxPooja Bhuva
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Pooja Bhuva
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 

Recently uploaded (20)

Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 

De ce să știi limbaj de asamblare

  • 1. De ce s˘a s, tii limbaj de asamblare? R˘azvan Deaconescu razvan.deaconescu@cs.pub.ro Informatica la Castel 2016 (Macea, Arad) 24 august 2016 1 / 22
  • 2. Exemple din securitatea ofensiv˘a offensive security serviciu de tip hello configurat pe mas, in˘a virtual˘a Smashing the Stack for Fun and Profit (aleph1) https://www.exploit-db.com/local/ https://www.exploit-db.com/shellcode/ https://www.exploit-db.com/docs/39665.pdf 2 / 22
  • 3. Nevoia de optimizare Make it work. Make it right. Make it fast. Kent Beck http://osxr.org:8080/glibc/source/sysdeps/x86/bits/string.h 3 / 22
  • 4. Nevoia de debugging printf debugging valori variabile funct, ii apelate (fluxul programului) valori din memorie valorile registrelor procesorului codul rulat de procesor 4 / 22
  • 5. Dezvoltare low-level sisteme ˆıncoporate (embedded systems) Board Support Package: bootloader, kernel, drivere software de sistem (system software) dezvoltare de kernel (kernel development) 5 / 22
  • 6. ˆInainte de a ˆıncepe mai mult citim decˆat scriem ca s˘a scrii poves, ti bune trebuie s˘a cites, ti poves, ti bune ca s˘a scrii cod bun trebuie s˘a cites, ti cod bun mai mult ca orice, limbajul de asamblare mai mult se cites, te ˆInv˘at, ˘am limbaj de asamblare ca s˘a ˆınt, elegem, mult mai rar s˘a scriem. R. Deaconescu, 2016, Macea, Arad 6 / 22
  • 7. De ce e mai us, or? mas, ini virtuale emulatoare documentat, ie 7 / 22
  • 8. Funct, ionarea sistemului de calcul 8 / 22
  • 9. Concepte memorie adres˘a de memorie cod mas, in˘a (instruct, iuni) procesor registre operat, ii / mnemonici operanzi: registre, adrese de memorie, valori 9 / 22
  • 10. Bazele limbajului de asamblare datele rezid˘a ˆın memorie datele sunt aduse din memorie ˆın registrele procesorului procesorul face operat, ii cu datele din registre rezultatele operat, iilor sunt scrise ˆınapoi ˆın memorie unele informat, ii pot fi preluate s, i transmise c˘atre dispozitive de intrare/ies, ire 10 / 22
  • 11. Operat, ii de asamblare 11 / 22
  • 12. Exemple ˆın limbaj de asamblare asm/hello.asm asm/print_n.asm asm/print_n_xor.asm 12 / 22
  • 14. ˆInt, elegerea sistemului de calcul De ce ˆınvat, ˘a oamenii obis, nuit, i s˘a cˆante la instrumente muzicale? De ce fac oamenii obis, nuit, i sport ˆın mod activ? De ce le place oamenilor (ˆın special copiilor) s˘a demonteze lucruri? Mastery, Autonomy and Purpose (Dan Pink: Drive) curiozitate s, i expertiz˘a 14 / 22
  • 15. John “maddog” Hall: The Third Language https://www.lpi.org/the-third-language/ http://www.techworld.com/operating-systems/ john-maddog-hall-why-raspberry-pi-is-only-beginning-3453073/ 2/ 15 / 22
  • 16. Joel Spolsky: Law of Leaky Abstractions http: //www.joelonsoftware.com/articles/LeakyAbstractions.html 16 / 22
  • 17. Parcurgerea unei matrice Demo: walk matrix row major.c, walk matrix column major.c 17 / 22
  • 18. Shlemiel the Painter’s Algorithm Joel Spolsky: Back to Basics http: //www.joelonsoftware.com/articles/fog0000000319.html 18 / 22
  • 19. Poves, ti, povestiri, amintiri Minunata c˘al˘atorie a lui R˘azvan ,,Senpai” Deaconescu ˆın lumea calculatoarelor 19 / 22
  • 20. Cum ˆınv˘at, /cum aprofundez Nu ˆınv˘at, a ceva ca s˘a ˆınvet, i ceva / c˘a e bine / c˘a se caut˘a / c˘a vrei s˘a s, tii. Pune-t, i obiective s, i ˆınvat, ˘a ca o consecint, ˘a. Means to an end. competit, ii de tip CTF (Capture the Flag) site-uri de tip wargames profiling la aplicat, ii programeaz˘a pe platforme ARM (sau MIPS): Raspberry Pi Randal E. Bryant, David R. O’Hallaron: Computer Systems: A Programmer’s Perspective 20 / 22
  • 21. La final ˆInvat, ˘a ˆın profunzime. Stric˘a lucrurile. Detaliile fac diferent, a. R˘abdarea este o virtute. When solving problems, dig at the roots instead of just hacking at the leaves. Anthony J. D’Angelo Laborator de introducere ˆın limbaj de asamblare: joi, 25 august 2016, ora 21:00 21 / 22