Skip to content

hail0hydra/x86_64_Assembly_practice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Assembly Practice Snippets


x86_64 Linux assembly files handwritten from scratch with caveman logic to practice fundamentals



  • this repo contains simple assembly programs that help me practice fundamentals of x86_64 Linux Assembly.

  • this will contain every kind of program handwritten by your truly in assembly.




How to run

  • First of all the question should be where to run. The register sequence I address to while writing this program is specifically followed only on 64bit Linux Architectures. The Builders of the kernels might be having their hands in this specific register addrressing but I dont know that much. Even I dont know what I just wrote here but here is the TLDR.

TLDR: Use Linux to execute these


Must haves:

  1. gcc or as : almost every linux distro comes preinstalled with them, but If you are a freak who uses arch or gnome or LFS or anything similar, make sure you install these with your respective package managers.

  2. ld: well this is a sub-pre-requisite (is that a word?) to as, but I think you get this shipped by default with the GNU compiler but I dont know. Better safe than sorry.


  • Finally the Execution (not exactly, compile it first)

  1. Compile: two ways, via gcc or as. Keep in mind as will give you and object file, gcc is one way, no checkpoints.
## Using `as`

as {filename.s} -o {objectname.o}
ld {objectname} -o {binaryname}


# example:
# as hello.s -o hello.o
# ld hello.o -o hello

#-------------------------------------------

##  Using gcc

gcc -nostdlib {filename.s} -o {binaryname} -no-pie

# example:
# gcc -nostdlib hello.s -o hello -no-pie

  1. Run it: just run it
# How

./{binaryname}


# example
# ./hello

About

x86_64 Linux assembly files handwritten from scratch with caveman logic to practice fundamentals

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published