diff --git a/cpu.js b/cpu.js index 7022b30..731c217 100755 --- a/cpu.js +++ b/cpu.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, Preston Skupinski + * Copyright (c) 2011-2012, Preston Skupinski * * Permission to use, copy, modify, and/or distribute this software for any * 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); +})((typeof module !== 'undefined' && + typeof module.exports !== 'undefined')?module.exports:this); diff --git a/index.html b/index.html index b4012d3..3652545 100644 --- a/index.html +++ b/index.html @@ -25,7 +25,7 @@ $(document).ready(function() { }); $("#load").click(function() { cpu.reset(); - cpu.load_program($("#hex").val()); + cpu.load_binary($("#hex").val()); updateFields(); can_step = true; $("#step").removeAttr("disabled");