From 0bd9f11f6fe5b7148864c8411661cc1eda0b60c1 Mon Sep 17 00:00:00 2001 From: Sweet Bread Date: Sun, 6 Nov 2022 18:55:20 +0300 Subject: [PATCH] Fixed path.filename --- examples/file/main | Bin 9240 -> 9240 bytes examples/file/makefile | 5 +---- path.o | Bin 424 -> 424 bytes src/path.asm | 4 +++- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/examples/file/main b/examples/file/main index 2b304cfb0af2ca2dff68154fd6dad6b190a88381..2ce060ebfaf30ce40be767b8b6229600c881096a 100644 GIT binary patch delta 44 zcmbQ?F~eg+ihu-X^KXU{X7AUZJQ!~{bh>iH$3;a(N5mf9TqB?$#8|U=u2MB40D&$L Ac>n+a delta 44 zcmbQ?F~eg+ihu-1^KXU{X7AUZ7;iXqx^l$FMMXwO#2#kYTqB?$#8|y~u2MB40Dhhj AF8}}l diff --git a/examples/file/makefile b/examples/file/makefile index 9221dee..1e9b309 100644 --- a/examples/file/makefile +++ b/examples/file/makefile @@ -2,10 +2,7 @@ all: main main: ../../file.o ../../std.o ../../path.o ../../string.o fasm main.asm - ld -m elf_i386 main.o ../../file.o ../../std.o ../../path.o ../../string.o --output main - -# ../../string.o: -# make -C ../.. string.o + ld -m elf_i386 main.o ../../file.o ../../std.o ../../path.o --output main ../../std.o: make -C ../.. std.o diff --git a/path.o b/path.o index aa3d9bfb6bf74ea556fdd15a3e0cc45d0c1cbbf4..29a9ece08b16dda26e0dcf1f1d1168e5323a9fea 100644 GIT binary patch delta 40 wcmZ3%yn=axj|6A)Z-x?P@7JF^7;iXqx^l$FMMXwO#2%iQvV+lJvMgga05%Q}1poj5 delta 40 wcmZ3%yn=axj|4~aZ-x?P@7JFgZ#ZU0)MMg)&9%h)BvV&27vMgga05n<-y8r+H diff --git a/src/path.asm b/src/path.asm index c00fb2b..4ef0550 100644 --- a/src/path.asm +++ b/src/path.asm @@ -17,10 +17,12 @@ filename: cmp [ebx+eax], byte '/' je .break cmp ebx, 0 - je .break + je @f dec ebx jmp .loop + @@: + dec eax .break: add eax, ebx inc eax