Google
 

Trailing-Edge - PDP-10 Archives - SRI_NIC_PERM_SRC_3_19910112 - midas/cvt.mid
There are 2 other files named cvt.mid in the archive. Click here to see a list.
;-*-MIDAS-*-

;.SYMTAB 5000.
TITLE CVT
.decsav

;This program is distributed on the condition that it will NOT be
;given to any place else without the consent of the author

; Modified by KLH so runtime will work on either 10X/20X,
; however need to find out how to provoke generation of a .UNV
; file on 10X!!!  Possibly could make it grok symbol-table file
; format instead??

INJFN:	BLOCK 1
OUTJFN:	BLOCK 1
.SCALAR FLG20X	; -1 if on 20X
CVT:	RESET
	SETZM FLG20X	;Determine sys; assume 10X until proven otherwise
	MOVE 1,[SIXBIT /LOADTB/]	; So far only 10X has this table.
	SYSGT
	CAIN 2,0
	 SETOM FLG20X		; Table not defined, so must be 20X.

	HRROI 2,[ASCIZ/<SYSTEM>MONSYM.UNV/]
	SKIPE FLG20X
	 HRROI 2,[ASCIZ/SYS:MONSYM.UNV/]
	MOVSI 1,(GJ%OLD\GJ%SHT)
GETLP:	GTJFN
	 JRST [	HRROI 1,[ASCIZ/Can't find default MONSYM.UNV file, specify
file to use: /]
		PSOUT
		MOVSI 1,(GJ%OLD\GJ%SHT\GJ%FNS)
		MOVE 2,[.PRIIN,,.PRIOU]
		JRST GETLP]
	HRRZM 1,INJFN
	MOVEI 2,OF%RD
	OPENF
	 JRST 4,.-1
	HRROI 1,[ASCIZ/Outputting to TNXDFS.MID...
/]
	PSOUT
	MOVSI 1,(GJ%SHT+GJ%FOU+GJ%NEW)
	HRROI 2,[ASCIZ/TNXDFS.MID/]
	GTJFN
	 JRST 4,.-1
	HRRZM 1,OUTJFN
	MOVE 2,[7_12.,,OF%WR]
	OPENF
	 JRST 4,.-1
	HRROI 2,[ASCIZ/;;TNXDFS

/]
	SETZ 3,
	SOUT
	MOVE 1,INJFN
REPEAT 5,[BIN ?]
IOLP:	BIN
	JUMPE 2,[JRST 4,.]	; UH OH
	CAMN 2,[373737373737]
	 JRST FLUSH
	MOVE 10,2
	BIN
	MOVE 11,2
	TLNE 11,20000
	 JRST [	BIN		; MACRO
		MOVE 11,2
		REPEAT 3,[BIN ?]
		TLNE 11,-2
		 JRST @.
		JRST IOLP]
	MOVE 1,OUTJFN
	HRROI 2,[ASCIZ/DEFSYM /]
	SOUT
	MOVE 4,[440600,,10]
SIXOUT:	ILDB 2,4
	JUMPE 2,SIXDUN
	ADDI 2,"A-'A
	BOUT
	TLNE 4,770000
	 JRST SIXOUT
SIXDUN:	HRROI 2,[ASCIZ/==:/]
	SOUT
	TLNE 11,4000
	 JRST [	MOVE 1,INJFN	; FWD SYM
		BIN
		MOVE 1,OUTJFN
		MOVE 3,[NO%MAG\NO%LFL\NO%ZRO\<12.,,8.>]
		NOUT
		 JRST 4,.-1
		JRST TERPRI]
	MOVE 1,OUTJFN		; HWD SYM
	HRRZ 2,11
	MOVE 3,[NO%LFL\NO%ZRO\<6.,,8.>]
	NOUT
	 JRST 4,.-1
TERPRI:	HRROI 2,[ASCIZ/
/]
	SETZ 3,
	SOUT
	MOVE 1,INJFN
	JRST IOLP
FLUSH:	CLOSF
	 JRST 4,.-1
	MOVE 1,OUTJFN
	CLOSF
	 JRST 4,.-1
	HRROI 1,[ASCIZ/Done.
/]
	PSOUT
	HALTF
	JRST .-1

END CVT