asm/decimal.c
changeset 142 d6bce20b455e
parent 77 49e0babccb23
equal deleted inserted replaced
141:0b5befeb361e 142:d6bce20b455e
     5 
     5 
     6 #include <stdio.h>
     6 #include <stdio.h>
     7 #include <stdlib.h>
     7 #include <stdlib.h>
     8 #include <string.h>
     8 #include <string.h>
     9 #include <limits.h>
     9 #include <limits.h>
       
    10 
       
    11 #ifndef __WORDSIZE
       
    12 #define __WORDSIZE 32
       
    13 #endif
    10 
    14 
    11 #define  MAXBITS __WORDSIZE
    15 #define  MAXBITS __WORDSIZE
    12 #define  MAXVALUE ULONG_MAX
    16 #define  MAXVALUE ULONG_MAX
    13 
    17 
    14 typedef unsigned long int ULONG;
    18 typedef unsigned long int ULONG;
   103         for (i = 0; i < bits; i++) {
   107         for (i = 0; i < bits; i++) {
   104             printf ("%X", binaer[i]);
   108             printf ("%X", binaer[i]);
   105         }
   109         }
   106         printf ("\n");
   110         printf ("\n");
   107 
   111 
   108         if (binaer)
   112         if (binaer != NULL)
   109             free (binaer);
   113             free (binaer);
   110     }
   114     }
   111     return EXIT_SUCCESS;
   115     return EXIT_SUCCESS;
   112 }
   116 }