Skip to content

Chip8/libc8dasm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libc8dasm

Disassembler for chip-8 programs.

Chip-8 Instructions table references to:Cowgod's Chip-8 Technical Reference v1.0

Usage

Simply include the header libc8dasm.hpp.

E.G.

//File named "UFO"
std::string Prog = libc8ReadFile("UFO"); // This will read the file in binary mode and generates the HEX value string
//The Raw prog hex
std::vector<std::string> Raw = {"A2CD","6938","6A08","D9A3"}; // The first 4 Line of the UFO game

std::vector<std::string> Output;
libc8DASM(Raw,Output);

ofstream OutFile("OUT.asm");
for(auto x : Output)
	OutFile << x << std::endl; //outputs to file

Contents of OUT.asm would be:

LD I, 02CD
LD V9, 38
LD VA, 08
DRW V9, VA, 3

Releases

No releases published

Packages

No packages published

Languages