Skip to content

adeilsonsilva/asm_diwhy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ASM DIWHY

A bunch of assembly code with no real point. Created by @AD80.

Tools

Code style

procedure_name    <-- procedures named in snake case (lower)
CONSTANT_NAME     <-- constants are named in snake case (upper)
variableName      <-- variables are named in camel case

Assembling and Linking

The examples are created for 64 bits architectures. Feel free to search for the flags to your desired architecture in the docs above.

Compile all examples

There is a script to compile all examples in this repo to ELF x86_64

$ ./compile.sh

ELF Format

$ nasm -f elf64 <file>.asm -o <objfile>.o
$ ld -m elf_x86_64 <objfile>.o -o <exefile>.exe

ELF Format using external functions

$ nasm -f elf64 hello.asm
$ ld hello.o -dynamic-linker /lib64/ld-linux-x86-64.so.2 -lc -m elf_x86_64

PE32 Format

$ nasm -f win64 <file>.asm -o <objfile>.o
$ ld -m i386pep <objfile>.o -o <exefile>.exe

About

Some NASM code!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published