Skip to content
mmmhariusPublic

About

My libasm

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

21 Commits

Folders and files

Repository files navigation

libasm

Reimplementation of standard libc functions in x86-64 assembly (Intel syntax, NASM).

Objective

Get familiar with assembly language by reimplementing low-level functions: string manipulation, syscalls, and error handling via errno.

Requirements

  • 64-bit code only, respect the x86-64 calling convention
  • Intel syntax (not AT&T)
  • Assembler: NASM only (.s files)
  • No inline ASM
  • -no-pie flag is forbidden
  • Proper syscall error handling + errno update (__error / __errno_location)

Implemented Functions

Function Description
ft_strlen String length
ft_strcpy String copy
ft_strcmp String comparison
ft_write write syscall
ft_read read syscall
ft_strdup String duplication (malloc call allowed)

Compilation

make        # build libasm.a
make clean  # remove object files
make fclean # remove object files and libasm.a
make re     # full rebuild
make main   # build main for test

To test:

make && gcc main.c -L. -lasm -o test && ./test

Resources

About

My libasm

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages