Skip to content

blakkhatt/AssemblyExamples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Assembly Language Examples

A collection of assembly language programs for x86_64 architecture.

Programs

1. Hello World (hello.asm)

Basic program that prints "Hello, World!" to stdout.

Build:

nasm -f elf64 hello.asm
ld hello.o -o hello
./hello

2. Mandelbrot Set (mandelbrot.asm and mandelbrot_win.asm)

Generates an ASCII art representation of the Mandelbrot fractal set.

Features:

  • Computes Mandelbrot set iterations for each pixel
  • Maps iterations to ASCII characters for visualization
  • Outputs 80x24 character grid
  • Linux version: mandelbrot.asm
  • Windows version: mandelbrot_win.asm

Build Linux:

nasm -f elf64 mandelbrot.asm
ld mandelbrot.o -o mandelbrot
./mandelbrot

Build Windows:

nasm -f win64 mandelbrot_win.asm
gcc mandelbrot_win.obj -o mandelbrot.exe
mandelbrot.exe

Algorithm:

  • Maps screen coordinates to complex plane
  • Iterates z = z² + c until |z| > 2 or max iterations
  • Uses SSE instructions for floating-point calculations

Requirements

  • NASM assembler
  • Linux with x86_64 architecture
  • GNU ld linker

Running on Windows

For Windows, you can use WSL or cross-compilation tools.

Learning Resources

  • x86_64 Assembly Programming
  • System calls reference
  • Floating-point operations

Disclaimer

These are educational examples. Assembly programming requires careful attention to low-level details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published