Init project
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,28 @@
|
||||
format ELF
|
||||
public _start
|
||||
|
||||
extrn network.IP_to_str
|
||||
extrn network.get_ip
|
||||
extrn dnstoys.myip
|
||||
extrn print.str
|
||||
extrn print.nl
|
||||
extrn exit
|
||||
|
||||
|
||||
section '.strtab'
|
||||
hostname db "google.com", 0
|
||||
|
||||
|
||||
section '.text' executable
|
||||
_start:
|
||||
call dnstoys.myip
|
||||
call print.str
|
||||
call print.nl
|
||||
|
||||
push hostname
|
||||
call network.get_ip
|
||||
call network.IP_to_str
|
||||
call print.str
|
||||
call print.nl
|
||||
|
||||
call exit
|
||||
Binary file not shown.
@@ -0,0 +1,24 @@
|
||||
all: main
|
||||
|
||||
main: ../../std.o ../../string.o ../../network.o ../../dns.o ../../dnstoys.o
|
||||
fasm main.asm
|
||||
ld -m elf_i386 main.o ../../std.o ../../string.o ../../network.o ../../dns.o ../../dnstoys.o --output main
|
||||
|
||||
../../std.o:
|
||||
make -C ../.. std.o
|
||||
|
||||
../../string.o:
|
||||
make -C ../.. string.o
|
||||
|
||||
../../network.o:
|
||||
make -C ../.. network.o
|
||||
|
||||
../../dns.o:
|
||||
make -C ../.. dns.o
|
||||
|
||||
../../dnstoys.o:
|
||||
make -C ../.. dnstoys.o
|
||||
|
||||
clear:
|
||||
rm main.o main
|
||||
|
||||
Reference in New Issue
Block a user