Skip to content

RobbyTSP/ASMter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ASMter - A Minimal Assembly Terminal / Shell

A lightweight, minimal, and unique terminal (shell alternative) written entirely in x86_64 Assembly (NASM) for Linux.

It interacts directly with the Linux kernel using native syscalls, bypassing high-level libraries like libc.

Features

  • Dynamic Colored Prompt: Shows username: current_directory$ using ANSI colors (extracted from stack environment variables).
  • Filesystem & File Operations:
    • pwd - Print current working directory.
    • ls & ls -la - List files (with size details using sys_newstat).
    • cd <path> - Change directory.
    • mkdir <dir> - Create folder.
    • rmdir <dir> - Delete empty folder.
    • rm <file> & rm -r <dir> - Remove file or directory.
    • touch <file> - Create an empty file.
    • cat <file> - Print file content.
    • cp <src> <dest> - Copy a file.
    • mv <src> <dest> - Move or rename a file.
  • System Commands:
    • whoami - Output current logged-in user.
    • sleep <seconds> - Delay terminal execution.
    • uptime - Read system uptime in seconds (via sys_sysinfo).
    • chmod <octal> <file> - Change file permissions.
    • kill <pid> - Send SIGTERM to a PID.
  • Unique ASM/Hardware Features:
    • cpuid - Retrieve CPU Brand information directly from processor registers.
    • matrix - Falling green binary code (digital rain) animation utilizing TSC (Time Stamp Counter) random numbers.

Project Structure

  • main.asm - The main shell orchestrator and REPL loop.
  • Makefile - Assembles and links the code using nasm and ld.
  • src/ - Separate modules for each command:
    • src/utils.asm - Assembly string helpers (strcmp, print_cstring, etc.)
    • Command implementations (src/ls.asm, src/cp.asm, src/matrix.asm, etc.)

Building and Running

Prerequisites

Ensure you have nasm (Netwide Assembler) and standard GNU binutils (ld) installed:

sudo apt install nasm build-essential

Build

Compile the codebase:

make

Run

Launch the terminal:

./terminal

Github Repository

This project is configured for https://github.com/RobbyTSP/ASMter.git.

License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.

About

ASMter is a minimal Linux shell written entirely in x86_64 Assembly (NASM) that interacts directly with the kernel using native system calls.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Contributors