public void TestGetSubnetMask() { var ip = Addressing.GetLocalIP(); var mask = Addressing.GetSubnetMask(ip); var amountHosts = Addressing.GetAmountOfHosts(mask); var maskNum = Addressing.ScanNetwork(ip, mask); }
/// <summary> /// Operandを生成する際に呼び出します /// </summary> /// <param name="a"></param> /// <param name="addr"></param> /// <param name="c"></param> /// <param name="bytes"></param> public Operand(Addressing a, uint addr, int c, int bytes) { this.AddressingMode = a; this.Addr = addr; this.Cycles = c; this.ArrangeBytes = bytes; }
protected override bool IsSupportAddressing(Addressing addressing) { return (addressing == Addressing.eax || addressing == Addressing.ebx || addressing == Addressing.ecx || addressing == Addressing.edx || addressing == Addressing.ebp || addressing == Addressing.esp || addressing == Addressing.esi || addressing == Addressing.edi || addressing == Addressing.ax || addressing == Addressing.bx || addressing == Addressing.cx || addressing == Addressing.dx || addressing == Addressing.ah || addressing == Addressing.bh || addressing == Addressing.ch || addressing == Addressing.dh || addressing == Addressing.al || addressing == Addressing.bl || addressing == Addressing.cl || addressing == Addressing.dl || addressing == Addressing.bp || addressing == Addressing.sp || addressing == Addressing.si || addressing == Addressing.di || addressing == Addressing.cs || addressing == Addressing.ds || addressing == Addressing.es || addressing == Addressing.fs || addressing == Addressing.ss || addressing == Addressing.imm || addressing == Addressing.mem); }
public static I ForMicroservice <I>(ServicePartitionKey partitionKey = null) where I : class, IService { Debug.Assert( typeof(I).Namespace.Contains(Constant.Manager), $"Invalid microservice call. Use only the {Constant.Manager} interface to access a microservice."); return(ForService <I>(defaultProxyFactory, Addressing.Microservice <I>(), partitionKey)); }
private void _ADDR_REL_1() { m_address = m_PC; byte value = getNextMemByte(); if (value >= b10000000) { m_address -= (byte)(b11111111 - value); } else { m_address += value; m_address++; // compensate byte with relative address } if ((m_PC & 0xFF00) == (m_address & 0xFF00)) { m_State = CPUState.operation; // addressing finished -> execute operation } else { m_MaxCycles++; // add 1 cycle when page boundary is crossed m_oc.executeAddressing = _ADDR_REL_2; } #if CPU_TRACE m_sbDebug.AppendFormat("${0:X4}", m_address); #endif m_addr = Addressing.relative; }
public static Address Map(Addressing address) { return(new Address() { City = address.Address2, }); }
private void _ADDR_ACC() { #if CPU_TRACE m_sbDebug.Append("A"); #endif m_addr = Addressing.accumulator; m_State = CPUState.operation; // addressing finished -> execute operation }
private void _ADDR_IMM() { m_OperandValue = getNextMemByte(); #if CPU_TRACE m_sbDebug.AppendFormat("#${0:X2}", m_OperandValue); #endif m_addr = Addressing.immidiate; m_State = CPUState.operation; // addressing finished -> execute operation }
private void _ADDR_IND_1() { m_address = getNextMemWord(); #if CPU_TRACE m_sbDebug.AppendFormat("(${0:X4})", m_address); #endif m_addr = Addressing.indirect; m_oc.executeAddressing = _ADDR_IND_2; }
public static I ForComponent <I>(ServiceProxyFactory serviceProxyFactory, StatefulService caller, ServicePartitionKey partitionKey = null) where I : class, IService { if (serviceProxyFactory == null) { throw new ArgumentNullException(nameof(serviceProxyFactory), "Invalid component call. Must supply service proxy factory."); } Debug.Assert(caller != null, "Invalid component call. Must supply stateful service caller."); return(ForService <I>(serviceProxyFactory, Addressing.Component <I>(caller), partitionKey)); }
public void RegisterUser(PizzaBoxContext PizzaBox, Customer customer, Addressing addressing) { using (var unitofWork = new PizzaBox.Storing.UnitofWork(PizzaBox)) { unitofWork.Address.Add(addressing); unitofWork.Customer.Add(customer); PizzaBox.SaveChanges(); } }
public OpCode(byte code, Instruction instruction, Addressing addressing, FetchByte fetchBytes, int cycles, CycleOption option) { this.Code = code; this.Inst = instruction; this.AddressingMode = addressing; this.FetchBytes = fetchBytes; this.Cycles = cycles; this.Option = option; }
public void SendActivationMail(string userId, string displayName, string email, string activationCode, string websiteUrl) { var mail = new Mail(new MailSender(), new MailSettings(_configuration)); mail.Send(Addressing.Create(email, displayName), "Activation", new { Name = displayName, Url = $"{websiteUrl}/User/Activate#{userId}/{activationCode}" }); }
private void _ADDR_ZPY_1() { m_address = getNextMemByte(); #if CPU_TRACE byte b = (byte)m_address; m_sbDebug.AppendFormat("${0:X2},Y", b); #endif m_addr = Addressing.zeropageY; m_oc.executeAddressing = _ADDR_ZPY_2; }
private void _ADDR_ZP() { m_address = getNextMemByte(); #if CPU_TRACE byte b = (byte)m_address; m_sbDebug.AppendFormat("${0:X2}", b); #endif m_addr = Addressing.zeropage; m_State = CPUState.operation; // addressing finished -> execute operation }
private void _ADDR_INDY_1() { m_address = getNextMemByte(); #if CPU_TRACE byte b = (byte)m_address; m_sbDebug.AppendFormat("(${0:X2}),Y", b); #endif m_addr = Addressing.indirectY; m_oc.executeAddressing = _ADDR_INDY_2; }
private void _ADDR_ABS() { m_address = getNextMemWord(); #if CPU_TRACE m_sbDebug.AppendFormat("${0:X4}", m_address); #endif m_addr = Addressing.absolute; m_State = CPUState.operation; // addressing finished -> execute operation }
public void SendForgotPasswordEmail(string userId, string displayName, string email, string confirmationCode, string websiteUrl) { var mail = new Mail(new MailSender(), new MailSettings(_configuration)); mail.Send(Addressing.Create(email, displayName), "ResetPassword", new { Name = displayName, Url = $"{websiteUrl}/User/ResetPassword#{userId}/{confirmationCode}" }); }
public Int16 ReadWord(Addressing addressing) { int addr = -GetRegisterAddr(addressing); if (addr >= MemSize) { return(0); } return((Int16)((Mem[addr + 1] << 8) | Mem[addr])); }
public Int32 ReadInt(Addressing addressing) { int addr = -GetRegisterAddr(addressing); if (addr >= MemSize) { return(0); } return((Int32)((Mem[addr + 3] << 24) | (Mem[addr + 2] << 16) | (Mem[addr + 1] << 8) | Mem[addr])); }
public void WriteByte(Addressing addressing, byte b) { int addr = -GetRegisterAddr(addressing); if (addr >= MemSize) { return; } Mem[addr] = b; }
public byte ReadByte(Addressing addressing) { int addr = -GetRegisterAddr(addressing); if (addr >= MemSize) { return(0); } return(Mem[addr]); }
public void TestGetLocalIP() { try { var ip = Addressing.GetLocalIP(); } catch (Exception) { Assert.Fail(); } }
public int GetRegisterWidth(Addressing addressing) { for (int i = 0; i < CAddressing.Length; i++) { if (CAddressing[i].addressing == addressing) { return(CAddressing[i].width); } } return(0); }
public void WriteWord(Addressing addressing, Int16 w) { int addr = -GetRegisterAddr(addressing); if (addr >= MemSize) { return; } Mem[addr] = (byte)w; Mem[addr + 1] = (byte)(w >> 8); }
public int GetRegisterAddr(Addressing addressing) { for (int i = 0; i < CAddressingAddr.Length; i++) { if (CAddressingAddr[i].addressing == addressing) { return(-CAddressingAddr[i].addr); } } return(-1); }
public void Clear() { preinst = Inst.none; inst = Inst.none; Register = null; SegReg = Addressing.none; BaseReg = Addressing.none; IndexReg = Addressing.none; Imm = 0; ParamCount = 0; }
public static I ForMicroservice <I>(ServiceProxyFactory serviceProxyFactory, ServicePartitionKey partitionKey = null) where I : class, IService { if (serviceProxyFactory == null) { throw new ArgumentNullException(nameof(serviceProxyFactory), "Invalid microservice call. Must supply service proxy factory."); } Debug.Assert( typeof(I).Namespace.Contains(Constant.Manager), $"Invalid microservice call. Use only the {Constant.Manager} interface to access a microservice."); return(ForService <I>(serviceProxyFactory, Addressing.Microservice <I>(), partitionKey)); }
public string AddressingToString(Addressing addressing) { for (int i = 0; i < CAddressing.Length; i++) { if (CAddressing[i].addressing == addressing) { return(CAddressing[i].name); } } return(null); }
public bool IsSegRegister(Addressing addressing) { if (addressing == Addressing.cs || addressing == Addressing.ds || addressing == Addressing.es || addressing == Addressing.fs || addressing == Addressing.ss) { return(true); } else { return(false); } }