SlideShare a Scribd company logo
1 of 2
Download to read offline
Please correct my code for me i am lost.
Thanks. i submitted pictures yesterday.
; COMSC-142 'Happy Visage' in Assembly Language
; STARTER CODE
; my name
; Define the system call and I/O ** constants **
; to make code more readable farther below
SYS_WRITE equ 1 ; write text to stdout
SYS_EXIT equ 60 ; terminate the program
STDIN equ 0 ; standard input
STDOUT equ 1 ; standard output
; INSTRUCTIONS: REPLACE THE ??????????? (question marks)
; IN THE REST OF THIS PROGRAM WITH WHAT IS
; NEEDED TO MAKE IT RUN.
section .data ; The data section is where we define
; some of our inputs/data
; that we are going to use
msg1 db 10, " "
msg2 db 10, " +^^^^^^^+",
msg3 db 10, " (| o o |) "
msg4 db 10, " | ^ | "
msg5 db 10, " | '-' | "
msg6 db 10, " +-------+ ", 0xa
; Four your convenience, here are all the lines of the happy visage
;
; +^^^^^^^+
; (| o o |)
; | ^ |
; | '-' |
; +-------+
len1 equ $ - msg1 ; define len in RAM
; only one len statement is needed
; do not add any other len statements
global _start ; The code always resides in the _start(s).
section .text ; strangely, this is the executable part of
; our program rather than just plain inert text
; section .code would have made better sense?
_start: ; underscore _start is required on Windows,
; but it is only start on Linux (no _ character)
; with assembler, we have to tell it every little thing
; so we have to code a few lines below with every little thing
; The system is then setup and can put our Happy Visage up
mov rdx, ???? ; put the length into the rdx register
mov rsi, ???? ; put the location of the first message into rsi
mov rdi, ?????? ; put the stdout identifier into rdi
mov rax, ????????? ; put the sys_write into rax to tell the
; system what you want it to do...
; ... which is the write/print something
; The call is almost always put...
; ... into the rax register.
; now we have setup everything above,
; time to put it up on the console by making the syscall
syscall ; syscall to the write() function
; similar to the printf function
xor edi, edi ; Clear edi to indicate successful exit = 0
mov rax, SYS_EXIT ; put the sys_exit identifier into rax
syscall ; call the system to let it know you are done

More Related Content

Similar to Please correct my code for me i am lost Thanks i submitted.pdf

Code Red Security
Code Red SecurityCode Red Security
Code Red SecurityAmr Ali
 
Assembly Language Programming
Assembly Language ProgrammingAssembly Language Programming
Assembly Language ProgrammingNiropam Das
 
01c. Starting A Router
01c.  Starting A  Router01c.  Starting A  Router
01c. Starting A RouterNghiep Lam
 
Buffer overflow – Smashing The Stack
Buffer overflow – Smashing The StackBuffer overflow – Smashing The Stack
Buffer overflow – Smashing The StackTomer Zait
 
Writing Metasploit Plugins
Writing Metasploit PluginsWriting Metasploit Plugins
Writing Metasploit Pluginsamiable_indian
 
Vectorization on x86: all you need to know
Vectorization on x86: all you need to knowVectorization on x86: all you need to know
Vectorization on x86: all you need to knowRoberto Agostino Vitillo
 
Buffer Overflow - Smashing the Stack
Buffer Overflow - Smashing the StackBuffer Overflow - Smashing the Stack
Buffer Overflow - Smashing the StackironSource
 
Shellcoding in linux
Shellcoding in linuxShellcoding in linux
Shellcoding in linuxAjin Abraham
 
0x01 - Breaking into Linux VMs for Fun and Profit
0x01 - Breaking into Linux VMs for Fun and Profit0x01 - Breaking into Linux VMs for Fun and Profit
0x01 - Breaking into Linux VMs for Fun and ProfitRussell Sanford
 
MISC TOPICS #2: I18n Data Programming Pearls Random Records Rpx Now Susher St...
MISC TOPICS #2: I18n Data Programming Pearls Random Records Rpx Now Susher St...MISC TOPICS #2: I18n Data Programming Pearls Random Records Rpx Now Susher St...
MISC TOPICS #2: I18n Data Programming Pearls Random Records Rpx Now Susher St...grosser
 
