source: trunk/libs/newlib/src/libgloss/pa/test.c @ 643

Last change on this file since 643 was 444, checked in by satin@…, 6 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 1.2 KB
RevLine 
[444]1/* Copyright (c) 1995 Cygnus Support
2 *
3 * The authors hereby grant permission to use, copy, modify, distribute,
4 * and license this software and its documentation for any purpose, provided
5 * that existing copyright notices are retained in all copies and that this
6 * notice is included verbatim in any distributions. No written agreement,
7 * license, or royalty fee is required for any of the authorized uses.
8 * Modifications to this software may be copyrighted by their authors
9 * and need not follow the licensing terms described here, provided that
10 * the new terms are clearly indicated on the first page of each file where
11 * they apply.
12 */
13extern int led_putnum();
14extern char putDebugChar(),print(),putnum(); 
15#include <stdio.h>
16
17main()
18{
19  float a1,b1,c1;
20  int a2, b2, c2;
21
22  a1 = 0.41;
23  b1 = 3.12;
24  c1 = a1+b1;
25
26  a2 = 1;
27  b2 = 2;
28  c2 = a2 + b2;
29
30  iprintf ("Print integer, result = %d\n", c2);
31  fflush (stdout);
32  putnum (c1);
33  outbyte ('\n');
34  printf ("Print float, result with 'f' = %f\n", c1);
35  printf ("Print float, result with 'e' = %e\n", c1);
36  printf ("Print float, result with 'E' = %E\n", c1);
37  printf ("Print float, result with 'g' = %g\n", c1);
38  printf ("Print float, result with 'G' = %G\n", c1);
39  fflush (stdout);
40  print ("Done...\n");
41}
Note: See TracBrowser for help on using the repository browser.