13.07.2015 Views

DSP56xxx C Cross-Compiler User's Guide - Tasking

DSP56xxx C Cross-Compiler User's Guide - Tasking

DSP56xxx C Cross-Compiler User's Guide - Tasking

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Language Implementation 3–91_fractint; 1 |extern int i;; 2 |extern _fract f;. . .; 6 | i = f; // _fract to intmove x:Ff,a ; get f into accu aneg a; negate to set flagsmove #0,a ; result in i is 0jle L3 ; if value was >= 0 result in i is 0jes L3; or if value was > –1.0 if extension; not in use result in i is 0move #>–1,a ; else result in i is –1L3: move a,x:Fi ; store i; 8 | f = i; // int to _fractmove x:Fi,b ; get i into accu btst b; check value of imove #0,b ; result in f is 0.0jge L4 ; if i >= 0 result in f is 0.0move #

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!