Files
SVM/SVM/Instructions/LOADL.cs
2017-12-17 14:16:30 +00:00

19 lines
413 B
C#

using System;
using System.Collections.Generic;
using System.Text;
namespace SVM.Instructions
{
class LOADL : LOAD
{
public override string ASM => "LOADL";
public override byte OP => 0x13;
protected override void Run(VM vm, byte reg, Location loc)
{
var data = loc.Read(vm);
vm.R[reg] = (ushort)((vm.R[reg] & 0xFF00) + data);
}
}
}