Export cpu.cycle, #103

This commit is contained in:
copy 2016-07-26 21:42:42 +02:00
parent 6f77a01b3f
commit cbbad841b3

View file

@ -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;