From: Philipp Hachtmann Date: Mon, 28 Sep 2015 19:00:32 +0000 (+0200) Subject: sw: Added further small things, links, etc X-Git-Url: http://gitweb.hachti.de/?a=commitdiff_plain;h=4d042122cf54c44711dcb27547816639243ca87f;p=pdp8.git sw: Added further small things, links, etc Signed-off-by: Philipp Hachtmann --- diff --git a/bin/speed8 b/bin/speed8 new file mode 120000 index 0000000..28298a0 --- /dev/null +++ b/bin/speed8 @@ -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 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 index 0000000..109a73d --- /dev/null +++ b/sw/speed8/pdp8/speed8 @@ -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 index 0000000..0a9d41f --- /dev/null +++ b/sw/tools/CAF.PA @@ -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 index 0000000..0a16f0f --- /dev/null +++ b/sw/tools_pc/.gitignore @@ -0,0 +1 @@ +tropf diff --git a/sw/tools_pc/tropf.c b/sw/tools_pc/tropf.c new file mode 100644 index 0000000..d0245ce --- /dev/null +++ b/sw/tools_pc/tropf.c @@ -0,0 +1,37 @@ +#include +#include +#include +#include +#include + +#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); + } + +}