From e8894d34d1e2b3d0e7bfd85c28db3e0c7f3733f4 Mon Sep 17 00:00:00 2001 From: Sascha Tommasone Date: Sat, 8 Jun 2024 18:09:03 +0200 Subject: [PATCH] [Assignment-5] setup task 3 (syscalling) --- .../syscalling/Makefile | 3 +++ .../syscalling/code.asm | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 Assignment 5 - Software Security - Teil 1/syscalling/Makefile create mode 100644 Assignment 5 - Software Security - Teil 1/syscalling/code.asm diff --git a/Assignment 5 - Software Security - Teil 1/syscalling/Makefile b/Assignment 5 - Software Security - Teil 1/syscalling/Makefile new file mode 100644 index 0000000..c666796 --- /dev/null +++ b/Assignment 5 - Software Security - Teil 1/syscalling/Makefile @@ -0,0 +1,3 @@ +all: + rm -f antwort + nasm -felf32 code.asm -o antwort.o && ld -m elf_i386 antwort.o -o antwort diff --git a/Assignment 5 - Software Security - Teil 1/syscalling/code.asm b/Assignment 5 - Software Security - Teil 1/syscalling/code.asm new file mode 100644 index 0000000..6152f8d --- /dev/null +++ b/Assignment 5 - Software Security - Teil 1/syscalling/code.asm @@ -0,0 +1,19 @@ +; define some macros +%define O_RDONLY 00000000o +%define O_WRONLY 00000001o +%define O_RDWR 00000002o +%define O_CREAT 00000100o +%define O_TRUNC 00001000o +%define S_IRUSR 00000400o +%define S_IWUSR 00000200o + +section .data +path: db "/home/user/nachricht", 0 +greeting: db "hidad!", 0 + +section .text +global _start +_start: + ;---------------------------------- + nop ; + ; ------------ End of file ------------