Coder Social home page Coder Social logo

simple-assembler's Introduction

Simple Assembler License

A personal project via which I aim to learn a bit about assembly by programming an interpretive implementation of select opcode mnemonics.

Implemented Instructions

  • MOV x, y Move the contents of register y into register x (x = y)

  • INC x Increment register x by one (x++)

  • DEC x Decrement register x by one (x--)

  • ADD x, y Add the contents of register y to x (x += y)

  • SUB x, y Subtract the contents of register y from x (x -= y)

  • MUL x, y Multiply the contents of register x and y, store result in x (x *= y)

  • DIV x, y Integer divide the contents of register x by y, store result in x (x /= y)

  • JNZ x, y Jump y instructions if register x is Not Zero

  • ; Comment, ignored by the interpreter

Planned Instructions

  • label: Define a position within the code reachable by the label identifier

  • call lbl Procedure call to the subroutine identified by the label lbl

  • ret Return to the instruction that called the current subroutine

  • CMP x, y Compare the contents of registers x and y (result used by other instructions)

  • JNE lbl Jump to the label lbl if the values of the previous CMP were Not Equal

  • JE lbl Jump to the label lbl if the values of the previous CMP were Equal

  • JGE lbl Jump to the label lbl if register x was Greater than or Equal to y in the previous CMP

  • JG lbl Jump to the label lbl if register x was Greater than y in the previous CMP

  • JLE lbl Jump to the label lbl if register x was Lesser than or Equal to y in the previous CMP

  • JL lbl Jump to the label lbl if register x was Lesser than y in the previous CMP

Further Instructions

Reference: Intel 80x86 ASM Opcodes

simple-assembler's People

Contributors

chris-1101 avatar

Stargazers

eXe avatar Nikita Selyavin avatar Saptak Bhoumik avatar tanishmohanta avatar DQ avatar MrMidnight avatar final avatar  avatar Hasan avatar Pooia avatar Nicolas Danelon avatar Cayden avatar Marcel Schaible avatar

Watchers

James Cloos avatar

simple-assembler's Issues

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.