-
Notifications
You must be signed in to change notification settings - Fork 50
Fixing Bugs with MARIE.js Explained
Eric Jiang edited this page Sep 10, 2016
·
3 revisions
This page talks about how to go about solving multiple important and critical issues found in MARIE.js
This bug occurs when the user tries to jump to an address beyond the address range of 0 to 4096.
For example, the following code would break the simulator, and crash the webpage.
LoadI X
X, DEC 4097
All we did was check if the values passed to PC is beyond the address range or not:
if(target == "pc"){
if(this[target] < 0 || this target >= 4096){
throw new MarieSimError("RuntimeError", ...);
}
}
from marie.js
MARIE.js Wiki | License
Copyright © 2018 Jason Nguyen, Saurabh Joshi, Eric Jiang, Felix Salim, Guido Tack, Monash University
Copyright © 2018 Jason Nguyen, Saurabh Joshi, Eric Jiang, Felix Salim, Guido Tack, Monash University
Documentation
MARIE Instructions Set with Opcode
Register Transfer Language (RTL)
More Reading
The Essentials of Computer Organization and Architecture-Chapter 4.2
Tutorials
MARIE.js Documentation