Skip to content

libasm - is a bunch of functions from standard library in C written in Assembly x64/x86 language.

Notifications You must be signed in to change notification settings

georghegel/libasm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libasm

Kendrick Lamar

libasm is a project to implement standard library functions in C on Assembly x64/x86. As for may 2024 I've implemented only these functions:
strlen, strcpy, strcmp, strdup, read, write

Contents

Installation

MacOS

make

Testing

make test

Use as library

Before including this dynamic lib to your C file, please make sure that in Makefile you added new target for compilation.

#include "libasm.h"

int main(){
    char *str = "Hello!";
    size_t sz = ft_strlen(str);
    printf("%zu\n", sz);
    return 0;
}

Linux

Not working now. Because Linux-typed OS has another asm syntax. Will add asm later for Linux
Everything is the same as in MacOS, because Makefile does it for you.

make

Testing on Linux

make test

Use as library on Linux

Before including this dynamic lib to your C file, please make sure that in Makefile you added new target for compilation.

#include "libasm.h"

int main(){
    char *str = "Hello!";
    size_t sz = ft_strlen(str);
    printf("%zu\n", sz);
    return 0;
}

Docker

Not working now. Because Linux-typed OS has another asm syntax. Will add asm later for Linux
By default container's image is ubuntu:latest

make containerized

Introduction to Assembly x64/x86

Sections

Registers

Instructions

Opcodes

nasm

About

libasm - is a bunch of functions from standard library in C written in Assembly x64/x86 language.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published