Compile assembly
nasm -f macho64 file.s && ld -macosx_version_min 10.7.0 -lSystem -o file file.o && ./file
Main compile
nasm -f macho64 ft_strlen.s && gcc main.c ft_strlen.o
Label | |
---|---|
jmp | label |
je | == |
jne | != |
jl | < |
jle | <= |
jz | ==0 |
jnz | != |
jg | > |
jge | = |
Maths | |
---|---|
add | += |
sub | -= |
inc | ++ |
dec | -- |
and | &= |
xor | ˆ= |
xor | =0 |
mul | *= |
div | /= |
Params | |||||
---|---|---|---|---|---|
RDI | RSI | RDX | RCX | R8 | R9 |