Ioannis Chatziantoniou csd5193
(a) The sum from 11 to 1000 is 500445 						
(b) H antigrafi kai h symplirwsi sxoliwn egine sto arxeio x86asm_comments.s	
(c) gdb trexei kanonika to ektelesimo kai emfanizetai oti kai sto (a) 		
(d) O arithmos entolwn stin main einai 19 . 					
Afairoyme tin duo dieuthinsis . Tin arxi tis main (0x8049162) 		
kai to telos tis poy kanei return (0x804919b)				
804919b-8049162=57  +1 logw tis main ara 58 Bytes			
To breakpoint to bazw me offset 27 (line 33) (stin prwti entoli stin L2) 	
(e) p(int)S       -> Output: $1=500445 						
p(int*) &S    -> Output: $2=(int*)0x804c01c 				
p(char*) &Msg -> Output: $3=0x804c020 "The sum from 11 to %d is %d\n"	
To programma ektypwnei : The sum from 11 to 1000 is 99			
(a) The sum from 11 to 1000 is 500445						
(b) O arithmos entolwn stin main einai 28					
(c) Compile to sum.c me arguments kai ektipwnetai oti kai sto (a)		
(d) O arithmos entolwn einai 29 kai o arithmos twn Byte einai			
0x80490b1-0x8049050 = 97 +1 logw tis main ara 98 Bytes			
To breakpoints to bazw se offset = 13 (line 15) ekei opoy teleiwnei		
h while tis main								
(e) p Sum  -> Output: $1= 500445						
p &Sum -> Output: $2= (int*)0x804c024 < Sum >				
p n    -> Output: $3= 10							
p &n   -> Output: $4= (int*)0x804c01c < n >					
To programma ksana typwnei : The sum from 11 to 1000 is 500445		
(f) The sum from 11 to 1000 is 495450						
(a) to programma typwnei : The sum from 11 to 1000 is 500445			
(b) o arithmos entolwn tis main sto .s arxeio einai 25				
(c) to programma ektypwnei : The sum from 11 to 1000 is 500445			
You can make the repo private and add TAs as members by hand or using the private.py script
- Go to Project Settings -> General
- Visibility
- Change Project Visibility to Private
Also add the TA in your project
- Go to ProjectSettings -> Members
- Add Iacovos Kolokasis as a Developer
The private.py script is written in Python 3. To run private.py script, please have Python 3.4 or higher, Git 1.8 or higher and python-gitlab installed.
- Install gitlab lib
pip3 install --upgrade python-gitlab --user
- Run the script
python3 private.py -t <personal token> -p <project_ id>
- You should submit the source files of each assignment. Do not submit the object or executable file
- Commit all files (not executables or object files!)
git add file1.c file2.c file3.c
git commit -m "Commit message"
git push