Skip to content

Latest commit

 

History

History
21 lines (15 loc) · 1.74 KB

README.md

File metadata and controls

21 lines (15 loc) · 1.74 KB

Noctal - NASM Helper Library

Noctal is a helper library, developed by me, for beginners trying to program in assembly using the NASM assembler and Linux syscalls (64bit)

This is specially useful to those who have been programming in some high level language before and want to get to know the computers at a deeper level. This gives them a friendly handshake with the language one step higher than the binary itself.

How to assemble using NASM

To use Noctal in your code, you will have to download the std_notcal.asm and std_noctalm.asm files into your wokring directory as well. Then include std_noctal.asm in your main.asm. Then, considering, your asm file name is main, you can use the following commands from your working directory:

nasm -felf64 main.asm -o main && ld main -o a.out && ./a.out

Functions

Currently, it has the following procedures/functions/subroutines/labels/everything_else.

Functions Inputs Outputs Description
std__strlen The string (RSI) The length (RDX) Finds the length of a null-terminated string
std__cout The string (RSI) void Prints a null-terminated string to the console
std__to_string Number (RAX),
Output string (RSI)
Output string (RSI),
The length (RDX)
Converts an integer into a string
std__printa The number (RAX) void Prints an integer to the console
std__sort The pointer to the array (RSI),
Size of the array (RDX)
Sorted array (RSI) Sorts a 64-bit integer array using the selection sort algorithm