flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Chewy509 07 Nov 2006, 23:24
After a lot of testing, FreeBSD uses the x86-64 SYSV ABI, with rax being the function call, and 'syscall' to invoke the call...
|
|||
![]() |
|
codsna 09 Aug 2007, 22:07
Many thanks, Chewy509
I have written a modified elf64 your code. Works fine. (FreeBSD 6.2 AMD64, fasm 32 bit elf_i386_fbsd libc) format ELF64 public main main: mov rax, 4 ; write mov rdi, 1; stdout file handle mov rsi, hello_world; pointer to string mov rdx, len ; string len syscall xor rax, rax ; sys_exit syscall hello_world db "Hello World ![]() len = $-hello_world |
|||
![]() |
|
codsna 09 Aug 2007, 22:11
with simple
fasm hello64.asm gcc hello64.o -o hello64 or.. gcc -m64 hello64.o -o hello64 easier than build (ld link) 32 bit in FreeBSD AMD64 |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.