Code Monkey home page Code Monkey logo

asm_prog_ex_yasm's Introduction

Assembly Programming Exercises

A port of the assembly programming exercises of Assembly Language Adventures to Yasm on Linux by blankwall.

This repository contains exercises for the Assembly Programming course. More information could be found at www.xorpd.net

Install Instructions

git clone https://github.com/xorpd/asm_prog_ex_yasm
cd asm_prog_ex
sudo ./run_install_ubuntu
./run_test

If all works hello world should be printed and you will have a directory called assembly with a basic program in it. :) !

Assembling, Linking and running programs

Most likely that you have a x64 machine. However, this course is for running 32 bits programs. You will need some extra effort to assemble link and run 32 bits programs on your machine.

install.s currently installs two required dependencies: yasm and gcc-multilib. On ubuntu 16.04 this is done using the command:

sudo apt install gcc-multilib yasm

If you are using another Linux distro make sure to install yasm and gcc-multilib.

To assemble a program using Yasm, run:

yasm -felf myprogram.asm

This will create a "myprogram.o" file on your system. Next, we need to link the object file, to get a runnable executable file. We can use gcc to do it:

gcc myprogram.o -o myprogram -m32

The "-m32" flag means that our program is a 32 bits program. Now you should get a file "myprogram". You can run it by typing on your terminal window:

./myprogram

asm_prog_ex_yasm's People

Contributors

blankwall avatar xorpd avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.