The_neglected_art_of_Fixed_Point_arithmetic_20060913.pdf

(208 KB) Pobierz
The neglected art of
Fixed Point arithmetic
Seminar Presentation
Assembly 2006, 3
rd
- 6
th
August 2006
(Revised: September 13, 2006)
Jetro Lauha
Contents
Motivation
Introduction
Typically needed functions
Caveats and tricks
Tips for making a fixed point library
Motivation
Man sent himself to moon, and space probes
even beyond that.
Do you think the hardware
used to accomplish those feats had fancy FPU
to do all the calculations?
They used RCA 1802.
Processing power equals roughly 6502 or 6510,
used in Apple II and Commodore 64.
Motivation
But it's a lot of work.
30% of the Apollo software development effort was
spent on scaling.
[KrL64]
So they eventually switched to floating point when
hardware got better.
Motivation
So why am I talking about this?
Well, at least it's COOL, in retro-way:
This is how demo & game coders did their 3D stuff
15 years ago and made some pretty cool stuff even
with the minuscule CPU power.
But does that matter anymore – except if you
are going to take part in the old school demo
competition with some retro stuff?
Zgłoś jeśli naruszono regulamin