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 --- .../Mikroprozessorsysteme2/ARM202U/EXAMPLES/CANDASM/HALF_STR.C | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/CANDASM/HALF_STR.C (limited to 'Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/CANDASM/HALF_STR.C') diff --git a/Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/CANDASM/HALF_STR.C b/Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/CANDASM/HALF_STR.C new file mode 100644 index 0000000..0f00e81 --- /dev/null +++ b/Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/CANDASM/HALF_STR.C @@ -0,0 +1,10 @@ +typedef struct half_words_struct +{ unsigned field1:16; + unsigned field2:16; +} half_words; + +half_words max( half_words a, half_words b ) +{ half_words x; + x= (a.field1>b.field1) ? a : b; + return x; +} -- cgit v1.2.3