Fair point, Martin -- the save helper alone doesn't prove anything.
Though I have managed to find BLISS-16 after all, on the DECnet-20
source tape, and it runs:
https://pdp-10.trailing-edge.com/TOPS-20_V6.1_DECnetSrc_7-23-85/01/mcb/v3p0…
I wrote a few VT240 routines back in BLISS from what they do, compiled
them, and got the ROM's own code back, with all of the compiler's
choices:
- which values live in which registers;
- argument slots on the stack reused for the next call;
- CASE as a table of PC-relative offsets (ASL / ADD TBL(Rn),PC);
- bit fields via SWAB / ASR / BIC, stored with BIC + BIS;
- the epilogue.
E.g. the ReGIS HLS-to-colour routine in the PARSER task. The source:
GLOBAL ROUTINE HLSRGB (H, L, S, OUT) : NOVALUE =
BEGIN
LOCAL C;
H = KMOD (.H, 360);
IF .H LSS 0 THEN H = .H + 360;
IF .L LSS 0 THEN L = 0 ELSE IF .L GTR 100 THEN L = 100;
...
C<12,4> = KDIV (.C<4,4> * 2 + .C<8,4>, 3);
.OUT = .C
END;
The ROM (V2.2, PARSER 027432) next to TOPS-20 Bliss-16 3(552),
ENVIRONMENT (T11):
ROM BLISS-16
JSR R1,$SAV3 JSR R1,$SAVE3
MOV 20(SP),-(SP) MOV 20(SP),-(SP)
MOV #550,-(SP) MOV #550,-(SP)
JSR PC,K.S006144 JSR PC,KMOD
MOV R0,24(SP) MOV R0,24(SP)
BGE 1$ BGE 1$
ADD #550,24(SP) ADD #550,24(SP)
MOV 22(SP),R0 MOV 22(SP),R0
... ...
MOV R0,R1 MOV R0,R1
SWAB R1 SWAB R1
ASL R1 (x4) ASL R1 (x4)
BIC #7777,R1 BIC #7777,R1
BIC #170000,R3 BIC #170000,R3
BIS R1,R3 BIS R1,R3
MOV R3,@20(SP) MOV R3,@20(SP)
ADD #6,SP ADD #6,SP
RTS PC RTS PC
A different compiler may well match one of those by chance -- the
register save, sure; but all of them?
The only difference left is how eagerly 3(552) merges shared code
tails, which looks like something an earlier version did differently.