Trailing-Edge
-
PDP-10 Archives
-
klad_sources
-
klad.sources/cnvfid.mac
There are no other files named cnvfid.mac in the archive.
SUBTTL OUTPUT FILE IDENTIFICATION
S
;*FILEID -- PUT FILE ID LINE IN OUTPUT FILE
S
FILEID: MOVEI CHR,";"
GO PUT1
MOVE OUTNAM ;DO FILE NAME
MOVEM SIXSTR
MOVEI T2,SIXSTR
GO FILSTR
MOVEI CHR,"."
GO PUT1
HLLZ OUTNAM+1 ;DO FILE EXTENSION
MOVEM SIXSTR
MOVEI T2,SIXSTR
GO FILSTR
GO FILSP3 ;SPACE 3
MOVEI T2,[SIXBIT/VER/]
GO FILSTR
GO FILSP1 ;SPACE 1
SKIPE DX20F
JRST IDDX20 ;DX20
SKIPE MICROF
JRST IDRAM ;MICRO-CODE
SKIPE FLAG8
JRST IDOTHER ;PDP-8
SKIPE FLAG11
JRST IDOTHER ;PDP-11
SKIPE KMCFLG
JRST IDOTHER ;KMC11
S
;* IDENTIFY PDP-10 "A10" FILE VERSION
S
HLRZ FILVER ;PDP-10
GO FILOCS ;MCN VERSION
MOVEI CHR,"."
GO PUT1
HRRZ FILVER ;DEC VERSION
GO FILOCS
S
;* PUT INPUT FILE DATE IN OUTPUT FILE
S
FILEI1: GO FILSP3 ;SPACE 3
SKIPE MICROF ;MICRO-CODE ?
JRST IDRAM1 ;YES
LDB AC2,[POINT 12,INNAME+2,35]
LDB AC1,[POINT 3,INNAME+1,20]
DPB AC1,[POINT 3,AC2,23]
JUMPE AC2,FILEI2 ;IF 0, SUPPRESS DATE
IDIVI AC2,^D31
ADDI AC3,1
GO FILNUM ;OUTPUT DAY
IDIVI AC2,^D12
MOVEI T2,DATETB(AC3)
GO FILSTR ;OUTPUT MONTH
MOVEI AC3,^D64(AC2)
GO FILNUM ;OUTPUT YEAR
FILEI2: GO PUTCRF
RTN
S
;* MICRO-CODE RAM FILE VERSION
S
IDRAM: LDB [POINT 9,HICORE+2!<137*4>,11]
JUMPE 0,IDOTHER ;ZERO VER, REQ ONE
GO FILOCS ;# FIELD, LOC 137 IS VERSION
JRST FILEI1
S
;* MICRO-CODE .TITLE INFORMATION
S
IDRAM1: MOVE T2,[POINT 7,MTITS]
ILDB CHR,T2
JUMPE CHR,FILEI2 ;IF NULL, DONE
GO PUT1 ;INSERT .TITLE INFORMATION
JRST .-3
S
;* PDP-11/PDP-8 FILE VERSION
S
IDOTHER:MOVEI [ASCIZ/
FILE VERSION ? /]
PNTALF ;REQ FILE VERSION FROM OPERATOR
TTICHR
JRST .-1
CAIN 0,15 ;CR IS END OF INPUT
JRST FILEI1
MOVEM 0,CHR
GO PUT1
JRST .-6
S
;*FILNUM -- PUT 2 DECIMAL DIGITS IN OUTPUT FILE
S
FILNUM: IDIVI AC3,^D10 ;SEPARATE DIGITS
MOVEI CHR,"0"(AC3)
GO PUT1
MOVEI CHR,"0"(AC4)
GO PUT1
RTN
S
;*FILOCS -- PUT OCTALS INTO OUTPUT FILE
S
FILOCS: LSHC 0,-^D35
LSH 1,-1
DIVI 0,^D8 ;SEPARATE DIGITS
HRLM 1,(P)
JUMPE 0,.+2
GO .-5
HLRZ CHR,(P) ;RETRIEVE DIGIT
ADDI CHR,"0"
GO PUT1
RTN
S
;*FILSTR -- PUT SIXBIT DATA INTO OUTPUT FILE
S
FILSTR: TLO T2,440600 ;CONVERT TO POINTER
ILDB CHR,T2 ;FETCH CHAR
JUMPE CHR,CPOPJ ;IF NULL, DONE
ADDI CHR," " ;CONVERT TO ASCII
GO PUT1
JRST .-4
S
;*FILEOF -- PUT "END OF FILE CODE IN OUTPUT FILE
S
FILEOF: MOVEI CHR,";"
GO PUT1
MOVEI T2,[SIXBIT/EOF/]
GO FILSTR
GO PUTCRF
RTN
S
;*FILSP3 -- PUT SPACES INTO OUTPUT FILE
S
FILSP3: MOVEI CHR," "
GO PUT1
FILSP2: MOVEI CHR," "
GO PUT1
FILSP1: MOVEI CHR," "
GO PUT1
RTN