boot-maker: Fix warnings (missing header file)
[h316.git] / pc-tools / boot-maker / main.c
index b1a9c85ccb295b1b46a1182b5eb233906376aa37..0ac9f31dc5ea399b2e50c0d5709d145d4cf9213b 100644 (file)
@@ -1,11 +1,10 @@
 #include <stdio.h>
-
+#include <unistd.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;
@@ -22,7 +21,7 @@ void output(unsigned short * data){
 
 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[021]=0004026;    // Load A with fancy pattern
     mem[022]=0024027;    // Increment and skip if zero 027
     mem[023]=0002022;    // Loop
     mem[024]=0040677;    // Right rotate a
@@ -30,9 +29,31 @@ void prepare_1(unsigned short * mem){
     mem[026]=0052000;    // Bit pattern to move around
 }
 
+void prepare_2(unsigned short * mem){
+    mem[020]=0002010;    // Loop back to read boot-strap (must be here!)
+    mem[021]=0024027;    // Increment and skip if zero 027
+    mem[022]=0002021;    // Loop
+    mem[023]=0141206;    // Add one to A
+    mem[024]=0002022;    // Loop back
+    mem[025]=0000000;    // End
+}
+
+void prepare_3(unsigned short * mem){
+    mem[020]=0002010;    // Loop back to read boot-strap (must be here!)
+    mem[021]=0004027;    // Load Precount
+    mem[022]=0024027;    // Increment and skip if zero 027
+    mem[023]=0002021;    // Loop
+    mem[024]=0141206;    // Add one to A
+    mem[025]=0141340;    // Change characters in A
+    mem[026]=0002021;    // Loop back
+    mem[027]=0077777;    // End
+    mem[030]=0000000;
+}
+
+
 int main(){
     unsigned short memory[0100];
-    prepare_1(memory);
+    prepare_2(memory);
     output(memory);
     return 0;
 }