Add solutions for lab10#1
Open
andreimmihai wants to merge 6 commits into
Open
Conversation
- I defined a global variable "pos", where pos is the position of the maximum value in the array - I modified the assembly code to accept the additional argument of the get_max function for the position and update it with the index of the maximum value Signed-off-by: Andrei-Claudiu Mihai <andreiimmihai@gmail.com>
- Added the missing "mov ebp, esp" instruction to correctly set up the stack frame Signed-off-by: Andrei-Claudiu Mihai <andreiimmihai@gmail.com>
- Modified get_max to return max value and postion Signed-off-by: Andrei-Claudiu Mihai <andreiimmihai@gmail.com>
- Fix SEGAULT by preserving register around double_array call Signed-off-by: Andrei-Claudiu Mihai <andreiimmihai@gmail.com>
- Fix compilation warning by adding puts function prototype in hello.c Signed-off-by: Andrei-Claudiu Mihai <andreiimmihai@gmail.com>
- Fix export issues in a-func, b-var, c-var-2 - In a-func/hidden.c: Removed static from set() function to make it globally accessible - In b-var/plain.c: Removed static from age variable to export it - In c-var-2: 1) hidden.c: Changed hidden_value to static to limit its scope 2) ops.h: Added extern declaration for age variable 3) plain.c: Removed static from age variable to export it Signed-off-by: Andrei-Claudiu Mihai <andreiimmihai@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.