Practical basics on c++
Practical basics on c++Practical basics on c++
Practical basics on c++Marco Izzotti
 
N_Asm Assembly numbers (sol)
N_Asm Assembly numbers (sol)N_Asm Assembly numbers (sol)
N_Asm Assembly numbers (sol)Selomon birhane
 
E yantra robot abstractions
E yantra robot abstractionsE yantra robot abstractions
E yantra robot abstractionsAkshar Desai
 
Semtex.c [CVE-2013-2094] - A Linux Privelege Escalation
Semtex.c [CVE-2013-2094] - A Linux Privelege EscalationSemtex.c [CVE-2013-2094] - A Linux Privelege Escalation
Semtex.c [CVE-2013-2094] - A Linux Privelege EscalationKernel TLV
 
How to build a virtual machine
How to build a virtual machineHow to build a virtual machine
How to build a virtual machineTerence Parr
 
CyberLink LabelPrint 2.5 Exploitation Process
CyberLink LabelPrint 2.5 Exploitation ProcessCyberLink LabelPrint 2.5 Exploitation Process
CyberLink LabelPrint 2.5 Exploitation ProcessThomas Gregory
 

Similar to Please correct my code for me i am lost Thanks i submitted.pdf (20)

Code Red Security
Code Red SecurityCode Red Security
Code Red Security
 
Assembly Language Programming
Assembly Language ProgrammingAssembly Language Programming
Assembly Language Programming
 
01c. Starting A Router
01c.  Starting A  Router01c.  Starting A  Router
01c. Starting A Router
 
Buffer overflow – Smashing The Stack
Buffer overflow – Smashing The StackBuffer overflow – Smashing The Stack
Buffer overflow – Smashing The Stack
 
Writing Metasploit Plugins
Writing Metasploit PluginsWriting Metasploit Plugins
Writing Metasploit Plugins
 
Vectorization on x86: all you need to know
Vectorization on x86: all you need to knowVectorization on x86: all you need to know
Vectorization on x86: all you need to know
 
Buffer Overflow - Smashing the Stack
Buffer Overflow - Smashing the StackBuffer Overflow - Smashing the Stack
Buffer Overflow - Smashing the Stack
 
Shellcoding in linux
Shellcoding in linuxShellcoding in linux
Shellcoding in linux
 
0x01 - Breaking into Linux VMs for Fun and Profit
0x01 - Breaking into Linux VMs for Fun and Profit0x01 - Breaking into Linux VMs for Fun and Profit
0x01 - Breaking into Linux VMs for Fun and Profit
 
MISC TOPICS #2: I18n Data Programming Pearls Random Records Rpx Now Susher St...
MISC TOPICS #2: I18n Data Programming Pearls Random Records Rpx Now Susher St...MISC TOPICS #2: I18n Data Programming Pearls Random Records Rpx Now Susher St...
MISC TOPICS #2: I18n Data Programming Pearls Random Records Rpx Now Susher St...
 
Practical basics on c++
Practical basics on c++Practical basics on c++
Practical basics on c++
 
N_Asm Assembly numbers (sol)
N_Asm Assembly numbers (sol)N_Asm Assembly numbers (sol)
N_Asm Assembly numbers (sol)
 
E yantra robot abstractions
E yantra robot abstractionsE yantra robot abstractions
E yantra robot abstractions
 
Assembly language part I
Assembly language part IAssembly language part I
Assembly language part I
 
Assembly language part I
Assembly language part IAssembly language part I
Assembly language part I
 
20141106 asfws unicode_hacks
20141106 asfws unicode_hacks20141106 asfws unicode_hacks
20141106 asfws unicode_hacks
 
Semtex.c [CVE-2013-2094] - A Linux Privelege Escalation
Semtex.c [CVE-2013-2094] - A Linux Privelege EscalationSemtex.c [CVE-2013-2094] - A Linux Privelege Escalation
Semtex.c [CVE-2013-2094] - A Linux Privelege Escalation
 
Writing bios
Writing biosWriting bios
Writing bios
 
How to build a virtual machine
How to build a virtual machineHow to build a virtual machine
How to build a virtual machine
 
