Initial commit

This commit is contained in:
Luca 2020-07-01 00:22:49 +02:00
commit 498de82785
2 changed files with 41 additions and 0 deletions

10
Makefile Normal file
View File

@ -0,0 +1,10 @@
FILE = figa
all:
as -o $(FILE).o $(FILE).s
ld -o $(FILE) $(FILE).o
debug:
as -g -o $(FILE).o $(FILE).s
ld -o $(FILE) $(FILE).o

31
figa.s Normal file
View File

@ -0,0 +1,31 @@
.section .data
schifo:
.ascii "Che schifo la figa\n"
schifo_len:
.long . - schifo
meglio:
.ascii "Meglio Linux!\n"
meglio_len:
.long . - meglio
.section .text
.global _start
_start:
movl $4, %eax
movl $1, %ebx
leal schifo, %ecx
movl schifo_len, %edx
int $0x80
movl $4, %eax
movl $1, %ebx
leal meglio, %ecx
movl meglio_len, %edx
int $0x80
movl $1, %eax
xorl %ebx, %ebx
int $0x80