+FarmerPotato Posted October 21, 2022 Share Posted October 21, 2022 From Susan Bailey’s comments in the source, the TI Writer Formatter was ported from Pascal. She leaves in some of the Pascal statements as documentation of the logic behind assembly code. From evidence in many TI documents, the software to format them would be familiar to us. For example, the Hexbus Specification has some typos that reveal “ .” commands by the space in front. Many documents have ASCII line drawings of data structures or system hierarchies with looping arrows. For example, the PAB format, 4A memory maps, etc. I’ve been reproducing these diagrams with an online ASCII box drawing tool. (From the HexBus specification, and the Speech Education Module docs.) I’d like to know what the original formatter was like. If there were box and line drawings commands. Maybe another tool in the chain, like Unix pic? Is a text formatter documented in any of the DX10 or DNOS manuals? Is there a pointer to a lost manual that it would be in? It would be fascinating to connect with TI-Writer’s “big brother” or mother! I don’t think the set of formatter commands came out of nowhere (though it’s similar to Unix runoff and nroff and even WordStar had dot-commands.) From a 1979 ACM article about TI’s internal network, many terminals were installed for word processing, connected to various 990 systems. 3 Quote Link to comment Share on other sites More sharing options...
+FarmerPotato Posted October 21, 2022 Author Share Posted October 21, 2022 TIPE. It’s not this one. TIPE was a visual editor, more like WordStar, with function keys for everything. http://www.bitsavers.org/pdf/ti/990/tipe/2270549-9701A_TIPE-990_UG_Sep81.pdf 1 2 Quote Link to comment Share on other sites More sharing options...
+retroclouds Posted October 23, 2022 Share Posted October 23, 2022 On 10/21/2022 at 6:25 PM, FarmerPotato said: TIPE. It’s not this one. TIPE was a visual editor, more like WordStar, with function keys for everything. http://www.bitsavers.org/pdf/ti/990/tipe/2270549-9701A_TIPE-990_UG_Sep81.pdf Thanks for sharing. Reading and learning more about these editors is fun! Quote Link to comment Share on other sites More sharing options...
+FarmerPotato Posted October 23, 2022 Author Share Posted October 23, 2022 I checked the DX10 and DNOS manuals, Comcepts&Facilities and a volume of the operators guides. No hints there. A lengthy tutorial on TIPE doesn’t hint at any dot commands. The print spooler is called TIPP but I think it takes an already TIPE formatted file. The way to find out is to run Dave Pittts’ 990 emulator and test. It seems like TIPE is part of the standard distribution. Quote Link to comment Share on other sites More sharing options...
jbdigriz Posted October 24, 2022 Share Posted October 24, 2022 (edited) "The way to find out is to run Dave Pittts’ 990 emulator and test. It seems like TIPE is part of the standard distribution." 👍There you go... I'm fumbling around figuring out the install procedure for the DFM (Directory/File Manager) tape on bitsavers. (in bits/TI/990/9trkTapes/rereads) The DFM editor seems at least somewhat similar to TI Writer. More so than the stock 990 text editor, anyway. Don't see a formatter, maybe there's one somewhere else in the ISSS package? I restored the tape to DS01 here, the DFM manual then is at DS01.S$DFM.U$DFM.MANUAL. ( yep, trying to lure people into getting involved with DX10 and DNOS. Kinda lonely in this here neglected minicomputer void. 🙂 ) DFM appears to have been the basis for Larry Kroeker's DF-EDIT for the TIPC and IBM PC. Similar to Xtree or Norton Commander, probably predating either. There is a modern day port to Unix systems called DF-SHOW, https://dfshow.org. DFM also showed up on TI's Unix systems such as the S1500 series. Kroeker was at TI before starting his own software firm. Not sure which way the ideas went there; be interesting to find out. RUNOFF is at least a good a guess as any for the formatter. Kroeker's docs for DF-EDIT's formatter say it was taken from Kernighan and Plauger's "Software Tools in Pascal". I couldn't locate a copy here, but that would probably tell you what they in turn based it on. Edited October 24, 2022 by jbdigriz 2 Quote Link to comment Share on other sites More sharing options...
+FarmerPotato Posted October 24, 2022 Author Share Posted October 24, 2022 @jbdigriz That is excellent information, thanks. I was not aware of that book by Kernighan and Plauger, though I learned a tremendous amount from the duo. I will get that one. Quote Link to comment Share on other sites More sharing options...
jbdigriz Posted October 24, 2022 Share Posted October 24, 2022 (edited) I see a bunch of paperback copies ~$5 on the bay. Next month, maybe. Caveat: I'm just thinking out loud here, really. I can't definitively say at this point what, if any, previous software TIW is based on. I did want to look closer at TIPE, too, and also ask some people some things. With that said, any screen oriented, line-based editor like TIW is going to have a lot of similarities with any other on the same architecture, I would think, but the reason I'm leaning toward DFM as a candidate is because its presumed derivative, the DF-EDIT editor, appears to use the same 4 digit line numbering as TIW does. Whether that shows influence or just commonality I"m not sure. I need to set up another computer that has halfway modern opengl hardware so I can run TI emulations on Mame again and look at those TIW sources. Mesa has dropped support for my antique video cards and 60% framerate in software emulation just doesn't cut it. Wait, there's TIImageTool, etc.. Nah, need to get the emulations running again anyway. Anyone has more info or insight on the TIW origins, please chime in. Probably been over multiple times here but I didn't find anything obvious. Thanks in advance! Edited October 24, 2022 by jbdigriz Quote Link to comment Share on other sites More sharing options...
+FarmerPotato Posted November 9, 2022 Author Share Posted November 9, 2022 On 10/24/2022 at 1:04 PM, jbdigriz said: RUNOFF is at least a good a guess as any for the formatter. Kroeker's docs for DF-EDIT's formatter say it was taken from Kernighan and Plauger's "Software Tools in Pascal". I couldn't locate a copy here, but that would probably tell you what they in turn based it on. I spent some time last night reading the TI-Writer Formatter source, and Kernighan & Plauger "Software Tools in Pascal". I am convinced that the TI-Writer Formatter was based on the one in Software Tools. Below are some findings. The names of the Pascal procedure in that book, compared to the 9900 assembler subroutine LABEL. Summary: In command processing: Subroutine COMAND is similar to the Pascal procedure command. It is one big case statement, with most entries in the same order! Subroutine SETATT takes the same arguments as the Pascal procedure setparam. SETATT has handlers PTYP1, PTYP2 etc which correspond to values 1,2, in setparam argument ptype Subroutine GETTL is the Pascal procedure gettl. (get top line?) Constant BIG, used with SETATT, is Pascal HUGE, used with setparam. Funny, because both are 16 bits? (1) I believe the 8/12/82 comments are SJB, Susan J Bailey. There are many authors in the Formatter though. * any "Pascal-like" comments in the text are due to 8/12/82 * the fact that this program started out in Pascal and 8/12/82 * was later converted to 99/4A assembly code. 8/13/82 (2) The subroutine SETATT takes most of the same arguments as the Pascal procedure setparam. Instead of pushing them onto the stack, variable parameters are DATA directives with the parameter labels. *----------------------------------------------------------- 8/12/82 * SET ATTRIBUTES - ASSIGN TO GLOBAL VARIABLE *----------------------------------------------------------- 8/12/82 SETATT MOV *R11+,R5 PARAM TIVAL,RMVAL,INVAL, ETC. 8/12/82 MOV *R11+,R6 DEFAULT 8/12/82 MOV *R11+,R3 MINVAL 8/12/82 MOV *R11+,R4 MAXVAL 8/12/82 * 8/11/82 * 8/11/82 * IF ARGTYP=ENDCL THEN PARAM:=DEFVAL * 8/11/82 CB @ARGTYP,@NEWLIN 8/11/82 JNE SA1 8/11/82 MOV *R6,*R5 use default value 8/12/82 JMP SAOUT 8/11/82 * 8/11/82 * ELSE IF ARGTYP=PLUS THEN PARAM:=PARAM+VAL * 8/11/82 SA1 CB @ARGTYP,@PLUS 8/11/82 JNE SA2 8/11/82 A @VAL,*R5 add to existing value 8/12/82 JMP SAOUT ... * 8/11/82 * IF PARAM<MINVAL THEN PARAM:=MINVAL * 8/11/82 SAO2 C *R5,*R3 low range check 8/16/82 JGT SAO3 8/11/82 MOV *R3,*R5 8/11/82 SAO3 RT Example call to SETATT, for Left Margin (which was called Indent in the original Pascal!). *----------------------------------------------------------- 8/11/82 COMIN BL @SETATT .LM val 8/12/82 DATA INVAL DATA ZERO DATA FFFF allows zero value 8/12/82 DATA RMVAL MOV @INVAL,@INDENT MOV @INVAL,@TIVAL B @SRET B @SRET is for the return stack, where R9 is the stack pointer. (TI used R10 everywhere else?) *----------------------------------------------------------- 8/12/82 * this standard return routine works for all BL subroutines 8/12/82 * that stack their return addr's. 8/12/82 *----------------------------------------------------------- 8/12/82 SRET DECT R9 RETRIEVE RETURN ADDR 8/12/82 MOV *R9,R11 8/13/82 B *R11 RETURN 8/13/82 (3) The subroutine COMAND is similar to the Pascal procedure command. I'm posting the whole subroutine and its table. In Pascal it is one big case statement. The order of the case entries is mostly preserved in the code here! Note how the return stack pointer, R9, is borrowed inside this BLWP. I'm not sure why it would update the caller's R9 before exit-- potentially leaving stuff on the stack. The label numbering here doesn't follow the pattern, where labels say line numbers 10, 20, 30, 35, 40 etc. COMAND DATA CMDWS,CMD01 *----------------------------------------------------------- 8/11/82 * * COMAND is a command parser the will * find commands in the table and match * proper parameter types with each * command. If the parameter supplied * does not match the proper parameter * type for the command, an error code * is returned in CMDERR. * * Calling protocol: * * BLWP @COMAND * *----------------------------------------------------------- 8/11/82 CMD01 LI R1,IBC+1 init command indx reg CLR @CMDERR * MOV @FMTWS+18,R9 recover R9 from caller LI R10,PAD reload PAD * CMD02 MOVB *R1+,R2 load command into R2 SWPB R2 MOVB *R1+,R2 SWPB R2 * LI R3,COMTAB beg of tbl * CMD03 C R2,*R3+ search tbl JEQ CMD04 INCT R3 skip parm handler addr INCT R3 skip cmd handler addr * CI R3,COMEND JLT CMD03 * * command not found if we get here * B @CMD99 ignore line * CMD04 MOV *R3+,R4 save parm handler addr MOV *R3+,R5 save cmd handler addr MOV R4,*R9+ stack parm handler addr * BLWP *R4 go parse parms * ABS @CMDERR handler parsing errors JNE CMD06 * MOV R1,*R9+ stack the R1 value LI R6,CMD05 MOV R6,*R9+ * BL *R5 go to cmd routine * CMD05 DECT R9 MOV *R9,R1 get R1 from stack * DECT R9 MOV *R9,R4 get parm hanlder addr from stack CI R4,PTYP3 string parm?? JEQ CMD99 nothing follows string parm * DEC R1 back to delim CB *R1,@NEWLIN end of command line?? JEQ CMD99 * INC R1 increment past delim JMP CMD02 go back for more * CMD06 JMP CMD99 * CMD99 MOV R9,@FMTWS+18 replace caller R9 * RTWP (4) Here is part of the command table - one of each PTYP. *----------------------------------------------------------- 8/11/82 COMTAB EQU $ TEXT 'FI' Fill command 8/11/82 DATA PTYP1 DATA COMFI * * TEXT 'LS' Line Spacing command 8/11/82 DATA PTYP2 DATA COMLS * * TEXT 'FO' FOoter definition command 8/11/82 DATA PTYP3 DATA COMFO * * TEXT 'DP' Define user Prompt command 8/11/82 DATA PTYP5 DATA COMDP COMEND EQU $ (5) Many commands are straightforward. In the Pascal case statement, most are exactly one setparam call and break call. Same here. Fill/No Fill for example: *----------------------------------------------------------- 8/11/82 COMFI BL @BRK .FI 8/12/82 SETO @FILL B @SRET *----------------------------------------------------------- 8/11/82 COMNF BL @BRK .NF 8/12/82 CLR @FILL B @SRET The ones with parameters are just a SETATT call, setparam in Pascal. *----------------------------------------------------------- 8/11/82 COMLS BL @SETATT .LS val 8/12/82 DATA LSVAL DATA ONE DATA ONE DATA BIG B @SRET (6) Here's one of the parameter types, PTYP3. Pascal passes ptype in setparam. The handler for the parameter type was take from COMTAB when the command was matched. R1 is the position in the line buffer. *----------------------------------------------------------- 8/11/82 PTYP3 DATA PTYPWS,PTYP3A * * * PTYP3 handles command parsing * for commands that require a * string as a parameter * *----------------------------------------------------------- 8/11/82 PTYP3A MOV @2(R13),R1 recover caler's R1 8/12/82 BL @STRSCN DATA VAL * MOV R1,@2(R13) replace R1 8/12/82 RTWP (7) Subroutine GETTL is the Pascal procedure gettl. I first I guessed transliterate, but it is "Get Title" which puts a header or footer into the buffer. Pascal doesn't have transliterate. Notice return stack pointer R9, used in SRET. *----------------------------------------------------------- 8/12/82 * GET A TITLE LINE *----------------------------------------------------------- 8/12/82 GETTL MOV *R11+,R3 POINTER TO TITLE STRING 8/12/82 MOV R11,*R9+ SAVE RETURN 8/12/82 MOV @VAL,R1 8/11/82 MOV R3,R4 8/11/82 CLR *R4+ GT4 MOVB *R1+,R5 copy the title over to dest area 8/16/82 CB R5,@NEWLIN JEQ GT5 MOVB R5,*R4+ 8/11/82 INC *R3 8/11/82 JMP GT4 8/11/82 GT5 C *R3,@ZERO 8/11/82 JNE GT6 8/11/82 * 8/11/82 * MAKE SURE TITLE IS NOT EMPTY * 8/11/82 INC *R3 MOVB @SPACE,@2(R3) GT6 B @SRET Here's an interesting comment by JJ, who didn't sign their name at the top. (SJB updated the author list on 8/27/82.) *----------------------------------------------------------- 8/11/82 COMFO BL @GETTL .FO string 8/12/82 DATA FOOTER * INC *R3 SJB outuput a formfeed. 10-7 JJ * MOV *R3,R2 10-7 JJ * MOVB @FF,@FOOTER+1(R2) (SEE PFOOT CHANGES, JGJ) 10-7 JJ B @SRET *----------------------------------------------------------- 8/11/82 COMHE BL @GETTL .HE string 8/12/82 DATA HEADER B @SRET Interesting at line 1202 of TIW2.txt * * the new COMTL code will handle the * new byte to string transliteration * * installed on 8/1/82 by * Pat Peters * * transliterate format: .TL val:val2,val3,... * (8) Our friend BIG, which is not HUGE BIG DATA >7FFF 5 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.