Hello world/Newbie: Difference between revisions

→‎NASM: Added void linux info + PIC Libc
(add BQN)
(→‎NASM: Added void linux info + PIC Libc)
Line 2,657:
Arch Linux: $ sudo pacman -S nasm
or : $ sudo pamac install nasm
Void Linux: xbps-install -Rs nasm
Other Distros: Same deal, use your Distros package manager.
Windows: [https://www.nasm.us/pub/nasm/releasebuilds/2.15.05/win64/]
Line 2,686 ⟶ 2,687:
Again, Choice of linker is entirely upto you. <br>
Using NASM on Linux.
libc PIE example..
<lang asm>
extern printf
extern exit
 
section .rodata
msg db "Goodbye, World!",10,0
section .text
global main
 
main:
lea rdi, msg
call [rel printf wrt ..got]
pop rbp
call [rel exit wrt ..got]
</lang>
Using Linux syscalls..
<lang asm>
; ------------------------------------------------------------------------------
Line 2,712 ⟶ 2,730:
syscall
</lang>
 
===Editors and IDEs===
====Linux====