Skip to content

Commit

Permalink
Basic ui.js
Browse files Browse the repository at this point in the history
  • Loading branch information
eliben committed Jul 11, 2020
1 parent 6b8bc83 commit 9a16009
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
js8080simBundle.js
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
# js-8080-sim

## Bundling for the browser

We use `browserify`; see `Makefile` for the invocation.

6 changes: 5 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
width: 240px;
}
</style>

<body>
<table>
<tr>
Expand All @@ -32,5 +31,10 @@
<th>Result</th>
</tr>
</table>


<!-- Include bundle. This exports a global symbol for accessing js8080sim -->
<script src="js8080simBundle.js"></script>
<script src="ui.js"></script>

</body>
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "js-8080-sim",
"version": "1.0.0",
"description": "8080 assembler and simulator",
"main": "src/assembler.js",
"main": "src/bundleMain.js",
"scripts": {
"test": "mocha"
},
Expand Down
6 changes: 6 additions & 0 deletions ui.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Expects the global js8080sim to be available.
let asm = new js8080sim.Assembler();

let st = document.querySelector("#status");
st.textContent = "SUCCESS";
st.style.color = "green";

0 comments on commit 9a16009

Please sign in to comment.