*** empty log message ***
authorhachti <hachti>
Wed, 27 Jul 2005 17:22:16 +0000 (17:22 +0000)
committerhachti <hachti>
Wed, 27 Jul 2005 17:22:16 +0000 (17:22 +0000)
bin/frun [new file with mode: 0755]
lib/fortran/script/def_recipe.sh [new file with mode: 0755]
lib/fortran/script/extractnames [new file with mode: 0755]
programs/punchomat/Makefile [new file with mode: 0644]
programs/punchomat/src/c.f [new file with mode: 0644]
programs/punchomat/src/o$la.asm [new file with mode: 0644]
programs/punchomat/src/punchomat.f [new file with mode: 0644]
programs/punchomat/src/test.sys [new file with mode: 0644]

diff --git a/bin/frun b/bin/frun
new file mode 100755 (executable)
index 0000000..8dfcabe
--- /dev/null
+++ b/bin/frun
@@ -0,0 +1,42 @@
+#!/bin/bash
+# FORTRAN IV simple executor
+
+if [ ! $1 ] ; then
+    echo "Argument fehlt!"
+    exit 2
+fi
+
+name=`basename $1 .obj`
+
+echo "rest $H316/sys/super2.sys" > $name.go
+echo "at ptr $name.obj" >> $name.go
+echo "go" >> $name.go
+echo "go" >> $name.go
+echo "at ptr $H316/lib/fortran/original/flib1" >> $name.go
+echo "go" >> $name.go
+echo "at ptr $H316/lib/fortran/original/flib2" >> $name.go
+echo "go" >> $name.go
+echo "at ptr $H316/lib/fortran/original/flib3" >> $name.go
+echo "go" >> $name.go
+if [ -e $H316/lib/iolib/io.lib ]; then
+    echo "at ptr $H316/lib/iolib/io.lib" >> $name.go
+else
+    echo "io.lib nicht gefunden!"
+    exit 3
+fi
+echo "go" >> $name.go
+echo "r" >> $name.go
+echo "! echo -e \"\\n************************\"" >> $name.go
+echo "run 1000" >> $name.go
+echo "! echo -e \"************************\"" >> $name.go
+echo "quit" >> $name.go
+#cat $name.go
+h316 $name.go 
+
+rm -f $name.par
+rm -f $name.go
+
+exit 0
+
+
+
diff --git a/lib/fortran/script/def_recipe.sh b/lib/fortran/script/def_recipe.sh
new file mode 100755 (executable)
index 0000000..9733b95
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+# Stelle Rezept für die gegebene Bibliothek her
+
+ldc $1 | egrep "^[A-Z].*\((6)|0-0\)"| awk '{printf("org/%s\n",$1);}' 
\ No newline at end of file
diff --git a/lib/fortran/script/extractnames b/lib/fortran/script/extractnames
new file mode 100755 (executable)
index 0000000..0074432
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+ldc $1 | egrep "^[A-Z].*\((6)|0-0\)"| awk '{print $1}'
\ No newline at end of file
diff --git a/programs/punchomat/Makefile b/programs/punchomat/Makefile
new file mode 100644 (file)
index 0000000..4704c66
--- /dev/null
@@ -0,0 +1,20 @@
+# Makefile für Apfelmännchenprogramm
+
+ASM=$(H316)/bin/asm
+FRTN=$(H316)/bin/frtn
+
+build/apfel2.obj : src/apfel2.f
+       @if [ ! -d build ]; then mkdir build; fi
+       $(FRTN) src/apfel2.f && mv apfel2.obj build
+
+clean :
+       @rm -rf *.obj build/ *.lst *.go *.par
+
+.PHONY: default clean
+
+
+%.obj:%.f
+       $(FRTN) $^
+
+%.obj:%.asm
+       $(ASM) $^
\ No newline at end of file
diff --git a/programs/punchomat/src/c.f b/programs/punchomat/src/c.f
new file mode 100644 (file)
index 0000000..466c4ab
--- /dev/null
@@ -0,0 +1,18 @@
+CCCCCC PUNCHOMAT-HAUPTPROGRAMM, 31.05.2005
+C
+C
+       WRITE(1,1000)
+1000   FORMAT(45HPHILIPP HACHTMANN'S COOL VISIBLE PUNCH DEMO! )
+       WRITE(1,1001)
+1001   FORMAT (10H27.05.2005)
+C
+C
+666    WRITE (1, 1002)
+1002   FORMAT (2HPP)
+       READ (1,1003) PUFF
+1003   FORMAT (A2)
+1004   FORMAT (A2)      
+       WRITE (1,1004)PUFF
+       GO TO 666
+       END
+$0
diff --git a/programs/punchomat/src/o$la.asm b/programs/punchomat/src/o$la.asm
new file mode 100644 (file)
index 0000000..79ca6f7
--- /dev/null
@@ -0,0 +1,334 @@
+* (O$LA)
+*
+* *********** MODIFIED MODIFIED !!!! *****************
+*
+* FOR VISIBLE PUNCHES !!!!!
+*   
+* PROGRAM TITLE:  O$LA  (O$LA,O$LE,O$LH,O$LC,O$LF) 
+*                 LINE PRINTER ROUTINES
+*
+* REVISIONS: 
+*            1.0 (2005-02.04)
+*
+* AUTHOR
+*
+*    PHILIPP HACHTMANN
+*
+*
+* PURPOSE
+*
+*    THESE ARE THE LIBRARY ROUTINES FOR HACHTI'S LINE PRINTER INTERFACE
+*    
+*
+* RESTRICTIONS
+*
+*    DEPENDS ON HACHTI'S HARDWARE AND FORTRAN IV COMPILER TAPE
+*
+*
+* STORAGE
+*
+*    420 (OCTAL)
+*    271 (DECIMAL)
+*
+*
+* USE
+*
+*              CALL     O$LA
+*              DAC      (BUFFER ADDRESS)
+*              NORMAL
+*
+*    THIS PRINTS ONE LINE OF LISING TEXT
+*    (60 2-CHAR WORDS MAX) TO THE LINE PRINTER.
+*         
+*    
+*              CALL     O$LH
+*              DAC      (HEADING ADDRESS)
+*              NORMAL RETURN
+*    
+*    SETUP THE LISTING HEADER
+*    RESETS THE PAGE COUNTER AND SPACES TO THE BEGINNING OF
+*    THE NEXT PAGE.
+*    
+*    
+*              CALL     O$LP
+*              DAC      (BUFFER ADDRESS)
+*              NORMAL RETURN
+*    
+*    PRINT TEXT FROM BUFFER. NO CR OR LF IS OUTPUT.
+*    
+*              CALL     O$LC
+*              NORMAL RETURN
+*    
+*    PRODUCE A CARRIAGE RETURN ON THE LINE PRINTER.
+*    
+*    
+*              CALL     O$LF
+*              NORMAL RETURN
+*    
+*    SEND A LINE FEED COMMAND TO THE PRINTER.
+*    
+*    
+*              CALL     O$LE
+*              NORMAL RETURN
+*    
+*    EJECT CURRENT PAGE
+*    SPACES TO THE BEGINNING OF THE NEXT PAGE BY SENDING
+*    A FF CHARACTER TO THE PRINTER.
+*
+********************************************************************************
+*
+       SUBR    O$LA    TYPE A COMPLETE LINE WITH CR/LF, HEADING ETC.
+       SUBR    O$LH    INITIALISE HEADING
+       SUBR    O$LP,T1 TYPE  A LINE, NO CR
+       SUBR    O$LC,T20        RETURN THE CARRIAGE
+       SUBR    O$LF,T30        ADVANCE TO NEXT LINE
+       SUBR    O$LE,FF         EJECT PAGE
+*
+       SUBR    O$LSK1,SKP1     EMPTY LINES BETWEEN TOP OF PAGE AND HEADING
+       SUBR    O$LSK2,SKP2     EMPTY LINES BETWEEN HEADING AND MAIN TEXT
+       SUBR    O$LLPP,LPP      PURE TEXT LINES PER PAGE
+       SUBR    O$LRS,RS        DISTANCE FROM PAGE NUMBERING TO RIGHT MARGIN
+*
+********************************************************************************
+*
+       REL             RELOCATEABLE MODE
+*
+* CONFIGURATION
+SKP1   DEC     1       EMPTY LINES BEFORE HEADING
+SKP2   DEC     3       EMPTY LINES BETWEEN HEADING AND TEXT
+LPP    DEC     60      DATA LINES PER PAGE (WITHOUT HEADING ETC.)
+LNW    DEC     60      LINE LENGTH IN 2-CHAR WORDS
+RS     DEC     1       RIGHT DISTANCE FOR PAGE NUMBERING (2-CHAR WORDS)
+*      
+*
+O$LA   DAC     **
+       LDA*    O$LA    BUFFER ADDRESS
+       STA     LBUF    STORE
+       LDA     LINE    LEFT LINE COUNTER
+       SZE             LINES LEFT ON PAGE?
+       JMP     PGOK    YES, JUMP AWAY
+       JST     FF      CALL FORM FEED ROUTINE
+PGOK   LDA     LPP     LINES PER PAGE
+       TCA
+       CAS     LINES   ARE WE ON THE FIRST LINE?
+       JMP     *+2     NO, WE ARE NOT.
+       JST     NP      MAKE HEADER, SPACING ETC.
+       NOP             
+       IRS     LINE    BUMP COUNTER
+       NOP             WE DON'T CONTROL THAT HERE ANYMORE
+       JST     T1      PRINT THE LINE
+LBUF   DAC     **      ADDRESS OF LINE BUFFER  
+       JST     T20     CARRIAGE RETURN
+       JST     T30     LINE FEED
+       IRS     O$LA    MAKE RETURN ADDRESS
+       JMP*    O$LA    RETURN
+*
+*
+O$LH   DAC     **      INIT HEADING
+       LDA*    O$LH    
+       STA     P1      POINTER TO SOURCE
+       LDA     HBUP
+       STA     P2      POINTER TO TARGET
+       LDA     LNW     LINE LENGTH
+       TCA
+       STA     CNT
+HL1    LDA*    P1
+       STA*    P2
+       IRS     P1
+       IRS     P2
+       IRS     CNT     READY?
+       JMP     HL1     NO
+       LDA     LPP     LINES PER PAGE
+       TCA             RENEW
+       STA     LINE    THE LINE COUNTER
+       IRS     O$LH    ADJUST ADDRESS
+       CRA
+       STA     LN1     CLEAR PAGE NUMBERING
+       STA     LN2     CLEAR PAGE NUMBERING
+       STA     LN3     CLEAR PAGE NUMBERING
+       JMP*    O$LH    RETURN
+*
+*
+*
+NP     DAC     **      PREPARE NEW PAGE
+       LDA     SKP1    SPACES BEFORE HEADING
+       SNZ             SPACING REQUIRED?
+       JMP     NHDS    NO SPACE BEFORE HEADING
+       TCA
+       STA     CNT
+S1     JST     T30     LINE FEED
+       IRS     CNT
+       JMP     S1
+NHDS   JST     LNNR    PREPARE LINE NUMBERING
+       JST     T1      TYPE HBUF
+HBUP   DAC     HBUF    ADDRESS OF HEADER BUFFER
+       JST     T20     CARRIAGE RETURN
+       JST     T30     LINE FEED
+       LDA     SKP2    NUMBER OF SPACES BEFORE TEXT
+       SNZ             SPACING REQUIRED?
+       JMP     NSPC    NO, IT'S NOT.
+       TCA             NEGATE
+       STA     CNT     TO COUNTER
+SP1    JST     T30     LINE FEED
+       IRS     CNT     DEC COUNTER, SKIP IF READY
+       JMP     SP1     NOT READY
+NSPC   JMP*    NP      RETURN
+*
+* FORM FEED
+FF     DAC     **
+       JMP*    FF      RETURN
+*
+*
+* VARIABLES
+XR     DEC     0       THE CALLER'S X REGISTER
+CNT    DEC     0
+HBP    DAC     HBUF
+HBUF   BCI     20,
+       BCI     20,
+       BCI     20,
+P1     DEC     0       POINTER 1       
+P2     DEC     0       POINTER 2
+LINE   DEC     -40     NEG LINES LEFT ON PAGE
+PGS    BCI     5,  PAGE  XXX
+PGSP   DAC     PGS     POINTER TO PGS
+*
+*
+************************************************************
+*
+* OUTPUT LINE
+T1     DAC     **
+       STX     XR      SAVE CALLER'S INDEX REGISTER
+       LDA*    T1
+       ADD     LNW     LINE WIDTH
+       ADD     ='40000 SET TAG
+       STA     T6
+       IRS     T1
+       LDA     LNW     LINE WIDTH
+       TCA             NEGATE
+       STA     0
+T3     LDA*    T6
+       CAS     ='120240
+       JMP     *+2
+*
+       JMP     T8
+T4     JST     T14
+       IRS     0
+       JMP     T3
+       LDX     XR      RESTORE CALLER'S INDEX REGISTER
+       JMP*    T1
+T6     ***     **
+*
+*
+T8     LDA     0
+       STA     T12
+T10    IRS     0
+       JMP     *+2
+       JMP*    T1
+       LDA*    T6
+       CAS     ='120240
+       JMP     *+2
+       JMP     T10
+       LDA     T12
+       STA     0
+       LDA     ='120240
+       JMP     T4
+T12    ***     **
+*
+*
+T14    DAC     **
+       ICA
+       STA     DAT1
+       CALL    VPUNCH
+DAT1   DEC     0
+       ICA
+       STA     DAT2
+       CALL    VPUNCH
+DAT2   DEC     0
+       JMP*    T14
+****
+*
+* CARRIAGE RETURN
+T20    DAC     *
+       LDA     =32     LEERZEICHEN
+       STA     DAT2
+       CALL    VPUNCH
+DAT3   DEC     0
+       JMP*    T20     RETURN
+*
+* LINE FEED
+T30    DAC     **
+       JMP*    T30
+*
+* PRINT LINE NUMBER TO BUFFER
+LNNR   DAC     **      INCREMENT LINE NUMBER, PUT TO BUFFER
+       JST     LNR     INCREMENT DIGIT
+LN1    DEC     0       LEAST SIGNIFICAND DIGIT
+       JMP     RDY     NO CARRY, COUNTING READY
+       JST     LNR     INCREMENT DIGIT
+LN2    DEC     0       SECOND DIGIT
+       JMP     RDY     NO CARRY, COUNTING READY
+       JST     LNR     INCREMENT DIGIT
+LN3    DEC     0       THIRT DIGIT
+       NOP             NO CARRY, FINE
+RDY    NOP             OVERFLOW, BUT WHAT SHOULD WE DO?
+*      
+*
+       LDA     LN3     LEFTMOST VALUE (100)
+       JST     MDG     CONVERT
+       LRR     8       SHIFT DOWN
+       LDA     =32     SPACE
+       LLR     8       SHIFT BACK
+       STA     PGS+3   STORE
+*
+       LDA     LN1     RIGHTMOST DIGIT (1)
+       ADD     =48     ZERO CHARACTER
+       LRR     8       SHIFT AWAY
+       LDA     LN2     MIDDLE VALUE (10)
+       JST     MDG     CONVERT
+       LLR     8       SHIFT UP AGAIN
+       STA     PGS+4   STORE INTO POSITION
+*
+*
+       LDA     HBP     HEADER BUFFER ADDRESS
+       ADD     LNW     PAGE WIDTH
+       SUB     RS      RIGHT SPACING
+       ADD     ='40000 SET INDEX BIT
+       STA     P1      TO POINTER
+       LDA     PGSP    PAGE NUMBER BUFFER ADDRESS
+       ADD     =5      ADD PAGE NUMBERING LENGTH
+       ADD     ='40000 SET INDEX BIT   
+       STA     P2      TO POINTER
+       LDA     =-5     
+       STA     0
+PP1    LDA*    P2
+       STA*    P1
+       IRS     0
+       JMP     PP1
+       JMP*    LNNR    RETURN
+*
+*      
+MDG    DAC     **      MAKE DIGIT FROM A
+       SZE
+       JMP     NZ      NO ZERO
+       LDA     =32     IS ZERO->SPACE
+       JMP*    MDG     RETURN
+NZ     ADD     =48     THE ZERO CHARACTER
+       JMP*    MDG     
+*
+*
+LNR    DAC     **      DIGIT SERVICE
+       IRS*    LNR     INCREMENT DIGIT
+       LDA*    LNR     LOAD NEW VALUE OF DIGIT
+       SUB     =10     TEST IF OVERFLOW
+       SZE             OVERFLOW?
+       JMP     NOFL    NO, TAKE FIRST RETURN
+       STA*    LNR     YES, CLEAR DIGIT (A WAS ZERO)
+       IRS     LNR     TALLY RETURN ADDRESS
+NOFL   IRS     LNR     TALLY RETURN ADDRESS
+       JMP*    LNR
+*
+       FIN             WRITE OUT LITERALS
+*
+* PUH.....
+*
+       END
diff --git a/programs/punchomat/src/punchomat.f b/programs/punchomat/src/punchomat.f
new file mode 100644 (file)
index 0000000..78b5474
--- /dev/null
@@ -0,0 +1,19 @@
+CCCCCC PUNCHOMAT-HAUPTPROGRAMM, 31.05.2005
+C
+       DIMENSION PUFF(40)
+C
+       WRITE(1,1000)
+1000   FORMAT(45HPHILIPP HACHTMANN'S COOL VISIBLE PUNCH DEMO! )
+       WRITE(1,1001)
+1001   FORMAT (10H27.05.2005)
+C
+C
+666    WRITE (1, 1002)
+1002   FORMAT (2HPP)
+       READ (1,1003) PUFF
+1003   FORMAT (40A2)
+1004   FORMAT (40A2)      
+       WRITE (4,1004)PUFF
+       GO TO 666
+       END
+$0
diff --git a/programs/punchomat/src/test.sys b/programs/punchomat/src/test.sys
new file mode 100644 (file)
index 0000000..dbd6882
Binary files /dev/null and b/programs/punchomat/src/test.sys differ