Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
nuts7 authored Jul 13, 2020
1 parent 1752655 commit 871b17c
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
Binary file added sys_uname
Binary file not shown.
42 changes: 42 additions & 0 deletions sys_uname.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
BITS 64
%define BUFFER 256

global _start

section .rodata

linefeed db 0xA
linefeed_len equ $-linefeed

section .bss

uname resb BUFFER

section .text

_start:
mov rax, 63
mov rdi, uname
syscall
jmp _print_uname

_print_uname:
mov rax, 0x1
mov rdi, 0x1
mov rsi, uname
mov rdx, BUFFER
syscall
jmp _linefeed

_linefeed:
mov rax, 0x1
mov rdi, 0x1
mov rsi, linefeed
mov rdx, linefeed_len
syscall
jmp _exit

_exit:
mov rax, 0x3C
mov rdi, 0
syscall
Binary file added sys_uname.o
Binary file not shown.

0 comments on commit 871b17c

Please sign in to comment.