2023-01-26 15:16:49 -06:00
|
|
|
import { createRoot } from 'react-dom/client'
|
|
|
|
|
import React from "react";
|
|
|
|
|
import SnippetEmulator from "./snippet_emulator";
|
|
|
|
|
import init, { WasmCPU, assemble_snippet } from '../pkg/vweb.js'
|
|
|
|
|
|
|
|
|
|
init().then(async () => {
|
|
|
|
|
createRoot(document.getElementsByClassName('react-root')[0])
|
2023-01-26 22:50:24 -06:00
|
|
|
.render(
|
|
|
|
|
<SnippetEmulator>
|
|
|
|
|
{`.org 0x400
|
|
|
|
|
push 2
|
|
|
|
|
add 3
|
|
|
|
|
mul 4
|
|
|
|
|
hlt`}
|
|
|
|
|
</SnippetEmulator>
|
|
|
|
|
)
|
2023-01-26 15:16:49 -06:00
|
|
|
})
|