GithubHelp home page GithubHelp logo

cywinski / x86-bmp-image-rotation Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 8 KB

Rotation of BMP file by 90 degrees implemented in C and x86-64 assembly.

Assembly 17.82% Makefile 3.36% C 78.82%
c x64-assembly hybrid-programming

x86-bmp-image-rotation's Introduction

BMP Image rotation in x86 assembly and C

Table of Contents

About

Project for ARKO (Computer Architecture) course at Warsaw University of Technology. Project is implemented in x86 Assembly 64-bit version and in C language. Its purpose is to simply rotate BMP image by 90 degrees clockwise.

Getting Started on Linux

These instructions will get you a copy of the project up and running on your local machine with Linux OS for testing purposes.

Prerequisites

  • Linux
  • NASM
  • GCC

Installing

  • Install NASM
sudo apt-get install -y nasm
  • Install gcc
sudo apt-get install gcc
  • Clone repo
git clone https://github.com/bartooo/x86-bmp-image-rotation.git

Usage

  • Open rotation64.c file
  • In main() function:
    • Set name of BMP file you want to rotate (line 207)
    pInfo = readBMP("<name-of-file>.bmp");	//  Set name of source file
    • Set name of BMP file where rotated file will be saved
    saveBMP(pInfo, "<name-of-file>.bmp", memoryOut);	// Set name of destination file
  • Save rotation64.c file
  • Go to directory of project
  • Compile code
sudo make all
  • If compilation were successful you should see
nasm -o copyLines64.o -f elf64 copyLines64.asm
gcc -c -g -O0 rotation64.c
gcc -o rotation64 rotation64.o copyLines64.o
  • Then run
./rotation64
  • File should be rotated

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.