From 33613a85afc4b1481367fbe92a17ee59c240250b Mon Sep 17 00:00:00 2001 From: Sven Eisenhauer Date: Fri, 10 Nov 2023 15:11:48 +0100 Subject: add new repo --- .../ARM202U/EXAMPLES/PROGC/DSPDIV.C | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/PROGC/DSPDIV.C (limited to 'Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/PROGC/DSPDIV.C') 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 +#include + +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; +} -- cgit v1.2.3