mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2026-04-21 21:16:51 +00:00
updated presets, changed array syntax, ice40 fpga examples
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
|
||||
var fs = require('fs');
|
||||
var asm = require('../../gen/worker/assembler.js');
|
||||
var stdinBuffer = fs.readFileSync(0);
|
||||
var code = stdinBuffer.toString();
|
||||
var asm = new asm.Assembler();
|
||||
asm.loadJSON = function(filename) {
|
||||
return JSON.parse(fs.readFileSync(filename, 'utf8'));
|
||||
};
|
||||
asm.loadInclude = function(filename) {
|
||||
filename = filename.substr(1, filename.length-2); // remove quotes
|
||||
//return fs.readFileSync(filename, 'utf8');
|
||||
};
|
||||
asm.loadModule = function(top_module) {
|
||||
//TODO
|
||||
};
|
||||
var out = asm.assembleFile(code);
|
||||
//console.log(out);
|
||||
out.output.forEach(function(x) {
|
||||
console.log(x.toString(16));
|
||||
});
|
||||
Reference in New Issue
Block a user