Export cpu.cycle, #103
This commit is contained in:
parent
6f77a01b3f
commit
cbbad841b3
15
src/cpu.js
15
src/cpu.js
|
@ -813,7 +813,7 @@ if(typeof window !== "undefined")
|
|||
* execute a single instruction cycle on the cpu
|
||||
* this includes reading all prefixes and the whole instruction
|
||||
*/
|
||||
CPU.prototype.cycle = function()
|
||||
CPU.prototype.cycle_internal = function()
|
||||
{
|
||||
this.previous_ip = this.instruction_pointer;
|
||||
|
||||
|
@ -836,6 +836,19 @@ CPU.prototype.cycle = function()
|
|||
}
|
||||
};
|
||||
|
||||
/** @export */
|
||||
CPU.prototype.cycle = function()
|
||||
{
|
||||
try
|
||||
{
|
||||
this.cycle_internal();
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
this.exception_cleanup(e);
|
||||
}
|
||||
};
|
||||
|
||||
CPU.prototype.cycle_translated = function()
|
||||
{
|
||||
this.previous_ip = this.instruction_pointer;
|
||||
|
|
Loading…
Reference in a new issue