SlideShare a Scribd company logo
1 of 1
Download to read offline
Convert the following C code to assembler Give a flow chart for this code. unsigned char A, i;
while(1) {A = A + 1; for (i=0; i
Solution
mian():
push rbp
mov rbp, rsp
.L4:
add BYTE PTR [rbp-1], 1
mov BYTE PTR [rbp-2], 0
.L3:
movzx eax, BYTE PTR [rbp-2]
cmp eax, 9
jg .L4
movzx eax, BYTE PTR [rbp-2]
add eax, 1
mov BYTE PTR [rbp-2], al
jmp .L3

More Related Content

More from fazilfootsteps

Robbinsdale Hospital is one of two hospitals among the six facilitie.pdf
Robbinsdale Hospital is one of two hospitals among the six facilitie.pdfRobbinsdale Hospital is one of two hospitals among the six facilitie.pdf
Robbinsdale Hospital is one of two hospitals among the six facilitie.pdffazilfootsteps
 
Research excise taxes in other states besides North Carolina. Report.pdf
Research excise taxes in other states besides North Carolina. Report.pdfResearch excise taxes in other states besides North Carolina. Report.pdf
Research excise taxes in other states besides North Carolina. Report.pdffazilfootsteps
 
Prove that E X is not connected if and only if there exist open sets.pdf
Prove that E  X is not connected if and only if there exist open sets.pdfProve that E  X is not connected if and only if there exist open sets.pdf
Prove that E X is not connected if and only if there exist open sets.pdffazilfootsteps
 
potential benefits of sustainability strategySolutionpotential.pdf
potential benefits of sustainability strategySolutionpotential.pdfpotential benefits of sustainability strategySolutionpotential.pdf
potential benefits of sustainability strategySolutionpotential.pdffazilfootsteps
 
Please write a code in JAVA to do line editor..Your program will b.pdf
Please write a code in JAVA to do line editor..Your program will b.pdfPlease write a code in JAVA to do line editor..Your program will b.pdf
Please write a code in JAVA to do line editor..Your program will b.pdffazilfootsteps
 
Nessus is a network security tool- write a pragraph describe itsto.pdf
Nessus is a network security tool- write a pragraph describe itsto.pdfNessus is a network security tool- write a pragraph describe itsto.pdf
Nessus is a network security tool- write a pragraph describe itsto.pdffazilfootsteps
 
Module 01 Discussion - Dominant CultureDefine the .pdf
Module 01 Discussion - Dominant CultureDefine the .pdfModule 01 Discussion - Dominant CultureDefine the .pdf
Module 01 Discussion - Dominant CultureDefine the .pdffazilfootsteps
 
List and explain the states of process in a specific operating syste.pdf
List and explain the states of process in a specific operating syste.pdfList and explain the states of process in a specific operating syste.pdf
List and explain the states of process in a specific operating syste.pdffazilfootsteps
 
Most integer types are directly supported by hardware, but some are n.pdf
Most integer types are directly supported by hardware, but some are n.pdfMost integer types are directly supported by hardware, but some are n.pdf
Most integer types are directly supported by hardware, but some are n.pdffazilfootsteps
 
Introduction to Philosophy 101 HomeworkSection 3 Deductive Argum.pdf
Introduction to Philosophy 101 HomeworkSection 3 Deductive Argum.pdfIntroduction to Philosophy 101 HomeworkSection 3 Deductive Argum.pdf
Introduction to Philosophy 101 HomeworkSection 3 Deductive Argum.pdffazilfootsteps
 
Indian Institute of Management Kashipur Executive Post Graduate Pro.pdf
Indian Institute of Management Kashipur Executive Post Graduate Pro.pdfIndian Institute of Management Kashipur Executive Post Graduate Pro.pdf
Indian Institute of Management Kashipur Executive Post Graduate Pro.pdffazilfootsteps
 
implemement the game.cpp by the header file given. And create main.c.pdf
implemement the game.cpp by the header file given. And create main.c.pdfimplemement the game.cpp by the header file given. And create main.c.pdf
implemement the game.cpp by the header file given. And create main.c.pdffazilfootsteps
 
Ifgqueue.h#ifndef LFGQUEUE_H #define LFGQUEUE_H#include pl.pdf
Ifgqueue.h#ifndef LFGQUEUE_H #define LFGQUEUE_H#include pl.pdfIfgqueue.h#ifndef LFGQUEUE_H #define LFGQUEUE_H#include pl.pdf
Ifgqueue.h#ifndef LFGQUEUE_H #define LFGQUEUE_H#include pl.pdffazilfootsteps
 
Here is the company database for the problem--commen.pdf
Here is the company database for the problem--commen.pdfHere is the company database for the problem--commen.pdf
Here is the company database for the problem--commen.pdffazilfootsteps
 
Fundamental Principles of Professional Ethics Part A of the Code Int.pdf
Fundamental Principles of Professional Ethics Part A of the Code Int.pdfFundamental Principles of Professional Ethics Part A of the Code Int.pdf
Fundamental Principles of Professional Ethics Part A of the Code Int.pdffazilfootsteps
 
Explain why keeping abreast of communications technologies is import.pdf
Explain why keeping abreast of communications technologies is import.pdfExplain why keeping abreast of communications technologies is import.pdf
Explain why keeping abreast of communications technologies is import.pdffazilfootsteps
 
estion 49 (1 point) to conomists Barry Bosworth and Susan Collins fou.pdf
estion 49 (1 point) to conomists Barry Bosworth and Susan Collins fou.pdfestion 49 (1 point) to conomists Barry Bosworth and Susan Collins fou.pdf
estion 49 (1 point) to conomists Barry Bosworth and Susan Collins fou.pdffazilfootsteps
 
Discuss the differences between a threat and an attack. Describe how.pdf
Discuss the differences between a threat and an attack. Describe how.pdfDiscuss the differences between a threat and an attack. Describe how.pdf
Discuss the differences between a threat and an attack. Describe how.pdffazilfootsteps
 
Define an ADT for a sequence of integers (remember that a sequenc.pdf
Define an ADT for a sequence of integers (remember that a sequenc.pdfDefine an ADT for a sequence of integers (remember that a sequenc.pdf
Define an ADT for a sequence of integers (remember that a sequenc.pdffazilfootsteps
 
Describe the application of policies and procedures to managing acco.pdf
Describe the application of policies and procedures to managing acco.pdfDescribe the application of policies and procedures to managing acco.pdf
Describe the application of policies and procedures to managing acco.pdffazilfootsteps
 

More from fazilfootsteps (20)

Robbinsdale Hospital is one of two hospitals among the six facilitie.pdf
Robbinsdale Hospital is one of two hospitals among the six facilitie.pdfRobbinsdale Hospital is one of two hospitals among the six facilitie.pdf
Robbinsdale Hospital is one of two hospitals among the six facilitie.pdf
 
Research excise taxes in other states besides North Carolina. Report.pdf
Research excise taxes in other states besides North Carolina. Report.pdfResearch excise taxes in other states besides North Carolina. Report.pdf
Research excise taxes in other states besides North Carolina. Report.pdf
 
Prove that E X is not connected if and only if there exist open sets.pdf
Prove that E  X is not connected if and only if there exist open sets.pdfProve that E  X is not connected if and only if there exist open sets.pdf
Prove that E X is not connected if and only if there exist open sets.pdf
 
potential benefits of sustainability strategySolutionpotential.pdf
potential benefits of sustainability strategySolutionpotential.pdfpotential benefits of sustainability strategySolutionpotential.pdf
potential benefits of sustainability strategySolutionpotential.pdf
 
Please write a code in JAVA to do line editor..Your program will b.pdf
Please write a code in JAVA to do line editor..Your program will b.pdfPlease write a code in JAVA to do line editor..Your program will b.pdf
Please write a code in JAVA to do line editor..Your program will b.pdf
 
Nessus is a network security tool- write a pragraph describe itsto.pdf
Nessus is a network security tool- write a pragraph describe itsto.pdfNessus is a network security tool- write a pragraph describe itsto.pdf
Nessus is a network security tool- write a pragraph describe itsto.pdf
 
Module 01 Discussion - Dominant CultureDefine the .pdf
Module 01 Discussion - Dominant CultureDefine the .pdfModule 01 Discussion - Dominant CultureDefine the .pdf
Module 01 Discussion - Dominant CultureDefine the .pdf
 
List and explain the states of process in a specific operating syste.pdf
List and explain the states of process in a specific operating syste.pdfList and explain the states of process in a specific operating syste.pdf
List and explain the states of process in a specific operating syste.pdf
 
Most integer types are directly supported by hardware, but some are n.pdf
Most integer types are directly supported by hardware, but some are n.pdfMost integer types are directly supported by hardware, but some are n.pdf
Most integer types are directly supported by hardware, but some are n.pdf
 
Introduction to Philosophy 101 HomeworkSection 3 Deductive Argum.pdf
Introduction to Philosophy 101 HomeworkSection 3 Deductive Argum.pdfIntroduction to Philosophy 101 HomeworkSection 3 Deductive Argum.pdf
Introduction to Philosophy 101 HomeworkSection 3 Deductive Argum.pdf
 
Indian Institute of Management Kashipur Executive Post Graduate Pro.pdf
Indian Institute of Management Kashipur Executive Post Graduate Pro.pdfIndian Institute of Management Kashipur Executive Post Graduate Pro.pdf
Indian Institute of Management Kashipur Executive Post Graduate Pro.pdf
 
implemement the game.cpp by the header file given. And create main.c.pdf
implemement the game.cpp by the header file given. And create main.c.pdfimplemement the game.cpp by the header file given. And create main.c.pdf
implemement the game.cpp by the header file given. And create main.c.pdf
 
Ifgqueue.h#ifndef LFGQUEUE_H #define LFGQUEUE_H#include pl.pdf
Ifgqueue.h#ifndef LFGQUEUE_H #define LFGQUEUE_H#include pl.pdfIfgqueue.h#ifndef LFGQUEUE_H #define LFGQUEUE_H#include pl.pdf
Ifgqueue.h#ifndef LFGQUEUE_H #define LFGQUEUE_H#include pl.pdf
 
Here is the company database for the problem--commen.pdf
Here is the company database for the problem--commen.pdfHere is the company database for the problem--commen.pdf
Here is the company database for the problem--commen.pdf
 
Fundamental Principles of Professional Ethics Part A of the Code Int.pdf
Fundamental Principles of Professional Ethics Part A of the Code Int.pdfFundamental Principles of Professional Ethics Part A of the Code Int.pdf
Fundamental Principles of Professional Ethics Part A of the Code Int.pdf
 
Explain why keeping abreast of communications technologies is import.pdf
Explain why keeping abreast of communications technologies is import.pdfExplain why keeping abreast of communications technologies is import.pdf
Explain why keeping abreast of communications technologies is import.pdf
 
estion 49 (1 point) to conomists Barry Bosworth and Susan Collins fou.pdf
estion 49 (1 point) to conomists Barry Bosworth and Susan Collins fou.pdfestion 49 (1 point) to conomists Barry Bosworth and Susan Collins fou.pdf
estion 49 (1 point) to conomists Barry Bosworth and Susan Collins fou.pdf
 
Discuss the differences between a threat and an attack. Describe how.pdf
Discuss the differences between a threat and an attack. Describe how.pdfDiscuss the differences between a threat and an attack. Describe how.pdf
Discuss the differences between a threat and an attack. Describe how.pdf
 
Define an ADT for a sequence of integers (remember that a sequenc.pdf
Define an ADT for a sequence of integers (remember that a sequenc.pdfDefine an ADT for a sequence of integers (remember that a sequenc.pdf
Define an ADT for a sequence of integers (remember that a sequenc.pdf
 
Describe the application of policies and procedures to managing acco.pdf
Describe the application of policies and procedures to managing acco.pdfDescribe the application of policies and procedures to managing acco.pdf
Describe the application of policies and procedures to managing acco.pdf
 

Recently uploaded

male presentation...pdf.................
male presentation...pdf.................male presentation...pdf.................
male presentation...pdf.................MirzaAbrarBaig5
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project researchCaitlinCummins3
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsSandeep D Chaudhary
 
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxAnalyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxLimon Prince
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17Celine George
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...EADTU
 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxneillewis46
 
e-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopale-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi RajagopalEADTU
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxannathomasp01
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSean M. Fox
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...Nguyen Thanh Tu Collection
 
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjMohammed Sikander
 
How to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptxHow to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptxCeline George
 
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportBasic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportDenish Jangid
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxMarlene Maheu
 
UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024Borja Sotomayor
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismDabee Kamal
 
Major project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesMajor project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesAmanpreetKaur157993
 

Recently uploaded (20)

male presentation...pdf.................
male presentation...pdf.................male presentation...pdf.................
male presentation...pdf.................
 
ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)
 
Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxAnalyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptx
 
e-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopale-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopal
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
 
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
 
How to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptxHow to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptx
 
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportBasic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptx
 
UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in Hinduism
 
Major project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesMajor project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategies
 

Convert the following C code to assembler Give a flow chart for this.pdf

  • 1. Convert the following C code to assembler Give a flow chart for this code. unsigned char A, i; while(1) {A = A + 1; for (i=0; i Solution mian(): push rbp mov rbp, rsp .L4: add BYTE PTR [rbp-1], 1 mov BYTE PTR [rbp-2], 0 .L3: movzx eax, BYTE PTR [rbp-2] cmp eax, 9 jg .L4 movzx eax, BYTE PTR [rbp-2] add eax, 1 mov BYTE PTR [rbp-2], al jmp .L3