Stores a floating point value into a memory address.
775357
def _pastoref(ins):
    ''' 
    '''
    output = _paddr(ins.quad[1])

    value = ins.quad[2]
    if value[0] == '*':
        value = value[1:]
        indirect = True
    else:
        indirect = False

    try:
        if indirect:
            value = int(value) & 0xFFFF  # Inmediate?
            output.append('push hl')
            output.append('ld hl, %i' % value)
            output.append('call __ILOADF')
            output.append('ld a, c')
            output.append('ld b, h')
            output.append('ld c, l')  # BC = Lower 16 bits, A = Exp
            output.append('pop hl')     # Recovers pointer
            REQUIRES.add('iloadf.asm')
        else:
            value = float(value)  # Inmediate?
            C, DE, HL = fp.immediate_float(value)  # noqa TODO: it will fail
            output.append('ld a, %s' % C)
            output.append('ld de, %s' % DE)
            output.append('ld bc, %s' % HL)
    except ValueError:
        output.append('pop bc')
        output.append('pop de')
        output.append('ex (sp), hl')  # Preserve HL for STOREF
        output.append('ld a, l')
        output.append('pop hl')

    output.append('call __STOREF')
    REQUIRES.add('storef.asm')

    return output
1268567
def write_float(self, number):
        
        buf = pack(self.byte_order + "f", number)
        self.write(buf)
681758
def _astoref(ins):
    ''' 
    '''
    output = _addr(ins.quad[1])

    value = ins.quad[2]
    if value[0] == '*':
        value = value[1:]
        indirect = True
    else:
        indirect = False

    if indirect:
        output.append('push hl')
        output.extend(_float_oper(ins.quad[2]))
        output.append('pop hl')
    else:
        output.extend(_float_oper(ins.quad[2]))

    output.append('call __STOREF')
    REQUIRES.add('storef.asm')

    return output
225591
def _store8(ins):
    
    output = _8bit_oper(ins.quad[2])

    op = ins.quad[1]

    indirect = op[0] == '*'
    if indirect:
        op = op[1:]

    immediate = op[0] == '#'
    if immediate:
        op = op[1:]

    if is_int(op) or op[0] == '_':
        if is_int(op):
            op = str(int(op) & 0xFFFF)

        if immediate:
            if indirect:
                output.append('ld (%s), a' % op)
            else:  # ???
                output.append('ld (%s), a' % op)
        elif indirect:
            output.append('ld hl, (%s)' % op)
            output.append('ld (hl), a')
        else:
            output.append('ld (%s), a' % op)
    else:
        if immediate:
            if indirect:  # A label not starting with _
                output.append('ld hl, (%s)' % op)
                output.append('ld (hl), a')
            else:
                output.append('ld (%s), a' % op)
            return output
        else:
            output.append('pop hl')

        if indirect:
            output.append('ld e, (hl)')
            output.append('inc hl')
            output.append('ld d, (hl)')
            output.append('ld (de), a')
        else:
            output.append('ld (hl), a')

    return output
1238109
public void putByte(int pos, byte b) {
		adaptSize(pos + 1);
		ByteBuffer bb = getBuffer(pos);
		int i = pos % _bufferSize;
		bb.put(i, b);
	}
609193
def store_reg(self, value, reg_type, reg_name, name=''):
        
        ftype = types.FunctionType(types.VoidType(), [reg_type])
        return self.asm(ftype, "", "{%s}" % reg_name, [value], True, name)
133148
def _bits_to_float(bits, lower=-90.0, middle=0.0, upper=90.0):
  """"""
  for i in bits:
    if i:
      lower = middle
    else:
      upper = middle
    middle = (upper + lower) / 2
  return middle
905561
function writeFixed32 (num, buf, offset) {
  buf.writeUInt16BE(Math.floor(num) % (256 * 256), offset)
  buf.writeUInt16BE(Math.floor(num * 256 * 256) % (256 * 256), offset + 2)
}
396801
def to_f
      p = FFI::MemoryPointer.new(:double)
      if CF.CFNumberGetValue(self, :kCFNumberDoubleType, p) != 0
        p.read_double
      else
        raise "CF.CFNumberGetValue failed to convert #{self.inspect} to kCFNumberDoubleType"
      end
    end
989736
public static void writeUnsignedShort(byte[] bytes, int value, int offset) {
        bytes[offset] = (byte) (0xFF & (value >> 8));
        bytes[offset + 1] = (byte) (0xFF & value);
    }
1104205
public static void float4(byte[] target, int idx, float value) {
    int4(target, idx, Float.floatToRawIntBits(value));
  }
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
568846
static final void put6Bit(final WritableMemory wmem, final int offsetBytes, final int slotNo,
      final int newValue) {
    final int startBit = slotNo * 6;
    final int shift = startBit & 0X7;
    final int byteIdx = (startBit >>> 3) + offsetBytes;
    final int valShifted = (newValue & 0X3F) << shift;
    final int curMasked = wmem.getShort(byteIdx) & (~(VAL_MASK_6 << shift));
    final short insert = (short) (curMasked | valShifted);
    wmem.putShort(byteIdx, insert);
  }
847691
def convert_registers_to_float(registers):
      
    b = bytearray(4)
    b [0] = registers[0] & 0xff
    b [1] = (registers[0] & 0xff00)>>8 
    b [2] = (registers[1] & 0xff)
    b [3] = (registers[1] & 0xff00)>>8
    returnValue = struct.unpack('<f', b)            #little Endian
    return returnValue
451057
public static void writeInt(byte[] b, int offset, int value) {
    b[offset++] = (byte) (value >>> 24);
    b[offset++] = (byte) (value >>> 16);
    b[offset++] = (byte) (value >>> 8);
    b[offset] = (byte)value;
  }
309919
@Pure
	@Inline(value = "$2.valueOf($1.floatValue())", imported = Float.class)
	public static Float toFloat(AtomicDouble number) {
		return Float.valueOf(number.floatValue());
	}
1317940
public static void writeInt16LE(final int value, final byte[] buffer, int offset)
    {
        buffer[offset++] = (byte) value;
        buffer[offset] = (byte) ((value >>> 8) & 0xFF);
    }