All Projects → xorpd → asm_prog_ex_yasm

xorpd / asm_prog_ex_yasm

Licence: GPL-3.0 license
Assembly Language Adventures exercises for Yasm on Linux

Programming Languages

assembly
5116 projects
shell
77523 projects

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
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].