Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed typo of "only" #9

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Lecture1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,11 @@ Lets take an example how the fucntion call code looks like.
804844c: 66 90 xchg %ax,%ax
804844e: 66 90 xchg %ax,%ax
```
I have oly copied the code of main and foo fucntion here. Observe the call to the foo fucntion from main.
I have only copied the code of main and foo function here. Observe the call to the foo function from main.
1. Main seems to push nothing before the fucntion call. That means foo does not takes any arguments.
2. Call instruction will ask the CPU to save the return address(address next to instruction pointer) into the stack. This is done by the **call** intuction, so will not be visible in the code.
2. Call instruction will ask the CPU to save the return address(address next to instruction pointer) into the stack. This is done by the **call** instruction, so will not be visible in the code.
3. The first instruction of **foo** is to push **$ebp** into the stack.
4. The immidiate instruction will be to pint **$ebp** to point to **$esp**.
4. The immediate instruction will be to pint **$ebp** to point to **$esp**.
Those instruction can be divided into three parts, which are explained in the flow below.

```
Expand Down