Skip to content

wh0crypt/asm-chat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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]

About

Simple Chat Service made in x86 Assembly.

Resources

License

Stars

Watchers

Forks

Releases

No releases published