def _storef(ins):
    """ Stores a floating point value into a memory address.
    """
    output = _float_oper(ins.quad[2])

    op = ins.quad[1]

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

    immediate = op[0] == '#'  # Might make no sense here?
    if immediate:
        op = op[1:]

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

        if indirect:
            output.append('ld hl, (%s)' % op)
        else:
            output.append('ld hl, %s' % op)
    else:
        output.append('pop hl')
        if indirect:
            output.append('call __ISTOREF')
            REQUIRES.add('storef.asm')

            return output

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

    return output
def _storef ( ins ) : output = _float_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 indirect : output . append ( 'ld hl, (%s)' % op ) else : output . append ( 'ld hl, %s' % op ) else : output . append ( 'pop hl' ) if indirect : output . append ( 'call __ISTOREF' ) REQUIRES . add ( 'storef.asm' ) return output output . append ( 'call __STOREF' ) REQUIRES . add ( 'storef.asm' ) return output
Stores a floating point value into a memory address.