Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PUB #841

Open
larsbrinkhoff opened this issue Apr 26, 2018 · 24 comments
Open

PUB #841

larsbrinkhoff opened this issue Apr 26, 2018 · 24 comments
Labels
printing Printers, text formatting, typesetting. sail Things from, or related to, Stanford AI lab.

Comments

@larsbrinkhoff
Copy link
Member

larsbrinkhoff commented Apr 26, 2018

.INFO.; PUB DOC
.INFO.; PUB RANDOM
.INFO.; PUB TIP
INFO; PUB TIPS
INFO; PUBXGP DOC
PUB; PUB2 LOADER
PUB; PUB DOC
PUB; PUB FILES
PUB; PUB FTP
PUB; PUB LOADER
PUB; PUB LOG
PUB; PUBMAC DFS
PUB; PUBMAC DOC
PUB; PUB PARC
PUB; PUB PUB
PUB; PUB SAILV
PUB; PUBSTD AIL
PUB; PUBSTD DFS
PUB; PUBSTD MAX
PUB; PUBSTD TES
PUB; PUBSUM 1
PUB; PUB TIPS
PUB; PUB UPD
PUB; PUB UPDATE
PUB; PUBXGP 49
PUB; PUBXGP DOC
PUB; PUBXGP XGP

Typesetting software.

@larsbrinkhoff
Copy link
Member Author

Hello @nomodes,

PUB isn't forgotten! In this repository we have, or will have, documents prepared with PUB.

Thank you for providing this manual:
http://www.nomodes.com/pub_manual.html

@larsbrinkhoff
Copy link
Member Author

Looks like these are the source files on Saildart:
https://www.saildart.org/[PUB,SYS]/

@larsbrinkhoff larsbrinkhoff added the sail Things from, or related to, Stanford AI lab. label May 15, 2018
@eswenson1
Copy link
Member

eswenson1 commented Jul 15, 2018

I tried creating a TS PUB (and TS PUB2) from the PUB; PUB LOADER and PUB; PUB2 LOADER files (using STINK) as per the instructions in PUB; MAKE PUB, and produced the two executables.

However, attempting to run PUB on PUB; PUB PUB (documentation on PUB), gives me this:

*:ejs;pub
*pub
INVALID INDEX NO. 1 FOR ARRAY MONTH
CALLED FROM 500134 LAST SAIL CALL AT 511104
?

I seem to recall seeing email or an issue (authored by Lars?) that referenced this error, which presumably comes from one of the SAIL libraries or perhaps DECSYS; DECBOT BIN. Is this some Y2K issue.

I get the same error using a PUB; TS PUB that came off backup tapes and dated 1/9/1983, so it is not the result of attempting to link/load under the current ITS.

Any ideas on how to pursue this?

@larsbrinkhoff
Copy link
Member Author

That rings a very faint bell. I think it was something with Fortran though, so probably Adventure.

@larsbrinkhoff
Copy link
Member Author

I think maybe @atsampson was involved?

@eswenson1
Copy link
Member

Yes, we had a related issue with fortran/adventure (and I worked around it). But I thought we had it with dec/sail as well. Maybe misremembering.

@atsampson
Copy link
Contributor

The months problem I looked at was #716. @eswenson1, any chance you could make the PUB; directory available on a branch or in its-vault?

@eswenson1
Copy link
Member

Done. I added a "pub" directory under "files".

@atsampson
Copy link
Contributor

The only code in PUB that indexes MONTH looks reasonable, using the TOPS-10 date format:

K _ CALL(0, "DATE") ;
VARASSIGN("MONTH", (STR1 _ MONTH[K DIV 31 MOD 12 + 1])[1 TO ^N-1]) ;
VARASSIGN("DAY", STR2 _ CVS(K MOD 31 + 1)) ;
VARASSIGN("YEAR", STR3 _ CVS(K DIV 31 DIV 12 + 1964)) ;
VARASSIGN("DATE", STR1 & STR2 & ", " & STR3 );

But DECUUO's implementation of the DATE call looks dodgy:

        .RDATE B,
[...]
        MOVE C,[440600,,B]
        PUSHJ P,POOF    ;YEAR  [converts BCD to binary]
        SUBI D,64.      ;THIS PROGRAM WILL NOT WORK IN 28 YEARS

RDATE only returns two BCD digits' worth of year, so I guess DECUUO's DATE will produce nonsense after 2000 (and the comment above was presumably written circa 1972!).

@larsbrinkhoff
Copy link
Member Author

