CMPS-2240 Lab-10
x86 floating-point numbers

Gordon Griesel
Department of Computer and Electrical Engineering and Computer Science
California State University, Bakersfield

Introduction

Goals:
Write an x86 program that displays a floating-point value.

Step-1

Do your work in your Odin /2240/a/ folder.

Name your program: /2240/a/lab10.asm.

Bring in your lab-9 Makefile.
Remove unnecessary entries in your Makefile.

Start with one of the lab-9 assembly programs.
This is so you can start with a working x86 program.

Step-2

Follow along as we write a C program.

Name your program: /2240/a/double.c.

Produce assembly output with gcc double.c -S

Investigate the GCC assembly output.
Get the C program functionality working in your lab10.asm program.

Step-3

Try to get your program to use the x86 fsin function,
and display a result.

Extra

Extra points for:

 1. Calculating and printing the sine of your number.

 2. Using scanf to input a floating-point number.

What to turn in

Your program /2240/a/lab10.asm will be collected.