Restructuring into multiple crates and projects
This commit is contained in:
9
hm-asm-web/demo/index.js
Normal file
9
hm-asm-web/demo/index.js
Normal file
@@ -0,0 +1,9 @@
|
||||
import * as wasm from "hm-asm-web";
|
||||
|
||||
|
||||
console.log("Welcome to hm-asm-web");
|
||||
const code = "LDA #1\nADD #3\nSTA (8)"
|
||||
console.log("Compiling:\n" + code)
|
||||
console.log(wasm.assemble(code));
|
||||
console.log("Simulating for four clock cycles:\n" + code )
|
||||
console.log(wasm.simulate(code, 4));
|
||||
Reference in New Issue
Block a user