summaryrefslogtreecommitdiffstats
path: root/Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/PROGC/DSPDIV.C
blob: c805d337011f6e97a38cc810f5616334971b9346 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <stdlib.h>
#include <stdio.h>

int main(int argc, char *argv[])
{
  if (argc != 3)
    puts("needs 2 numeric args");
  else
  {
    __sdiv32by16 result;

    result = __rt_sdiv32by16(atoi(argv[1]), atoi(argv[2]));

    printf("quotient %d\n", result.quot);
    printf("remainder %d\n", result.rem);
  }
  return 0;
}