Skip to content

smclacke/libasm

Repository files navigation

libasm

The aim of this project is to get familiar with assembly language.

Technical considerations

  • The project is written in 64 bits ASM, compiled with NASM

  • It follows the Intel syntax

  • The following functions are rewritten in assembly:

    • ft_strlen: calculate the length of a string
    • ft_strcpy: copy a string
    • ft_strcmp: compare two strings
    • ft_write: write to a file descriptor
    • ft_read: read from a file descriptor
    • ft_strdup: duplicate a string
  • Errors during syscalls need to be checked and Errno to be set properly

Create archive file and Test

This project is designed for Linux x86_64 and uses NASM

  • Can be compiled and tested on Linux or macOS, though macOS only includes ft_strlen, ft_strcmp and ft_strcpy.

  • To run on Apple Silicon, you must use Rosetta.

  • Simply run 'make' to create the archive file (.a).

  • Run 'make test' and depending on your OS, the correct main will be used.

  • If using linux: ft_read, ft_write and ft_strdup will be included.

  • There is an additional 'main_tester' provided by someone else including extra tests

  • Run 'make test_main' to use this tester (only on Linux)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published