summaryrefslogtreecommitdiffstats
path: root/Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/SCATTER/MAIN.C
diff options
context:
space:
mode:
authorSven Eisenhauer <sven@sven-eisenhauer.net>2023-11-10 15:11:48 +0100
committerSven Eisenhauer <sven@sven-eisenhauer.net>2023-11-10 15:11:48 +0100
commit33613a85afc4b1481367fbe92a17ee59c240250b (patch)
tree670b842326116b376b505ec2263878912fca97e2 /Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/SCATTER/MAIN.C
downloadStudium-master.tar.gz
Studium-master.tar.bz2
add new repoHEADmaster
Diffstat (limited to 'Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/SCATTER/MAIN.C')
-rw-r--r--Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/SCATTER/MAIN.C33
1 files changed, 33 insertions, 0 deletions
diff --git a/Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/SCATTER/MAIN.C b/Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/SCATTER/MAIN.C
new file mode 100644
index 0000000..7b90bc0
--- /dev/null
+++ b/Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/SCATTER/MAIN.C
@@ -0,0 +1,33 @@
+#include <stdio.h>
+#include <string.h>
+#define INBUFFSIZE 192
+#define OUTBUFFSIZE 257
+
+static char IDstring[]="This is initailised data.";
+static char inBuff[INBUFFSIZE];
+static char outBuff[OUTBUFFSIZE];
+static int charCount=0;
+
+extern int getData(char *,int);
+extern int uuencode(char *, char *, int);
+
+int main(int argc,char **argv)
+{
+ int uuCount;
+ charCount = getData(inBuff,sizeof(inBuff));
+ if (charCount<0) {
+ fprintf(stderr,"Error reading data.\n");
+ }
+ else {
+ uuCount=uuencode(inBuff,outBuff,charCount);
+ outBuff[uuCount]='\0';
+ puts(outBuff);
+ }
+ return 0;
+}
+
+void MemCopy(void *d,void *s,int c)
+{
+ memmove(d,s,c);
+}
+