Loads a 16 bit value from a memory address
    If 2nd arg. start with '*', it is always treated as
    an indirect value.
506798
def _aload16(ins):
    ''' 
    '''
    output = _addr(ins.quad[2])

    output.append('ld e, (hl)')
    output.append('inc hl')
    output.append('ld d, (hl)')
    output.append('ex de, hl')
    output.append('push hl')

    return output
1079721
def _read_byte(self, address):
        
        # Initialize memory location with a random value.
        if address not in self._memory:
            self._memory[address] = random.randint(0x00, 0xff)

        return self._memory[address]
552244
def get_uint16(self):
        

        value = self.get_int()
        if value < 0 or value > 65535:
            raise dns.exception.SyntaxError('%d is not an unsigned 16-bit integer' % value)
        return value
970668
def load_uvarint_b(buffer):
    
    result = 0
    idx = 0
    byte = 0x80
    while byte & 0x80:
        byte = buffer[idx]
        result += (byte & 0x7F) << (7 * idx)
        idx += 1
    return result
1058731
def _ret16(ins):
    
    output = _16bit_oper(ins.quad[1])
    output.append('#pragma opt require hl')
    output.append('jp %s' % str(ins.quad[2]))
    return output
1189098
private static void set16(byte[] b, int off, int value) {
        b[off+0] = (byte)value;
        b[off+1] = (byte)(value >> 8);
    }
621188
def __write_byte(self, address, value):
        
        # Save previous address content.
        if address in self._memory:
            self.__memory_prev[address] = self._memory[address]

        self._memory[address] = value & 0xff
389695
private static final long get32(byte b[], int off) {
        return (get16(b, off) | ((long)get16(b, off+2) << 16)) & 0xffffffffL;
    }
228940
def InsertInt16Arg(self, string="", **_):
    """"""
    try:
      int_value = int(string, 16)
      return self.InsertArg(int_value)
    except (TypeError, ValueError):
      raise ParseError("%s is not a valid base16 integer." % string)
513563
private void performSetAdj(int position, boolean value) {
		checkMutable();
		final int i = position >> ADDRESS_BITS;
		final long m = 1L << (position & ADDRESS_MASK);
		if (value) {
			bits[i] |=  m;
		} else {
			bits[i] &= ~m;
		}
	}
553288
def _ne16(ins):
    ''' 
    '''
    output = _16bit_oper(ins.quad[2], ins.quad[3])
    output.append('or a')  # Resets carry flag
    output.append('sbc hl, de')
    output.append('ld a, h')
    output.append('or l')
    output.append('push af')

    return output
539266
def _decode16(self, offset):
        
        str_len, skip = self._decode_length(offset, 2)
        offset += skip

        # The len is the string len in utf-16 units
        encoded_bytes = str_len * 2

        data = self.m_charbuff[offset: offset + encoded_bytes]

        assert self.m_charbuff[offset + encoded_bytes:offset + encoded_bytes + 2] == b"\x00\x00", \
            "UTF-16 String is not null terminated! At offset={}".format(offset)

        return self._decode_bytes(data, 'utf-16', str_len)
377828
def __taint_load(self, instr):
        
        # Get memory address.
        op0_val = self.__emu.read_operand(instr.operands[0])

        # Get taint information.
        op0_taint = self.get_memory_taint(op0_val, instr.operands[2].size // 8)

        # Propagate taint.
        self.set_operand_taint(instr.operands[2], op0_taint)
398706
public int readUInt16() throws IOException {
        int b1 = in.read();
        if (b1 < 0) {
            return 0;
        }
        int b2 = in.read();
        if (b2 < 0) {
            throw new IOException("Missing byte 2 to read uint16");
        }
        return unshift2bytes(b1, b2);
    }
375449
function _readFC16(data, next) {
    var dataAddress = data.readUInt16BE(2);
    var length = data.readUInt16BE(4);

    if (next)
        next(null, { "address": dataAddress, "length": length });
}
291180
def _load32(ins):
    
    output = _32bit_oper(ins.quad[2])
    output.append('push de')
    output.append('push hl')
    return output
732632
def swd_read16(self, offset):
        
        value = self._dll.JLINK_SWD_GetU16(offset)
        return ctypes.c_uint16(value).value