Code Monkey home page Code Monkey logo

chip8assembler's People

Contributors

kosmas12 avatar

Watchers

 avatar

chip8assembler's Issues

BUG: Programm can't handle empty lines

Running Chip8Assembler on a file that contains empty lines(OR A NEWLINE AT THE END OF FILE)

[teufelchen@Squishy ~/Programming/Chip8Assembler (git)-[master] % ./Chip8Assembler example.chip8 
Welcome to Chip8Assembler!
Assembly code file: example.chip8
Succesfully opened example.chip8
Invalid instruction on line 5!
Succesfully wrote machine code to example.c.ch8. Assembly complete!

Additionally even though an error was encountered, it still writes a binary file and claims it was successful.

SUGGESTION: Add error checking

Currently, in case of any errors, the assembler only returns an error message saying there's an invalid instruction on the currently assembled line. It should be able to tell what the problem is exactly, like wrong instruction, missing commas etc.

Checklist:

  • Missing commas
  • Invalid instructions
  • (Optional) suggesting correct instruction
  • Wrong syntax (parameter order)

README insufficient

The readme does not tell how to compile & run the software.
An example program and how to assemble it would also be great.

BUG: Naming is wrong

./Chip8Assembler example.chip8
Welcome to Chip8Assembler!
Assembly code file: example.chip8
Succesfully opened example.chip8
Succesfully wrote machine code to example.c.ch8. Assembly complete!

I was naming my input file example.chip8(not sure what the intended naming is, the readme does not suggest one).
I expected an output file like rom.bin or similar. Not a weird example.c.ch8.

BUG: Assembling misses opcodes

Compiling this short sample program

CLSC
LDRB 0 0
ADDB 0 1
JUMP 0

Generates this binary:

hexdump example.c.ch8 
0000000 00 e0                                          
0000002

The expected result was:

00 e0 00 60 01 70 00 10

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.