diff options
Diffstat (limited to 'Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/PROGC/DSPDIV.C')
| -rw-r--r-- | Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/PROGC/DSPDIV.C | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/PROGC/DSPDIV.C b/Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/PROGC/DSPDIV.C new file mode 100644 index 0000000..c805d33 --- /dev/null +++ b/Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/PROGC/DSPDIV.C @@ -0,0 +1,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;
+}
|