CyberLink LabelPrint 2.5 Exploitation Process
CyberLink LabelPrint 2.5 Exploitation ProcessCyberLink LabelPrint 2.5 Exploitation Process
CyberLink LabelPrint 2.5 Exploitation Process
 

More from kitty811

please fix this code so that the tests pass css Selec.pdf
please fix this code so that the tests pass        css Selec.pdfplease fix this code so that the tests pass        css Selec.pdf
please fix this code so that the tests pass css Selec.pdfkitty811
 
please help Below are the ages at which US presidents bega.pdf
please help Below are the ages at which US presidents bega.pdfplease help Below are the ages at which US presidents bega.pdf
please help Below are the ages at which US presidents bega.pdfkitty811
 
please fill in the blanks below the proc structure .pdf
please fill in the blanks below    the proc structure  .pdfplease fill in the blanks below    the proc structure  .pdf
please fill in the blanks below the proc structure .pdfkitty811
 
Please explain these steps Not sure how to go from first li.pdf
Please explain these steps Not sure how to go from first li.pdfPlease explain these steps Not sure how to go from first li.pdf
Please explain these steps Not sure how to go from first li.pdfkitty811
 
Please help Edgar Given the following API for a mutable Em.pdf
Please help Edgar Given the following API for a mutable Em.pdfPlease help Edgar Given the following API for a mutable Em.pdf
Please help Edgar Given the following API for a mutable Em.pdfkitty811
 
Please help 1 Use any data structures or control flows as a.pdf
Please help 1 Use any data structures or control flows as a.pdfPlease help 1 Use any data structures or control flows as a.pdf
Please help 1 Use any data structures or control flows as a.pdfkitty811
 
Please graph the spectrum using only MATLAB and provide the .pdf
Please graph the spectrum using only MATLAB and provide the .pdfPlease graph the spectrum using only MATLAB and provide the .pdf
Please graph the spectrum using only MATLAB and provide the .pdfkitty811
 
please help Let X and Y be random variables with joint dens.pdf
please help  Let X and Y be random variables with joint dens.pdfplease help  Let X and Y be random variables with joint dens.pdf
please help Let X and Y be random variables with joint dens.pdfkitty811
 
Please go through the Review Article and submit a summary of.pdf
Please go through the Review Article and submit a summary of.pdfPlease go through the Review Article and submit a summary of.pdf
Please go through the Review Article and submit a summary of.pdfkitty811
 
Please give me a new topic not the one already on cheggQU.pdf
Please give me a new topic not the one already on cheggQU.pdfPlease give me a new topic not the one already on cheggQU.pdf
Please give me a new topic not the one already on cheggQU.pdfkitty811
 
please give ANY inswer in 30 min The CONTROL pyloric rhythm .pdf
please give ANY inswer in 30 min The CONTROL pyloric rhythm .pdfplease give ANY inswer in 30 min The CONTROL pyloric rhythm .pdf
please give ANY inswer in 30 min The CONTROL pyloric rhythm .pdfkitty811
 
please full it please full it 2 Genie and Dan have just ha.pdf
please full it please full it 2 Genie and Dan have just ha.pdfplease full it please full it 2 Genie and Dan have just ha.pdf
please full it please full it 2 Genie and Dan have just ha.pdfkitty811
 
Please find the Below YAML code whihc is meant to achieve th.pdf
Please find the Below YAML code whihc is meant to achieve th.pdfPlease find the Below YAML code whihc is meant to achieve th.pdf
Please find the Below YAML code whihc is meant to achieve th.pdfkitty811
 
Please fix my errors class Iterator public Construc.pdf
Please fix my errors   class Iterator  public  Construc.pdfPlease fix my errors   class Iterator  public  Construc.pdf
Please fix my errors class Iterator public Construc.pdfkitty811
 
Please fill in the blanks of the 5 questions Required inform.pdf
Please fill in the blanks of the 5 questions Required inform.pdfPlease fill in the blanks of the 5 questions Required inform.pdf
Please fill in the blanks of the 5 questions Required inform.pdfkitty811
 
please fast answer Suppose that XU nif 01 You draw a sa.pdf
please fast answer  Suppose that XU nif 01 You draw a sa.pdfplease fast answer  Suppose that XU nif 01 You draw a sa.pdf
please fast answer Suppose that XU nif 01 You draw a sa.pdfkitty811
 
