Archived
1
0

Init project

This commit is contained in:
Sweet Bread
2022-11-06 13:51:51 +03:00
commit c163efd83d
32 changed files with 1110 additions and 0 deletions
Binary file not shown.
+39
View File
@@ -0,0 +1,39 @@
format ELF
public _start
extrn file.open
extrn file.content
extrn file.close
extrn print.str
extrn print.nl
extrn exit
section '.strtab'
filename db "/home/sweetbread/headers", 0
section '.bss' writeable
file_ rd 1
section '.text' executable
_start:
push filename
call file.open
pop eax
mov [file_], eax
push dword [file_]
call print.str
call print.nl
call print.nl
push dword [file_]
call file.content
call print.str
push dword [file_]
call file.close
call exit
Binary file not shown.
+24
View File
@@ -0,0 +1,24 @@
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
../../std.o:
make -C ../.. std.o
../../file.o:
make -C ../.. file.o
../../path.o:
make -C ../.. path.o
../../string.o:
make -C ../.. string.o
clear:
rm main.o main