sw: Added further small things, links, etc
authorPhilipp Hachtmann <hachti@hachti.de>
Mon, 28 Sep 2015 19:00:32 +0000 (21:00 +0200)
committerPhilipp Hachtmann <hachti@hachti.de>
Mon, 28 Sep 2015 19:00:32 +0000 (21:00 +0200)
Signed-off-by: Philipp Hachtmann <hachti@hachti.de>
bin/speed8 [new symlink]
bin/tropf [new symlink]
sw/speed8/pdp8/speed8 [new file with mode: 0755]
sw/tools/CAF.PA [new file with mode: 0644]
sw/tools_pc/.gitignore [new file with mode: 0644]
sw/tools_pc/tropf.c [new file with mode: 0644]

diff --git a/bin/speed8 b/bin/speed8
new file mode 120000 (symlink)
index 0000000..28298a0
--- /dev/null
@@ -0,0 +1 @@
+../sw/speed8/pdp8/speed8
\ No newline at end of file
diff --git a/bin/tropf b/bin/tropf
new file mode 120000 (symlink)
index 0000000..ca14d73
--- /dev/null
+++ b/bin/tropf
@@ -0,0 +1 @@
+../sw/tools_pc/tropf
\ No newline at end of file
diff --git a/sw/speed8/pdp8/speed8 b/sw/speed8/pdp8/speed8
new file mode 100755 (executable)
index 0000000..109a73d
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+PDP8=$(realpath $(dirname "$0")/..)
+
+RB="$PDP8/bin/rb"
+S8_DIR="$PDP8/sw/speed8/pdp8"
+
+if [ ! -e "S8_DIR/speed8.bin" ]; then
+       make -C "$S8_DIR" || exit 2
+fi
+
+"$RB" "$S8_DIR/speed8.bin"
+
+
+
+
diff --git a/sw/tools/CAF.PA b/sw/tools/CAF.PA
new file mode 100644 (file)
index 0000000..0a9d41f
--- /dev/null
@@ -0,0 +1,6 @@
+
+*200
+       CAF
+       JMP I RET
+RET,   7600
+
diff --git a/sw/tools_pc/.gitignore b/sw/tools_pc/.gitignore
new file mode 100644 (file)
index 0000000..0a16f0f
--- /dev/null
@@ -0,0 +1 @@
+tropf
diff --git a/sw/tools_pc/tropf.c b/sw/tools_pc/tropf.c
new file mode 100644 (file)
index 0000000..d0245ce
--- /dev/null
@@ -0,0 +1,37 @@
+#include <stdio.h>
+#include <readline/readline.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+#define DELAY 140000
+main(int argc, char ** argv){
+    int fd=0; // stdin;
+    int byte=0;
+    
+    if (argc==2) {
+    fd=open(argv[1],O_RDONLY);
+       if (fd<0){
+           perror("Schade");
+           exit (-4);
+       }
+    }
+        
+    
+    unsigned char  akt;
+    rl_instream=stdin;
+    rl_outstream=stderr;
+    char buffer [100];
+    while(read (fd, &akt,1)){
+    if (fd!=0) {
+    sprintf(buffer,"Byte No.:%6i DEC:%03i HEX:%02x OCT:%03o   Press enter -->",byte++,akt,akt,akt);    
+    readline(buffer);
+    }
+    else {
+       usleep(DELAY);
+       fprintf(stderr,"Byte No.:%6i DEC:%03i HEX:%02x OCT:%03o\n",byte++,akt,akt,akt);
+       }
+    write(1,&akt,1); 
+    }
+    
+}