Please explain in steps so I may be able to follow and learn.pdf
Please explain in steps so I may be able to follow and learn.pdfPlease explain in steps so I may be able to follow and learn.pdf
Please explain in steps so I may be able to follow and learn.pdfkitty811
 
Please explain why c is correct Why does this return and e.pdf
Please explain why c is correct  Why does this return and e.pdfPlease explain why c is correct  Why does this return and e.pdf
Please explain why c is correct Why does this return and e.pdfkitty811
 
Please code in C in Visual Studio Thank you 1 Create a C.pdf
Please code in C in Visual Studio Thank you 1 Create a C.pdfPlease code in C in Visual Studio Thank you 1 Create a C.pdf
Please code in C in Visual Studio Thank you 1 Create a C.pdfkitty811
 
Please explain step by step Current Attempt in Progress As .pdf
Please explain step by step Current Attempt in Progress As .pdfPlease explain step by step Current Attempt in Progress As .pdf
Please explain step by step Current Attempt in Progress As .pdfkitty811
 

More from kitty811 (20)

please fix this code so that the tests pass css Selec.pdf
please fix this code so that the tests pass        css Selec.pdfplease fix this code so that the tests pass        css Selec.pdf
please fix this code so that the tests pass css Selec.pdf
 
please help Below are the ages at which US presidents bega.pdf
please help Below are the ages at which US presidents bega.pdfplease help Below are the ages at which US presidents bega.pdf
please help Below are the ages at which US presidents bega.pdf
 
please fill in the blanks below the proc structure .pdf
please fill in the blanks below    the proc structure  .pdfplease fill in the blanks below    the proc structure  .pdf
please fill in the blanks below the proc structure .pdf
 
Please explain these steps Not sure how to go from first li.pdf
Please explain these steps Not sure how to go from first li.pdfPlease explain these steps Not sure how to go from first li.pdf
Please explain these steps Not sure how to go from first li.pdf
 
Please help Edgar Given the following API for a mutable Em.pdf
Please help Edgar Given the following API for a mutable Em.pdfPlease help Edgar Given the following API for a mutable Em.pdf
Please help Edgar Given the following API for a mutable Em.pdf
 
Please help 1 Use any data structures or control flows as a.pdf
Please help 1 Use any data structures or control flows as a.pdfPlease help 1 Use any data structures or control flows as a.pdf
Please help 1 Use any data structures or control flows as a.pdf
 
Please graph the spectrum using only MATLAB and provide the .pdf
Please graph the spectrum using only MATLAB and provide the .pdfPlease graph the spectrum using only MATLAB and provide the .pdf
Please graph the spectrum using only MATLAB and provide the .pdf
 
please help Let X and Y be random variables with joint dens.pdf
please help  Let X and Y be random variables with joint dens.pdfplease help  Let X and Y be random variables with joint dens.pdf
please help Let X and Y be random variables with joint dens.pdf
 
Please go through the Review Article and submit a summary of.pdf
Please go through the Review Article and submit a summary of.pdfPlease go through the Review Article and submit a summary of.pdf
Please go through the Review Article and submit a summary of.pdf
 
Please give me a new topic not the one already on cheggQU.pdf
Please give me a new topic not the one already on cheggQU.pdfPlease give me a new topic not the one already on cheggQU.pdf
Please give me a new topic not the one already on cheggQU.pdf
 
please give ANY inswer in 30 min The CONTROL pyloric rhythm .pdf
please give ANY inswer in 30 min The CONTROL pyloric rhythm .pdfplease give ANY inswer in 30 min The CONTROL pyloric rhythm .pdf
please give ANY inswer in 30 min The CONTROL pyloric rhythm .pdf
 
please full it please full it 2 Genie and Dan have just ha.pdf
please full it please full it 2 Genie and Dan have just ha.pdfplease full it please full it 2 Genie and Dan have just ha.pdf
please full it please full it 2 Genie and Dan have just ha.pdf
 
Please find the Below YAML code whihc is meant to achieve th.pdf
Please find the Below YAML code whihc is meant to achieve th.pdfPlease find the Below YAML code whihc is meant to achieve th.pdf
Please find the Below YAML code whihc is meant to achieve th.pdf
 
