Google
 

Trailing-Edge - PDP-10 Archives - klad_sources - klad.sources/tenwd.tec
There are no other files named tenwd.tec in the archive.
!TENWD.TEC IS A TECO PROGRAM DESIGNED TO SCAN A MACY11 .LST FILE TO
FIND THE BLK10 MACRO CALL AND THEREAFTER, UNTIL THE ENDBLK MACRO CALL,
TRANSLATE THE PDP-11 BINARY TO PDP-10 BINARY IN THE LISTING.  THIS
TRANSLATION IS CONSISTANT WITH THE BLK10/X10/XO10/ENDBLK SCHEME OF
ASSEMBLING PDP-10 CODE WITH MACY11.!

!FIRST SET UP Q7 WITH A MACRO WHICH ESSENTIALLY DOES A \U0, ONLY IN
OCTAL MODE.!
HK I0U0<47-1A;1A-56;Q0*8+1A-48U0C> HX7

!PUT A MACRO IN Q8 WHICH TAKES THE VALUE IN Q0 AND DUMPS IT AS AN
OCTAL CHARACTER STRING 6 DIGITS LONG.!
HK I[06<(Q0&7)+48IRQ0/8U0>6C]0 HX8

!LOAD A MACRO INTO Q9 WHICH TAKES THE 5 BYTES PUT OUT BY THE STD PRM11
PDP-10 WORD MACROS AND CONVERTS THEM TO PDP-10 BINARY IN THE LISTING.
COLLAPSES THE CALL & 2 LINES OF BINARY EXPANSION TO JUST THE CALL LINE
WITH THE ADR/LH RH INSERTED IN THE FRONT OF THE LINE.  THE ADR IS GEN-
ERATED USING THE PDP-11 ADR OF THE BLK10 MACRO (IN Q6) AND THE PDP-10
BLOCK START ADR (IN Q5).  IF NO BLK START ADR WAS GIVEN IT TAKES THE
FIRST DIGIT STRING IT FINDS AFTER THE FIRST ; AND USES THAT AS THE
WORD ADDRESS (Q5=-1).  UPDATES END-OF-RANGE PTR, Q4.!
HK I[0[1[20LS	M7CDDI 
Q5+1"G(Q0-Q6)/5+Q5U0'Q5"L.U5S;SDRM7Q5J-1U5'M8I/.U1L.U2
3<S   DRM7[0>L2<S   DRM7[0>LQ4-.+Q2+19U4Q2,.KQ1J
]0]1Q0*256+Q1U0]1Q0*64+(Q1/4)U0M8I Q1&3U02<]1Q0*256+Q1U0>M8L]2]1]0
HX9 HK

!MAIN PROGRAM SECTION. OPEN FILE, SEARCH FOR BLK10 MACRO CALL.  PROCESS
ALL KL10 WORD MACROS BETWEEN THE BLK10 AND THE ENDBLK, COMPRESSING PAGES
AS WE GO.  REPEAT THIS PROCESS FOR EACH BLK10/ENDBLK PAIR.!
HK MACY11 LISTING KL10 WORD MACRO EXPANSION REFORMATTER.
TYPE MACY11.LST FILESPEC. MR MF [1 M1 Y
<NO	BLK10; -1U5 1A-47"G 1A-56"L M7 Q0U5 ''
0L S	 M7 Q0U6 L .U3 <-1-;A>
!FEB! :S	ENDBLKU0
Q0"E ZJ <A -1-;> SPAGE D \ 1A-^^-"E0K3K OFEB' 0L 12I .U4
Q3J <SX10; .-Q4; M9> Q3J <SXO10; .-Q4; M9>
Q3J <SI10; .-Q4; M9> Q3J <SIO10; .-Q4; M9>
Q3J <SWD36; .-Q4; M9> B,Q4P B,Q4K 0U3 OFEB'
L .U4 Q3J <SX10; .-Q4; M9> Q3J <SXO10; .-Q4; M9>
Q3J <SI10; .-Q4; M9> Q3J <SIO10; .-Q4; M9>
Q3J <SWD36; .-Q4; M9> B,Q4P B,Q4K
> EF
!SECTION TO RESCAN THE FILE AND COMPRESS PAGES WHERE POSSIBLE.!
]1 M1 NPAGE D <-1-^E; A> ZJ 12I
<ZJ .U1 <A -1-^E; -1-^N;> Q1J SPAGE D \
1A-^^-"N OPP' 0U0 J <S
; %0> Q0-62"G OPP' Q1J -D3K OEPP
!PP! B,Q1P B,Q1K !EPP! -1-^N; ZJ 12I> EX