*** empty log message ***
authorhachti <hachti>
Sun, 5 Feb 2006 17:07:50 +0000 (17:07 +0000)
committerhachti <hachti>
Sun, 5 Feb 2006 17:07:50 +0000 (17:07 +0000)
pc-tools/boot-maker/Makefile [new file with mode: 0644]
pc-tools/boot-maker/main.c [new file with mode: 0644]

diff --git a/pc-tools/boot-maker/Makefile b/pc-tools/boot-maker/Makefile
new file mode 100644 (file)
index 0000000..871819f
--- /dev/null
@@ -0,0 +1,13 @@
+default: install
+
+bmaker: main.c
+       gcc  -o $@ $<
+
+clean:
+       rm -f *.o bmaker ../../bin/bmaker
+
+install: bmaker
+       cp bmaker ../../bin
+
+.PHONY: clean install default
+
diff --git a/pc-tools/boot-maker/main.c b/pc-tools/boot-maker/main.c
new file mode 100644 (file)
index 0000000..b1a9c85
--- /dev/null
@@ -0,0 +1,38 @@
+#include <stdio.h>
+
+
+void output(unsigned short * data){
+    int c;
+    char zero=0;
+    unsigned char first_word=020;
+    unsigned short akt=0;
+       for (c=0; c<100; c++) write (1,&zero,1);
+       write (1,&first_word,1); // Anfangsadresse ausgeben    
+       c=020;
+       while (data[c]){
+       unsigned char lower=data[c] & 0xff;
+       unsigned char upper=(data[c] >> 8) & 0xff;
+       write (1,&upper,1);
+       write (2,"Locat geschrieben\n",18);
+       write (1,&lower,1);
+       c++;
+       }
+       for (c=0; c<100; c++) write (1,&zero,1); // Abspann
+}
+
+void prepare_1(unsigned short * mem){
+    mem[020]=0002010;    // Loop back to read boot-strap (must be here!)
+    mem[021]=0004026;    // Load A with dancy pattern
+    mem[022]=0024027;    // Increment and skip if zero 027
+    mem[023]=0002022;    // Loop
+    mem[024]=0040677;    // Right rotate a
+    mem[025]=0002022;    // Loop back
+    mem[026]=0052000;    // Bit pattern to move around
+}
+
+int main(){
+    unsigned short memory[0100];
+    prepare_1(memory);
+    output(memory);
+    return 0;
+}