Please fix my errors class Iterator public Construc.pdf
Please fix my errors   class Iterator  public  Construc.pdfPlease fix my errors   class Iterator  public  Construc.pdf
Please fix my errors class Iterator public Construc.pdf
 
Please fill in the blanks of the 5 questions Required inform.pdf
Please fill in the blanks of the 5 questions Required inform.pdfPlease fill in the blanks of the 5 questions Required inform.pdf
Please fill in the blanks of the 5 questions Required inform.pdf
 
please fast answer Suppose that XU nif 01 You draw a sa.pdf
please fast answer  Suppose that XU nif 01 You draw a sa.pdfplease fast answer  Suppose that XU nif 01 You draw a sa.pdf
please fast answer Suppose that XU nif 01 You draw a sa.pdf
 
Please explain in steps so I may be able to follow and learn.pdf
Please explain in steps so I may be able to follow and learn.pdfPlease explain in steps so I may be able to follow and learn.pdf
Please explain in steps so I may be able to follow and learn.pdf
 
Please explain why c is correct Why does this return and e.pdf
Please explain why c is correct  Why does this return and e.pdfPlease explain why c is correct  Why does this return and e.pdf
Please explain why c is correct Why does this return and e.pdf
 
Please code in C in Visual Studio Thank you 1 Create a C.pdf
Please code in C in Visual Studio Thank you 1 Create a C.pdfPlease code in C in Visual Studio Thank you 1 Create a C.pdf
Please code in C in Visual Studio Thank you 1 Create a C.pdf
 
Please explain step by step Current Attempt in Progress As .pdf
Please explain step by step Current Attempt in Progress As .pdfPlease explain step by step Current Attempt in Progress As .pdf
Please explain step by step Current Attempt in Progress As .pdf
 

Recently uploaded

Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 

Recently uploaded (20)

Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 

Please correct my code for me i am lost Thanks i submitted.pdf

  • 1. Please correct my code for me i am lost. Thanks. i submitted pictures yesterday. ; COMSC-142 'Happy Visage' in Assembly Language ; STARTER CODE ; my name ; Define the system call and I/O ** constants ** ; to make code more readable farther below SYS_WRITE equ 1 ; write text to stdout SYS_EXIT equ 60 ; terminate the program STDIN equ 0 ; standard input STDOUT equ 1 ; standard output ; INSTRUCTIONS: REPLACE THE ??????????? (question marks) ; IN THE REST OF THIS PROGRAM WITH WHAT IS ; NEEDED TO MAKE IT RUN. section .data ; The data section is where we define ; some of our inputs/data ; that we are going to use msg1 db 10, " " msg2 db 10, " +^^^^^^^+", msg3 db 10, " (| o o |) " msg4 db 10, " | ^ | " msg5 db 10, " | '-' | " msg6 db 10, " +-------+ ", 0xa ; Four your convenience, here are all the lines of the happy visage ; ; +^^^^^^^+ ; (| o o |) ; | ^ | ; | '-' | ; +-------+ len1 equ $ - msg1 ; define len in RAM ; only one len statement is needed ; do not add any other len statements global _start ; The code always resides in the _start(s). section .text ; strangely, this is the executable part of ; our program rather than just plain inert text ; section .code would have made better sense? _start: ; underscore _start is required on Windows, ; but it is only start on Linux (no _ character) ; with assembler, we have to tell it every little thing ; so we have to code a few lines below with every little thing ; The system is then setup and can put our Happy Visage up
  • 2. mov rdx, ???? ; put the length into the rdx register mov rsi, ???? ; put the location of the first message into rsi mov rdi, ?????? ; put the stdout identifier into rdi mov rax, ????????? ; put the sys_write into rax to tell the ; system what you want it to do... ; ... which is the write/print something ; The call is almost always put... ; ... into the rax register. ; now we have setup everything above, ; time to put it up on the console by making the syscall syscall ; syscall to the write() function ; similar to the printf function xor edi, edi ; Clear edi to indicate successful exit = 0 mov rax, SYS_EXIT ; put the sys_exit identifier into rax syscall ; call the system to let it know you are done