You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ChocoPy/web/venus.html

12 lines
16 KiB

4 years ago
<!DOCTYPE html><html><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>venus</title><link rel="stylesheet" type="text/css" href="css/venus.css"></head><body><div class="tabs is-boxed is-centered"><ul><li id="editor-tab" class="is-active"><a onclick="driver.openEditor()">Editor</a></li><li id="simulator-tab"><a onclick="codeMirror.save(); driver.openSimulator()">Simulator</a></li></ul></div><div class="container is-fluid"><section class="section" id="editor-tab-view"><div class="field"><div class="control"><textarea class="textarea is-primary is-medium" placeholder="type RISC-V assembly here" id="asm-editor"></textarea></div></div></section></div><section class="section" id="simulator-tab-view"><div class="tile is-ancestor"><div class="tile is-vertical is-8"><div class="tile"><div class="tile is-parent"><article class="tile is-child is-primary" id="simulator-controls-container"><div class="field is-grouped is-grouped-centered"><div class="control"><button id="simulator-run" class="button is-primary" onclick="driver.run()">Run</button></div><div class="control"><button id="simulator-step" class="button" onclick="driver.step()">Step</button></div><div class="control"><button id="simulator-undo" class="button" onclick="driver.undo()">Prev</button></div><div class="control"><button id="simulator-reset" class="button" onclick="driver.reset()">Reset</button></div><div class="control"><button id="simulator-dump" class="button" onclick="driver.dump()">Dump</button></div></div></article></div></div><div class="tile"><div class="tile is-parent"><article class="tile is-child is-primary" id="program-listing-container"><table id="program-listing" class="table"><colgroup><col id="mc-column"><col id="bc-column"><col id="oc-column"></colgroup><thead><tr><th>Machine Code</th><th>Basic Code</th><th>Original Code</th></tr></thead><tbody id="program-listing-body"></tbody></table></article></div></div><div class="tile is-parent"><article class="tile is-child"><textarea id="console-output" class="textarea stdout" placeholder="&lt;output will appear here&gt;" readonly></textarea></article></div></div><div class="tile is-ancestor"><div class="tile is-vertical"><div class="tile is-parent"><article class="tile is-child" id="sidebar-listings-container"><nav class="panel"><p class="panel-tabs"><a id="register-tab" class="is-active" onclick="driver.openRegisterTab()">Registers</a> <a id="memory-tab" onclick="driver.openMemoryTab()">Memory</a></p><div id="register-tab-view"><div id="reg-0" class="panel-block"><div class="field is-horizontal"><div class="field-label"><label class="label is-small" for="reg-0-val">zero</label></div><div class="field-body is-expanded"><input id="reg-0-val" class="input is-small" onblur="driver.saveRegister(this, 0)" spellcheck="false"></div></div></div><div id="reg-1" class="panel-block"><div class="field is-horizontal"><div class="field-label"><label class="label is-small" for="reg-1-val">ra (x1)</label></div><div class="field-body is-expanded"><input id="reg-1-val" class="input is-small" onblur="driver.saveRegister(this, 1)" spellcheck="false"></div></div></div><div id="reg-2" class="panel-block"><div class="field is-horizontal"><div class="field-label"><label class="label is-small" for="reg-2-val">sp (x2)</label></div><div class="field-body is-expanded"><input id="reg-2-val" class="input is-small" onblur="driver.saveRegister(this, 2)" spellcheck="false"></div></div></div><div id="reg-3" class="panel-block"><div class="field is-horizontal"><div class="field-label"><label class="label is-small" for="reg-3-val">gp (x3)</label></div><div class="field-body is-expanded"><input id="reg-3-val" class="input is-small" onblur="driver.saveRegister(this, 3)" spellcheck="false"></div></div></div><div id="reg-4" class="panel-block"><div class="field is-horizontal"><div class="field-label"><label class="label is-small" for="reg-4-val">tp (x4)</label></div><div class="field-body is-expanded"><input id="reg-4-val" class="input is-sm
var editor = document.getElementById("asm-editor");
var codeMirror = CodeMirror.fromTextArea(editor,
{
lineNumbers: true,
mode: "riscv",
indentUnit: 4,
autofocus: true,
lint: true
}
);
codeMirror.setSize("100%", "88vh");</script></body></html>