+retroclouds Posted April 13, 2020 Share Posted April 13, 2020 On 5/29/2015 at 10:04 AM, pnr said: .... The '673 document is the main specification, the '672 document is an addendum/errata to the former. It says that once upon a time Microsoft had a reference implementation in C for this spec, and also that the spec should be complete enough to write one from scratch. Has anyone ever attempted a disassembly & analysis of the Multiplan cartridge ROM? This p-code looks quite well done, allowing substantial programs in little memory. It has a single 64K data space for global data and the stack, and an essentially unlimited segmented code space: the code is divided up into relocatable "segments" that are paged in and out as needed. Also, the p-code looks very tight, packing many C operations in a single byte. If there is a reimplementation of this, and if someone has an old Microsoft C compiler (i.e. one of the DOS 16-bit compilers) that still supports generating this p-code, we would have another great tool for writing new software. Just found the below book online. If you read through the foreword you learn that Microsoft Multiplan was compiled on a PDP-11 running unix and then the p-code was offloaded to the (home) computer where it gets executed by the P-interpreter. http://cs.brown.edu/courses/cs190/2008/documents/restricted/Writing Solid Code.pdf 1 1 Quote Link to comment Share on other sites More sharing options...
+arcadeshopper Posted April 13, 2020 Share Posted April 13, 2020 i have backups of the group.. I'll see what I can do Quote Link to comment Share on other sites More sharing options...
+OLD CS1 Posted April 13, 2020 Share Posted April 13, 2020 11 hours ago, retroclouds said: Just found the below book online. If you read through the foreword you learn that Microsoft Multiplan was compiled on a PDP-11 running unix and then the p-code was offloaded to the (home) computer where it gets executed by the P-interpreter. http://cs.brown.edu/courses/cs190/2008/documents/restricted/Writing Solid Code.pdf Sub-titled "Microsoft's Techniques for Developing Bug-Free C Programs." Quote Link to comment Share on other sites More sharing options...
gferluga Posted March 17, 2021 Share Posted March 17, 2021 From web literature we know that Microsoft Multiplan was written to use a very clever p-code compiler system created by Richard Brodie. This p-code system, which was also used later by Microsoft Word, allowed Microsoft to target Multiplan to a huge number of different 8-bit and 16-bit computer systems. (Charles Simonyi once estimated that Multiplan was available for 100 platforms.) Any witness from MS or TI from that era? 1 Quote Link to comment Share on other sites More sharing options...
+retroclouds Posted March 18, 2021 Share Posted March 18, 2021 21 hours ago, gferluga said: From web literature we know that Microsoft Multiplan was written to use a very clever p-code compiler system created by Richard Brodie. This p-code system, which was also used later by Microsoft Word, allowed Microsoft to target Multiplan to a huge number of different 8-bit and 16-bit computer systems. (Charles Simonyi once estimated that Multiplan was available for 100 platforms.) Any witness from MS or TI from that era? I had a document documenting the C interpreter that was used in TI Microsoft Multiplan. But sadly I have lost it before getting a chance to scan. It was a copy of something printed with a matrix printer a long time ago. I’m sure it must be somewhere here in the house. I have looked for it a couple of times already in the last few years, but alas didn’t manage to find it so far. Quote Link to comment Share on other sites More sharing options...
BillG Posted March 18, 2021 Share Posted March 18, 2021 Version 6 of Microsoft C was able to generate that compact interpreted code. It did not last that long, I think version 8 could not. Parts of Word 1.1 used it. Quote Link to comment Share on other sites More sharing options...
+retroclouds Posted March 20, 2021 Share Posted March 20, 2021 On 3/18/2021 at 11:14 PM, BillG said: Version 6 of Microsoft C was able to generate that compact interpreted code. It did not last that long, I think version 8 could not. Parts of Word 1.1 used it. That is most interesting. Is there any documentation available on that particular aspect of Microsoft C ? Quote Link to comment Share on other sites More sharing options...
gferluga Posted March 20, 2021 Share Posted March 20, 2021 Yeah, actually Microsoft used P-Code way before VB1 - AFAIK their C compiler was able to emit it and several of their products were compiled as P-Code instead of machine code, which helped to save disk space (a premium at the time, especially considering it could make a difference on how many floppy disks they shipped) and quickly port their applications to other emerging platforms at the time (like the Macintosh). Both Microsoft's P-Code and Java were really inspired by UCSD Pascal which only emitted P-Code to be executed by a runtime they implemented quickly in a lot of systems (including the original IBM PC). 1 Quote Link to comment Share on other sites More sharing options...
gferluga Posted March 20, 2021 Share Posted March 20, 2021 That's about C v7 http://woj.piasta.pl/documents/streszczenia/2003_2004/ang17.pdf Quote Link to comment Share on other sites More sharing options...
+FarmerPotato Posted October 30, 2021 Share Posted October 30, 2021 Bumping this again. I'm interested in the "Microsoft C Pcode spec used for Microsoft Multiplan" I searched the Yahoo message list archive from whtech, but the attachments are not there. I did some research. I heard back from a former Microsoft employee that worked there in the 90s, who said the P-code interpreter used in, for instance, Office 4.0, had evolved from the 1981 spec. I guess that the MS C compilers 6.0 and 7.0 might have incompatibilities with the P-code interpreter used in 1981 for Multiplan. On 5/29/2015 at 3:04 AM, pnr said: I think the documents you refer to were posted in the yahoo group some 5 years ago: https://groups.yahoo.com/neo/groups/ti99-4a/conversations/topics/72673 https://groups.yahoo.com/neo/groups/ti99-4a/conversations/topics/72672 The '673 document is the main specification, the '672 document is an addendum/errata to the former. It says that once upon a time Microsoft had a reference implementation in C for this spec, and also that the spec should be complete enough to write one from scratch. Has anyone ever attempted a disassembly & analysis of the Multiplan cartridge ROM? This p-code looks quite well done, allowing substantial programs in little memory. It has a single 64K data space for global data and the stack, and an essentially unlimited segmented code space: the code is divided up into relocatable "segments" that are paged in and out as needed. Also, the p-code looks very tight, packing many C operations in a single byte. If there is a reimplementation of this, and if someone has an old Microsoft C compiler (i.e. one of the DOS 16-bit compilers) that still supports generating this p-code, we would have another great tool for writing new software. Quote Date: Sat, 06 Mar 2010 09:29:08 -0000 To: ti99-4a@yahoogroups.com From: "killroy732000" <filip.van-vooren@gmx.net> Subject: Microsoft C Pcode spec used for Microsoft Multiplan Hi TI friends, I just came across ebay item: 130372308372 This is what the description says: "Microsoft C Pcode Specification - 1981" This document describes the virtual machine that can execute the P-Code generated by Microsoft's C compiler. The document is original documentation used by TI developers to port Multiplan to 9900 based computers and more specifically the TI-99/4A. It is 22 pages with another 9 page update section. Does anyone knows something about this: 1. Does Microsoft multiplan run in an interpreter ? 2. What language does the interpreter runs in; 9900 assembly or GPL ? 3. Has anyone ever seen this Microsoft C cross compiler. Would be interesting to know on what platform the compiler ran on. 4. Would be cool to see the source code for Multiplan ;-) Cheers Filip Quote Date: Mon, 26 Apr 2010 12:00:01 -0700 (PDT) To: ti99-4a@yahoogroups.com From: Melvin Robinson <melrobin@yahoo.com> Subject: Microsoft C P-Code specification I'm sorry if this is not protocol, but I recently won Microsoft C P-code specification and wanted to share this with the TI community. There will be another document coming as well. Quote To: <ti99-4a@yahoogroups.com> Date: Tue, 27 Apr 2010 08:55:31 +0200 From: "Paolo Bagnaresi" <paul.bagnaresi@gmail.com> Subject: Re: [TI-99/4A] Oops I managed to download the unique pdf file, named 20100426122526859.pdf, 4.92 MB. It starts as follows: "Microsoft C PCode Specifications - 1981 1. Introduction This document describes the virtual machine that can execute the P_Code generated by Microsoft's C Compiler. The goals of this design are: 1. High static code density 2. Simple and efficient implementation of the virtual machine on various microprocessors. 3. Open ended design which will be able to accomodate foreseen and unforeseen future extensions. Foreseen extensions include a segmented swappable code section, coroutines, long integer aritmetic, and passing of variable number of parameters ..." Paolo Quote To: <ti99-4a@yahoogroups.com> Date: Mon, 26 Apr 2010 18:43:57 -0400 From: "Dan" <dano@lowcountry.com> Subject: Re: [TI-99/4A] Microsoft C P-Code specification [1 Attachment] came through fine here 9 page pdf, several pages have red notes added with marker top of page 1 Jan 22 16:42 1982 inter82.doc last 3 words on page 9 immediately after the directory Quote Date: Mon, 26 Apr 2010 19:48:19 -0500 To: ti99-4a@yahoogroups.com From: njerd <njd@njerd.us> Subject: Re: [TI-99/4A] Microsoft C P-Code specification I got the same pdf file as described. It was 2.4 MB in size on my Mac I also got the second one which was 22 pages long and 5.2 MB in size. Joel Note that on a second look, the email messages were only about 20KB and attachment were only URLs like to xa.yimg.com Quote Link to comment Share on other sites More sharing options...
+retroclouds Posted October 31, 2021 Share Posted October 31, 2021 On 4/13/2020 at 7:24 PM, arcadeshopper said: i have backups of the group.. I'll see what I can do As the yahoo groups are no longer alive, were you able to find something? Quote Link to comment Share on other sites More sharing options...
+arcadeshopper Posted October 31, 2021 Share Posted October 31, 2021 As the yahoo groups are no longer alive, were you able to find something?I uploaded everything I have to whtech http://ftp.whtech.com/YAHOO%20group%20backups/TI99-4A/FILES/Sent from my LM-V600 using Tapatalk 1 Quote Link to comment Share on other sites More sharing options...
+retroclouds Posted October 31, 2021 Share Posted October 31, 2021 8 minutes ago, arcadeshopper said: I uploaded everything I have to whtech http://ftp.whtech.com/YAHOO%20group%20backups/TI99-4A/FILES/ Sent from my LM-V600 using Tapatalk Thanks, took a quick look, but doesn't appear to be there. So the search continues, it will popup someday. As said I'm 100% sure I have it somewhere in the house. Question is where. Quote Link to comment Share on other sites More sharing options...
+retroclouds Posted October 31, 2021 Share Posted October 31, 2021 2 hours ago, retroclouds said: Thanks, took a quick look, but doesn't appear to be there. So the search continues, it will popup someday. As said I'm 100% sure I have it somewhere in the house. Question is where. Did some more searching and found the following on one of my hard drives. May it be kept forever on the internet.... Specification pcode virtual machine for running Microsoft C compiler code.pdf p-code interpreter updates of microsoft C compiler.pdf 2 3 Quote Link to comment Share on other sites More sharing options...
+retroclouds Posted October 31, 2021 Share Posted October 31, 2021 If anyone is willing to make a new "clean" version of the documents, that would be awesome. 1 Quote Link to comment Share on other sites More sharing options...
+FarmerPotato Posted October 31, 2021 Share Posted October 31, 2021 14 minutes ago, retroclouds said: Did some more searching and found the following on one of my hard drives. May it be kept forever on the internet.... Specification pcode virtual machine for running Microsoft C compiler code.pdf 4.92 MB · 4 downloads p-code interpreter updates of microsoft C compiler.pdf 2.26 MB · 3 downloads Awesome! Thank you! Quote Link to comment Share on other sites More sharing options...
+FarmerPotato Posted October 31, 2021 Share Posted October 31, 2021 1 hour ago, retroclouds said: If anyone is willing to make a new "clean" version of the documents, that would be awesome. I'm dictating them to Siri as I read out loud. Then I hit the code dictionary so I'm typing. Sample... The definitions of the instructions are written in C-like notation. Any other implementation with the same results is acceptable. NOP No Operation LDFN Load From Frame LDFAN Load Erase Address LDGN Load Global LDGAN Load Global Address LDT Load T STT Store Into T LDIT Load Indirect Through T (Word pointer) STIT Store Indirect Through T (Word pointer) LDIBT Load Indirect Byte Through T STIBT Store Indirect Byte Through T LDIN Load Indirect. Word on the stack is taken to be a word pointer. The increment N may be used to address a field in a data structure. *(S-1) = *(*(S-1)+N) LDIBN Load Indirect Byte. Word on the stack is byte pointer. The increment N may be used to address a byte field in a data structure. *(S-1) = *((CHAR *) *(S-1)+N) 2 Quote Link to comment Share on other sites More sharing options...
+FarmerPotato Posted October 31, 2021 Share Posted October 31, 2021 I am amused by the Octal numbers everywhere in the spec in 1981. Rumor was, the first compiler implementation was on a PDP-11. From my bookshelf, I see that by 1978, Hexadecimal ruled in 8080A and 8088 assembly language. 1 Quote Link to comment Share on other sites More sharing options...
+Ksarul Posted October 31, 2021 Share Posted October 31, 2021 9 minutes ago, FarmerPotato said: I am amused by the Octal numbers everywhere in the spec in 1981. Rumor was, the first compiler implementation was on a PDP-11. From my bookshelf, I see that by 1978, Hexadecimal ruled in 8080A and 8088 assembly language. A lot of stuff back before 1980 showed up first on PDP-11 machines. The earliest text adventures were developed and used as a troubleshooting aide on them. I remember regularly putting the diagnostic pack into the hard drive of the one I used in Berlin and booting the game to give the system a thorough workout during preventive maintenance sessions. 3 Quote Link to comment Share on other sites More sharing options...
+FarmerPotato Posted November 23, 2021 Share Posted November 23, 2021 On 10/31/2021 at 11:47 AM, retroclouds said: If anyone is willing to make a new "clean" version of the documents, that would be awesome. I'm working on this a little each day. I'm up to page 8 of 22. I'm making tiny revisions for syntax, and noting them with "original reads:". There are a couple weird bits so far, in the opcode definitions, which are in C syntax. Octal, with some strange operators (PDP-11 no doubt.) I'm not 100% sure of AND, OR and other opcodes. Starting with ADD, they are defined as: ADD Add W2 = *--S; W1 = *--S; *S++ = W1 + W2; AND Logical And, same with W1 & W2 OR Logical Or, same with W1 % W2 NOT Bitwise Logical Not: *(S-1) = ^*(S-1) REP Repeat Operand S++ = *(S-1) (S is the stack pointer, W1 and W2 are temporaries) I think they mean "Bitwise Or" where they call it Logical. Since they occur in the arithmetic operations, I think they should be bitwise like most ALUs. For coding logical operations, I guess you have ZR and NZ, Jump if Zero/Not Zero. I don't see any other Boolean instructions. Taking my changes one at a time: AND. & to & (no change) OR. % to | NOT. ^ to ~ (bitwise, one's complement) REP. *S++ Obviously an oversight. S++ is not assignable (lvalue) Here are the bit field load/store opcodes. & is obviously bitwise here. LDO F1 Load Field, F1 is an instruction byte. Loads field from word on the stack. Field is described by width of Field-1 stored in 4 bits and a right shift stored in the next 4 bits. DBITWIDTH = F1>>4; DBITSHIFT = F1 & 017; *(S-1) = (*(S-1)>>DBITSHIFT) & (2 POWER (DBITWIDTH+1) - 1); STO F1 Store field. Pointer to word is on the stack above the datum. Field descriptor format as above. MASK = 2 POWER (F1>>4+1) - 1; DBITSHIFT = F1 & 017; PW = *--S; W = *--S; *PW = (*PW & !(MASK << DBITSHIFT)) \ ((W & MASK)<<DBITSHIFT); Change \ to | Change ! to ~ The MASK will be ok in 16-bit arithmetic. DBITWIDTH+1 is from 1 to 16. 2^1 - 1 = 1, ok 2^15 -1 = 32768 - 1 = 32767 (7FFF), ok 2^16 - 1 = 65536 - 1 = 0 - 1 = 65535 (FFFF), ok Equivalent to 2 << DBITWIDTH 2 << 0 -1 = 2 - 1 = 1 2 << 14 - 1 = 32768 - 1 = 32767 (7FFF) 2 << 15 - 1 = 65536 - 1 = 0 - 1 = 65535 (FFFF) 2 2 Quote Link to comment Share on other sites More sharing options...
gferluga Posted January 1, 2022 Share Posted January 1, 2022 Introduced in 1982, this was Microsoft's spreadsheet, aimed at outcompeting Visicalc. Written in a proprietary p-code C language, Multiplan was ported to anything from the C-64 to Xenix. It quickly lost out to Lotus 123 on MS-DOS - but is the best spreadsheet for CP/M machines. Multiplan's main legacy is the R1C1 style of cell addressing, still visible in Visual Basic today. 1 Quote Link to comment Share on other sites More sharing options...
globeron Posted October 1, 2023 Share Posted October 1, 2023 Microsoft Multiplan module + Manual + TIMP 5.25" Disk (selling via ebay) https://www.ebay.com/itm/404518547645 (and also works with 80-column capabilities, like a Mechatronic device) -https://www.youtube.com/watch?v=uVQetnnq4n8 1 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.