fix support for requiring the cpu as a node.js module and a problem in the javascript in example page
This commit is contained in:
parent
23b595ba74
commit
fddcbeb865
5
cpu.js
5
cpu.js
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2011, Preston Skupinski <skupinsk@cse.msu.edu>
|
* Copyright (c) 2011-2012, Preston Skupinski <skupinsk@cse.msu.edu>
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for any
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
@ -3937,4 +3937,5 @@ window.CPU_65816 = function() {
|
||||||
this.cycle_count = 0;
|
this.cycle_count = 0;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
})(this);
|
})((typeof module !== 'undefined' &&
|
||||||
|
typeof module.exports !== 'undefined')?module.exports:this);
|
||||||
|
|
|
@ -25,7 +25,7 @@ $(document).ready(function() {
|
||||||
});
|
});
|
||||||
$("#load").click(function() {
|
$("#load").click(function() {
|
||||||
cpu.reset();
|
cpu.reset();
|
||||||
cpu.load_program($("#hex").val());
|
cpu.load_binary($("#hex").val());
|
||||||
updateFields();
|
updateFields();
|
||||||
can_step = true;
|
can_step = true;
|
||||||
$("#step").removeAttr("disabled");
|
$("#step").removeAttr("disabled");
|
||||||
|
|
Loading…
Reference in New Issue