From 1508111b8db484eeb6779400ce5d062abf408072 Mon Sep 17 00:00:00 2001 From: Arthur Paulino Date: Fri, 29 Dec 2017 11:26:06 -0300 Subject: [PATCH] Updated Basic Assembly tutorial (markdown) --- Basic-Assembly-tutorial.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Basic-Assembly-tutorial.md b/Basic-Assembly-tutorial.md index 2f5ff9d..f09572c 100644 --- a/Basic-Assembly-tutorial.md +++ b/Basic-Assembly-tutorial.md @@ -407,7 +407,7 @@ int doSomeMath(int a, int b){ //Function declaration ``` Let's go through this example line by line. The first line is the function declaration, we are telling the C compiler that the following block of code is our function called *doSomeMath*, and that it accepts two **arguments** of *int* type: a and b. We are also telling the compiler that the **return type** of the *doSomeMath* function is *int*. -In the second line (`int result = 0;`) we are declaring one **local variable** of type *int* called *result*. The local variables are stored in memory, so the compiler needs to know how much space to reserve for each variable. +In the second line (`int result;`) we are declaring one **local variable** of type *int* called *result*. The local variables are stored in memory, so the compiler needs to know how much space to reserve for each variable. The following 4 lines are simple statements that can each be translated into single instructions. The last statement (`return result`) indicates that we want to **return** to the callee (The code that *called* this function) the value inside the *result* local variable.