GithubHelp home page GithubHelp logo

j6502asm's Introduction

J6502ASM - Portable Cross-Assembler for MOS Technology 6502 CPU. By Vitaly Ostrosablin 2013-2014 ([email protected]) Version 0.11b

===== Usage

You need Java Runtime Environment 1.6 to use J6502ASM. To run it from shell, execute following command:

$ java -jar J6502ASM.jar -if <input.asm>

This will translate input file into out.bin.

Command-line parameters:

-if Opens specified file for assembling. This is required parameter.

-of Outputs to specified binary file (if omitted, it will output into out.bin).

--printcode Outputs assembled code to screen.

--cutnull Strip leading null bytes from output (for use with .ORG directive).

=========== Feature set

J6502 supports all documented 6502 opcodes. By default, origin address is zero. Following features are supported:


Labels

You can define label in beginning of line of code. Labels use following syntax:

:

Label names can be used only with jump or branch instructions.


Comments

You can write comments by using ";" character. Everything following it will be stripped by preprocessor.


Different number bases

J6502ASM supports binary, octal, decimal and hexadecimal numbers. Each base has separate syntax:

%???????? - Binary number 0??? - Octal number ??? - Decimal number $?? - Hexadecimal number


Directives

.INCLUDE Preprocessor directive which includes contents of another file.

Example: .INCLUDE "include.asm"

.BYTE .BYTES Directive to declare one (or more comma-separated) bytes.

Example: .BYTE $FF,255

.WORD .WORDS Directive to declare one (or more comma-separated) 16-bit words.

Example: .WORDS $BEEF

.DB Directive to declare one or more hardcoded values. This directive writes everything in range 0-255 as bytes, and everything above as 16-bit words.

Example: .DB 65535, $FF, $BEEF, %11111111

.ORG Change origin value.

Example: .ORG $1000

j6502asm's People

Contributors

ostrosablin 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.