Git Product home page Git Product logo

asm-chat's Introduction

asm-chat - Simple Chat Service made in x86 Assembly

This project has been made with the sole purpose of teaching the fundamentals of POSIX system calls from a low-level perspective. It also aims to provide a comparison of these calls compared with their counterparts in a medium/high-level language such as C.

The project covers a range of POSIX system calls, providing insights into their usage and behavior at the lowest level of abstraction. By comparing these implementations with their counterparts in C, the project offers a comprehensive understanding of how system calls function across different levels of abstraction.

The main idea behind this project was planned with the intention of publication in the Paged Out! technical magazine. It is designed to appeal to readers interested in systems programming, low-level development, and understanding the inner workings of operating systems.

Compilation

In order to compile and execute this project, you need to have the nasm assembler installed. We will cover 2 compiling options:

Compile manually

  1. Assemble the program file: Use NASM (Netwide Assembler) to convert the assembly code into an object file. Depending on your system and desired output format, you might need to specify the format. Use nasm -h for checking available formats:
mkdir -p build/{bin,obj}  # Create the directories
nasm -f <format> ./src/chat.asm -o ./build/obj/asm-chat.o
  1. Link the object file to create an executable: Use the linker (typically ld on Unix-like systems) to link the object file and produce the final executable:
ld ./build/obj/asm-chat.o -o ./build/bin/asm-chat
  1. Run the executable:
./build/bin/asm-chat

Compile with CMake

  1. Build the project: Use Make to build the project automatically:
make build
  1. Run the executable:
make runonly

Or

./build/bin/asm-chat

I don't want to compile it

Alternatively, you can download the compiled binary directly from Releases.

Sources

[1] x86 Assembly/Interfacing with Linux - Wikibooks. [Consulted on June 2, 2024]
[2] syscalls(2) [posix man page] - unix.com. [Consulted on June 2, 2024]
[3] NASM - The Netwide Assembler v.2.16.03. [Consulted on June 2, 2024]
[4] CMake NASM Test - Andy Stanton. [Consulted on June 2, 2024]

asm-chat's People

Contributors

wh0crypt avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.