Please show all the steps as detail as possible.... I need help with this.... **
ID: 3886164 • Letter: P
Question
Please show all the steps as detail as possible.... I need help with this....
*****************************************************************
Need Help on C++ Programming. Can you show me and teach me how to make this programming.
*Make sure the programming is working and do not turn in a handwriting.
*Do not separate the file, use main.cpp that make me understand how to do this programming. Use "iostream"
*****************************************************************
Assembly Language Programming commands.
Pick one command and explain it.
Give a code example...
Explanation / Answer
C++ Programming ---->
main.cpp ----------------->
Output ---->
The C++ language defines several headers, which contain information that is either necessary or useful to your program.
For this program, the header <iostream> is needed.
The line using namespace std; tells the compiler to use the std namespace.
The next line is Single-line comments begin with // and stop at the end of the line.
The line int main() is the main function where program execution begins.
The next line cout << "Hello World"; causes the message "Hello World" to be displayed on the screen.
The next line return 0; terminates main( )function and causes it to return the value 0 to the calling process.
C++ uses keywords which are reserved words in C++. (if ,else, void, int)
Assembly Language Programming command ----------->MOV, POP, PUSH, CMP, ADD, SUB, RET
Code Example ------->
.LC0:
.string "Assembly Language Code Example"
main:
push rbp
mov rbp, rsp
mov esi, OFFSET FLAT:.LC0
mov edi, OFFSET FLAT:std::cout
call std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)
mov eax, 0
pop rbp
ret
__static_initialization_and_destruction_0(int, int):
push rbp
mov rbp, rsp
sub rsp, 16
mov DWORD PTR [rbp-4], edi
mov DWORD PTR [rbp-8], esi
cmp DWORD PTR [rbp-4], 1
jne .L5
cmp DWORD PTR [rbp-8], 65535
jne .L5
mov edi, OFFSET FLAT:std::__ioinit
call std::ios_base::Init::Init()
mov edx, OFFSET FLAT:__dso_handle
mov esi, OFFSET FLAT:std::__ioinit
mov edi, OFFSET FLAT:std::ios_base::Init::~Init()
call __cxa_atexit
.L5:
nop
leave
ret
_GLOBAL__sub_I_main:
push rbp
mov rbp, rsp
mov esi, 65535
mov edi, 1
call __static_initialization_and_destruction_0(int, int)
pop rbp
ret
Output ----->
Assembly Language Code Example
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.