This is a simple repo with my asm codes.
I am saving some pieces of codes to understand how its works, some programs and shellcods
I am not a nASM Guru. I am a beginner yet, so if you find mistakes, please show me that.
I am using nasm and gcc to compile my codes
nasm -f elf64 file.asm
gcc file.o -o file
echo "set dis intel" > ~/.gdbinit
gdb file -q
To see the registers use this
layout regs
###syscall numbers: /usr/src/linux/include/asm-x86_64/unistd.h
- kernel parameters:
- r9; 6th param
- r8; 5th param
- r10; 4th param
- rdx; 3rd param
- rsi; 2nd param
- rdi; 1st param
- rax; syscall_number
- syscall
###return register:
- rax; 1st
- rdx; 2nd
- r9; 6th param
- r8; 5th param
- rcx; 4th param
- rdx; 3rd param
- rsi; 2nd param
- rdi; 1st param
- call library