Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

42 lines (23 sloc) 0.422 kB

Print a literal double

C

#include <stdio.h>

int main ()
{
    printf ( "%f\n" , 1.2 ) ;

    return 0 ;
}

Assembly

        .include "utils.s"

        global_text main

        prepare_stack

        literal_double 0e1.2 %xmm0

        print_double %xmm0

        print_nl

        return_integer $0

Assemble and run

$ gcc print-literal-double.s -lm && ./a.out
1.2
Jump to Line
Something went wrong with that request. Please try again.