You have to present the E2 and E3 tasks personally. E0 and E1 are evaluated automatically by the Upload System.
WARNING: This information might be out of date. This version is up-to-date for the summer term 2016.
Your task is to create a program in assembly language (x86) for computing Fibonacci number without using any other libraries. For reading a value from stdin and printing the result use “int 0x80” system call. Details are in the PDF provided.
cfibo.c -- Reference implementation in C language
cfibo_errchk.c -- Reference implementation in C language with error checking
Please upload only .s
file with assembly code.
Support information and specification (PDF)
Inline assembly at linux-insides
Create a program that:
file.txt
(in the current directory)stdout
(a line is terminated by the EOL
character)/bin/date
(using a syscall execve()
)
Implement the program using system calls only. Do not use standard C libraries – Use gcc parameters -nostdlib -nostdinc
for compilation.
Implement the task in one .c
file. You can eventually create a few other included files .h
. Upload the solution file (single .c
in a ZIP
archive) using the Upload System.
memory
keyword.
Support materials and E2 task specs (PDF)
GCC inline assembler howto (online)
Upload only changed files to the Upload System, i.e. only ec.cc
.
g++
compiler (package) installed.
qemu
emulator (package) installed.
QEMU
console. Press Ctrl+Alt
to release it.