From 2538b93e408dc1404838cfa37d7fb1a4002b89ef Mon Sep 17 00:00:00 2001 From: RaresCon Date: Sat, 29 Apr 2023 11:19:30 +0300 Subject: [PATCH] lab/functions: Fix a Makefile not working properly Fixed a Makefile in `solution`, because of a relative path. Signed-off-by: RaresCon --- .../content/apel-functii/2-test/Makefile | 2 +- .../4-5-print-string-len/Makefile | 3 -- .../4-5-print-string-len/print-string-len.asm | 30 ------------------- .../solution/3-print-string/Makefile | 2 +- .../4-print-string-len/print-string-len.asm | 4 +++ 5 files changed, 6 insertions(+), 35 deletions(-) delete mode 100644 laborator/content/apel-functii/4-5-print-string-len/Makefile delete mode 100644 laborator/content/apel-functii/4-5-print-string-len/print-string-len.asm diff --git a/laborator/content/apel-functii/2-test/Makefile b/laborator/content/apel-functii/2-test/Makefile index 35e58e79..4a662cae 100644 --- a/laborator/content/apel-functii/2-test/Makefile +++ b/laborator/content/apel-functii/2-test/Makefile @@ -1,2 +1,2 @@ PROGNAME := test -include ../../utils/Makefile.generic \ No newline at end of file +include ../../utils/Makefile.generic diff --git a/laborator/content/apel-functii/4-5-print-string-len/Makefile b/laborator/content/apel-functii/4-5-print-string-len/Makefile deleted file mode 100644 index e5ecc5d1..00000000 --- a/laborator/content/apel-functii/4-5-print-string-len/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -PROGNAME := print-string-len -include ../../utils/Makefile.generic - diff --git a/laborator/content/apel-functii/4-5-print-string-len/print-string-len.asm b/laborator/content/apel-functii/4-5-print-string-len/print-string-len.asm deleted file mode 100644 index c4cb7ad1..00000000 --- a/laborator/content/apel-functii/4-5-print-string-len/print-string-len.asm +++ /dev/null @@ -1,30 +0,0 @@ -%include "../utils/printf32.asm" - -section .data - mystring db "This is my string", 0 - -section .text - -extern puts -extern printf -global main - -main: - push ebp - mov ebp, esp - - mov eax, mystring - xor ecx, ecx -test_one_byte: - mov bl, byte [eax] - test bl, bl - je out - inc eax - inc ecx - jmp test_one_byte - -out: - PRINTF32 `[PRINTF32]: %d\n[printf]: \x0`, ecx - - leave - ret diff --git a/laborator/content/apel-functii/solution/3-print-string/Makefile b/laborator/content/apel-functii/solution/3-print-string/Makefile index 9f97329f..4a7a8f32 100644 --- a/laborator/content/apel-functii/solution/3-print-string/Makefile +++ b/laborator/content/apel-functii/solution/3-print-string/Makefile @@ -1,2 +1,2 @@ PROGNAME := print-string -include ../../utils/Makefile.generic +include ../../../utils/Makefile.generic diff --git a/laborator/content/apel-functii/solution/4-print-string-len/print-string-len.asm b/laborator/content/apel-functii/solution/4-print-string-len/print-string-len.asm index ef66015e..ee7b22c5 100644 --- a/laborator/content/apel-functii/solution/4-print-string-len/print-string-len.asm +++ b/laborator/content/apel-functii/solution/4-print-string-len/print-string-len.asm @@ -1,3 +1,5 @@ +%include "../../utils/printf32.asm" + section .data mystring db "This is my string", 0 print_format db "String length is %d", 10, 0 @@ -22,6 +24,8 @@ test_one_byte: jmp test_one_byte out: + PRINTF32 `[PRINTF32]: %d\n[printf]: \x0`, ecx + push ecx push print_format call printf