GithubHelp home page GithubHelp logo

assembler_6502's Introduction

6502 Assembler

Intallation

Dependencies

In case rust isn't installed, it can be installed with:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Building

First clone the repo:

git clone https://github.com/Darumoso/assembler_6502 && cd assembler_6502

Then build with:

cargo build --release

Runing the parser

Once the project is succesfully builded, a binary can be found at:

cd target/release

Then make it executable

chmod +x ./assembler_6502

To run it, enter:

./assembler_6502

There will be 3 succesful outputs, and 1 error output, the error output is expected to fail

Code examples

Successfull outputs

The next are the correct inputs received by the parser

Example 1

LDX #$00
LDY #$00
firstloop:
    TXA
    STA $0200,Y
    PHA
    INX
    INY
    CPY #$10
    BNE firstloop
secondloop:
    PLA
    STA $0200,Y
    INY
    CPY #$20
    BNE secondloop

Example 2

LDX #$08
decrement:
    DEX
    STX $0200
    CPX #$03
    BNE decrement
    STX $0201
    BRK

Example 3

LDX #$01
LDA #$aa
STA $a0,X
INX
STA $a0,X

Error output

The next is the error input received by the parser

Example 1

LDY #$00
firstloop
    STA $0200,Y

Example 2

This error isn't reachable by the parser, to show it line 150 on main file must be commented and lines 168-169 must be uncommented

LDY #00
firstloop:
    STA $0200,Y

assembler_6502's People

Contributors

darumoso8 avatar

Watchers

 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.