@36bit wrote in #427 (comment):

The book about the Muddle programming language says:

This document was prepared using the PUB system (originally from the Stanford Artificial Intelligence Laboratory) and printed on the Xerox Graphics Printer of the M.I.T. Artificial Intelligence Laboratory.

@larsbrinkhoff
Copy link
Member Author

The TOPS-10 DATE call returns a 15 bit value encoded as

(day of month -1) + 31 * [(month -1) + 12 * (year -1964)]

This is good until February 1st, 2052.

@larsbrinkhoff
Copy link
Member Author

A fix for the DATE problem is in the works.

@larsbrinkhoff
Copy link
Member Author

Seems to work:

:stink pub loader
STINK.201

..start/   JRST S.   120/   0   ,,$1q
$$1l decsys; decbot bin
*56/   JOBUUO   1200
:pdump lars; ts pub
*$j PUB$J
*$^X.
*:cwd pub
*:lars;pub pub; pub pub
*^C
*

The ^C I typed was to PUB's * prompt.

@larsbrinkhoff
Copy link
Member Author

Sorry, I should have entered the document name to PUB. No progress:

:cwd pub
*:lars;pub
*pub
INVALID INDEX NO. 1 FOR ARRAY MONTH
CALLED FROM 500134  LAST SAIL CALL AT 511104
?

@larsbrinkhoff
Copy link
Member Author

Examining the code at 500134. It looks very much like part of the statement @atsampson posted:
VARASSIGN("MONTH", (STR1 _ MONTH[K DIV 31 MOD 12 + 1])[1 TO ^N-1]) ;

Clearly the code checks for an index < 2. But why wouldn't 1 be a valid index?

500126/   IDIVI 1,37   
500127/   IDIVI 1,14   
500130/   ADDI 2,1   
500131/   MOVE 5,2776   
500132/   CAML 2,-5(5)   
500133/   CAMLE 2,-4(5)   
500134/   7040,,505323   

@atsampson
Copy link
Contributor

Also, it isn't January. What value does K have after the UUO call? (I guess you could either add a line to the SAIL code to print it or look at it in DDT...)

@larsbrinkhoff
Copy link
Member Author

Sorry, I was confused by the "2" indicating an accumulator.

-5(5) is 0 and -4(5) is 14 (octal). So this seems ok.

@larsbrinkhoff
Copy link
Member Author

Good question.

I'm not at a point where I can run the SAIL compiler, though.

@atsampson
Copy link
Contributor

I guess I'm assuming that "INDEX NO. 1" means the value of the index is 1, when it could just mean "the first index is invalid". So it'd be worth looking at the values of ACs 1 and 2 as you step through the code from 500126...

@larsbrinkhoff
Copy link
Member Author

I wonder if the message means that the index is 1, or if the first array index is bad? The contents of AC2 is 100.

Well, I set a breakpoint on the first IDIVI, and apparently AC1 is 777777737432 at that point.

@larsbrinkhoff
Copy link
Member Author

Silly me! After some debugging I saw an .RDATE call. Turns out I forgot to make the purified TS DEC which is what PUB maps in.

:lars;pub
*pub
PUB  1
Source!file PUBSTD DFS COMMON; not found.
Read file: 

@larsbrinkhoff
Copy link
Member Author

I made a link for the file above.

*pub
PUB  1
Undefined Identifier EQUIVALENCE
Line/Page COMMON;PUBSTD DFS 48/1[]
^

The text in the PUBSTD DFS file is:

.MACRO BUGOFF ^P DEBUGFLAG _ 0 ; ^Q
.FONT EQUIVALENCE
."FIX",         "GACHAM",       "GACHA10",
."SER",         "METEORM",      "METEOR10",

@larsbrinkhoff
Copy link
Member Author

Tessler writes:

Also the last part of my PUBSTD.DFS is a PARC font equivalence table which only applies here because we have so many fonted devices. Don't take it -- it slows down PUB measurably to read it.

So maybe we can get rid of that part. But it seems strange that it doesn't work. Maybe we have an old version of PUB, but a newer PUBSTD.DFS?

@larsbrinkhoff
Copy link
Member Author

That gets us further:

PUB  1 2 3 4 5 6 7 8
Undefined Identifier COM
Line/Page 6/8[]

@larsbrinkhoff larsbrinkhoff added the printing Printers, text formatting, typesetting. label May 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
printing Printers, text formatting, typesetting. sail Things from, or related to, Stanford AI lab.
Projects
None yet
Development

No branches or pull requests

3 participants