From 7654da783fedf9fea622d28f3fdfc8f7b23a6045 Mon Sep 17 00:00:00 2001 From: Johannes Theiner Date: Thu, 3 Jan 2019 09:43:48 +0100 Subject: [PATCH] a5: Anpassung Offset --- .gitignore | 7 +++++++ src/c/a5/Makefile | 4 ++-- src/c/a5/addsub.asm | 4 ++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 4606bfb..006b324 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,10 @@ bin cmake-build-debug CMakeFiles +*.cmake +CMakeCache.txt +Makefile +Hardwarenahe_Programmierung.cbp +*~ +*.[oa] +src/c/a5/flagtest diff --git a/src/c/a5/Makefile b/src/c/a5/Makefile index 74ca55f..c040c74 100644 --- a/src/c/a5/Makefile +++ b/src/c/a5/Makefile @@ -1,9 +1,9 @@ # C-Quellcode kompilieren und mit ASM-Modul linken flagtest: addsub.o flagtest.o - gcc -m32 -o flagtest flagtest.o addsub.o # linken + gcc -m32 -o flagtest flagtest.o addsub.o -Wall -Wextra # linken flagtest.o: flagtest.c - gcc -m32 -c -o flagtest.o flagtest.c # compilieren + gcc -m32 -c -o flagtest.o flagtest.c -Wall -Wextra # compilieren # ASM-Modul assemblieren addsub.o: addsub.asm diff --git a/src/c/a5/addsub.asm b/src/c/a5/addsub.asm index f6a6ee3..25f0b30 100644 --- a/src/c/a5/addsub.asm +++ b/src/c/a5/addsub.asm @@ -32,11 +32,11 @@ return: ;FIXME: Hier wird an die falsche Stelle oder so geschrieben - mov ebx, [ebp+24] + mov ebx, [ebp+20] mov [ebx], edx - ;mov [ebp+24], edx;Flagregister aus edx in flags ptr aus C kopieren + ;mov [ebp+20], edx;Flagregister aus edx in flags ptr aus C kopieren ;mov word[ebp+24], 32 pop edx