Projects like that have to be refined. There is also a PASCAL for the PDP-8 that was "ported" by essentially creationg a p-machine executor of primitives and a run-time of PDP-8 code to make that work, etc. When enough of it was working on the PDP-8, it was capable of compiling itself.
The most important thing on any of these projects to be practical enough is to decide exactly what code you want to produce and how to execute it. Fortran IV was constrained because it was required to support the FPP-12 [and later the FPP-8/A, but actually the subset the same as the FPP-12; the frills, although nice, didn't matter in the run-time system. As with many PDP-8 features, all you got was the ability to detect which exact hardware you had, that is if you cared, but in the main, no real improvement.]
One constraint is inevitably that doing it this way you get 15-bit addressing so that with a decent amount of memory [SIMH always provides the full 32K] you can have decent size binary actually running so it's not in any sense a toy, etc. Then an FPP simulator was added so that the programs could run on more machines, etc.
The BASIC run-time worked out an alternate model because in some ways, the FPP-12 is not that great for execution in general. [Give it a B-] Whether or not the BRTS is an actual improvement is debatable, but they
rejected the FPP as defined.
Note: There are 24-bit data formats [and double-precision that really adds 12-bits more to each variable; FOCAL has this as an add-on for example] and there is a 27-bit package that somewhat limits the range of exponents so they the truly infinitessimal and truly humongous are not allowed and instead favor more precision.
Then there is the nuts and bolts of the emulated instruction set. The original software FPP mimics the PDP-8 instruction set which may be easier to deal with at the assembler level, but another package used in 4K BASIC and 8K BASIC uses relative addressing as used in other machines, and sometimes this implements either smaller overlal, or perhaps faster overall result.
My point is these are just some of the decisions to make even before you start on what compilers compile. All of them avoid the PDP-8 field-addressing housekeeping because these are 15-bit addressing execution modes.
As some of you know, I am developing P?S/8 which has a far superior memory model. My friends at DEC admitted it's better, but were too lazy to change anything! Instead, every one of those run-time programs use ugly kludges just to badly do what naturally happens in P?S/8 by design.
From the vantage point of someone wanting to implement any such project, they can appreciate the better memory model because it makes their job easier and an ability to produce larger programs. Without going into great dettail, here is what you need to know:
1) P?S/8 is a 4K system minimum., There are reasons to back-pedal that for a variety or reasons [incluing modular optional features OS/8 doesn't even support at the conceptual level]. There is no valid reason for OS/8 to have a demand for ANY page of memory beyond all of field 0. [Field 0 is not available due to HARDWARE-derived reasons. 3-cycle DMA devices such as the TC01/08 DECtape, the TC59 magtape, and the DF32/RF08 require the hardwired addresses 07757-07755. This was actually planned around the minimalist design of the RIM loader, the shortest STRAIGHT-FORWARD loader that can be placed at the end of memory. Location 07777 is not actually part of the loader, but is reserved as where a JMP instruction is to the particular BIN loader is loaded in slightly lower memory; this is important as there are at least four different specific BIN loader implementations and there cannot be consensus on the exact starting point, but by having a JMP in 07777 to the current internal start, the documentation always applies; just start the BIN loader at 07777, etc.
Generalizing out from there, it is not much of a reach to make the last entire page of memory off-limits to programs [since it is not much more than a nitpick once you have BIN then the reserved locations then RIM then the JMP to BIN start at 07777. The P?S/8 version can make all that fit in 07642-07777 leaving 7600-7641 to nitpick over. That is the definition of the largest amount of code that is constrained to start at 07600 that can in general reboot P?S/8 when paper-tape operations are not currently needed, since it is a mass-storage system, not a pape-tape system,[but it can interoperate with the paper-tape system when you need it/] Thus, you can have 00000-07577 as a user program and the system "owns" 07600-07777. All PDP-8 operating systems that "matter" in any sense are designed to conform to this.
But OS/8 then also takes out 17600-17777. But I have proven for years this is simply not justified and based on a copout and shortsighted kludge just to expediently get up a poor design, which was then fixated and not going to be revised.
But P?S/8 was from the 4K era where such silly decisions were not made so expediently.
So, P?S/8 worked the other end. Within the kernel code in 07600-onward are control bits that any conforming program can access. This determines the HIGHEST field of memory that is FREE TO USE for all user purposes.
There are several optional components in P?S/8. Assuming 32K, ALL of them go into field 7. User programs can 100% use with impunity 10000-67777. This is a far better outcome than OS/8 because there is no "wasted" field 1 section.
So, how was this accomplished? [Shorter answer, by applying THOUGHT PROCESS!].
OS/8 [tries to] support devices where the system handler cannot work in only 07600-07777. [That happens.] Since they foolishly wasted field 17600-17777, they then had to use 27600-27777. This is idiotic and worse, it doesn't really work.
P?S/8 is based on the notion that there should not be any device it cannot handle WELL as oppposed to the usual miserable way OS/8 does. Everything in OS/8 is capable of being jettisoned in terms of performance, error recovery or other compromises. It's pretty much true ALL the handlers are compromised for the want of a nail or three.
Thus, the P?S/8 memory model is either a) You get it all to fit in 07600-07777 or you don't. If not, you can have x6000-x7777 whee x is the HIGHEST memory field available.
Thus, so far, if you cannot run in 4K, you do need at least 8K, but if you have more, the more you have, the higher and more out of the way the rest of the code is.
Before you look at what OS/8 tried to do, let me show you the deal-breaker:
On the DECmates II and up you have to support the RX50 diskettes. Besides due to other poor design aspects that OS/8 variant "OS/278 V2" is so incompatible and non-functional, the fatal blow is this: Perfectly reasonable commands that work in OS/8 are available in this variant system. And it works fine if your system device is the RD5x hard disk. But, if your boot device is the RX50 [and most DECmates ONLY have the RX50!] then executing these commands PERMANENTLY CORRUPT THE DISKETTE!
I've disassembled the ROMS of the DECmates [some copies of part of what I have done are on-line if anyone cares], so I know WHY this is true, but there is nothing that can be done about it. Thus, because OS/8 is so painted into a corner, it is IMPOSSIBLE to overcome this serious problem! [So, it's documented, thus it's the old "it's not a bug, it's a feature!].
But to solve this in P?S/8 will take most if not all of the additional 1K of code that becomes available. Thus, given this problem, it is not necessary to discuss the lesser problems, but for example, the P?S/8 RX01 system handler needs THREE pages of code to ELEGANTLY handle what OS/8 VERY BADLY handles.
Now back to what a compiler designer wants to hear:
If the configuration is only as described above, you can have 15-bit addressible contiguous address space from 10000-75777. Thus, this is already more than OS/8 can offer any of this class of program.
OS/8 miserably attempts to glom onto 17600-17777. In the extended P?S/8 "SHELL" definition, there is a need to have a 256 word area of program communication. [Note: The P?S/8 SHELL definition includes 12-character names with four-char extensions. That's literally DOUBLE what OS/8 supports, and additionally is case-retentive but not case sensitive [See OS/2 for an example of this]. Thus, each relevant filename specification needs twice as many words to store there, and it adds up quickly, etc.]
So where does this area "live" The answer is found in more kernel bits.
1) If the SHELL is not enabled, it is nowhere to be found.
2) If the SHELL is enabled, it depends on another bit.
3) The other bit if set means it is in x5400-x5777 where the same memory field x applies. Thus, two more pages are carved out that are reserved. But if you read the kernel bits, you still get 10000-75377 assuming 32K even with this situation.
4) If the bit is clear, the two pages are NOT memory resident. Instead, the contents of two adjacent 128-word blocks are used. The blocks are defined as very low blocks in an even odd pair, so it typically implements well. So, why is this not high-overhead? Because generally, these parameters are by design only needed for the benefit of the file-handling portion of the operating system in the SHELL and nowhere else. Thus, when these components are loaded, the device is already "close" to where these two blocks are anyway. If you look at this on actual DECtape, you see that the overhead is really not that much. [Of course, in OS/8 this overhead happens anyway, but you are still wasting field 1 7600-7777. Had it been an option do to it "my way" you would see that the overhead beyond the necessary overhead is surprisingly small. Thus, why compromise things otherwise? The rest of the differences in the SHELL as compared to OS/8, stated in a slightly oversimplfied way is that essentially, all the limitations don't exist for a variety of reasons. OS/8 has the dubious distinction of being just about the only operating system where the underlying storage cannot be accessed because the directory got prematurely full just because you have a totally reasonable number of files.
The above is also a consideration for most compiler designers: You probably want the user to have hundreds of individual files for a variety of purposes. Unfortunately, OS/8 will run out of gas unless you are VERY careful. this simply will not happen in the P?S/8 SHELL because of the superior design. This is the theoretical maxxed-out comparison: The P?S/8 SHELL can in theory address 2048 times as much storage as OS/8! Go back and read the last sentence, it's not a typo. OS/8 kludges 12-bit work of double-pages to cheat into 13-bits of storage addressing with some serious compromises. P?S/8 non-system handlers use 24-bits to address single-pages so you get both smaller minimum buffer sizes, but 2048 tims as much storage being addresses! Since P?S/8 device handlers support logical units [another thing OS/8 never did, yet it was planned!\ and assuming 6-bits is a byte [which is often the case on real storage devices] that means the scope of a SINGLE P?S/8 non-system handler is up to 32 GByte!
As a practical matter, OS/8 needs up to 8 handlers to address up to 8 DECtape drives. It also needs up to 8 handlers to address 8 1/2 drives of the RK8E/Rk05. P?S/8 needs only two handlers, one for all 8 DECtapes and another for all four RK drives. In fact, there is the obscure RKS8E controller that can address 4 more drives. OS/8 ran out of code space to support those drives, so there is a separate handler for those other four drives. There is is simply no way to trust this handler; if you don't actually have the RKS8E, it will corrupt your disk contents as it lets you with impunity! But this is unnecessary, as with larger handlers, you can check the hardware and if this is an ordinary RK8E, disallow access to the other four drives and return an error.] In SIMH as it stands now, that means the P?S/8 non-system RK handler addresses RK0, RK1, RK2 and RK3 each with blocks 00000-31277. OS/8 has to address up to 8 handler-limited half-drives.
And remember, OS/8 only defines a maximum of FIFTEEN handlers [and one of them is DSK, a placeholder for one of the others]. Thus, OS/8 CANNOT address all of those DECtapes AND RK half-drives at the same time! You have to use OS/8 BUILD all the time and kludge your way through using a subset of what you have. [On my real PDP-8/E-A system, I had several devices and had about 10 different saved copies of BUILD, each slightly different just to be able to "navigate" the hardware I actually had!]
Thus, overall, the little 4K system "leap-frogged" over the "big" 8K system into something that is geared to MORE memory, up to and including 32K handled well and not kludged. This is something compiler designers need to hear, etc.
[For those who don't know this part, P?S/8 was offered to DEC, being cheered on by my friends there who lobbied for it. The idiot managers rejected it out of a power-play attitude over them as spite-work, not what was good for the company. As a result I sold a limited version of the system to Intersil corporation for their then-new Intercept 1 based on the IM6100 run at proper speed. That machine can be liked to a beefed-up VT78 where everything runs slower,but is otherwise comparable. Since this was s strictly limited license, I retain full control over P?S/8 and it will shortly be released [sans the SHELL] as part of my PEPS package for Windows using the original 12-bit SIMH. Any serious user of the PiDP-8 should also be running this package because they complement each other. for more information, please join the pepswin group.]
At some point with certain modifications at the 12-bit level, PiDP-8 can also run P?S/8, It us also running on certain real PDP-8/I systems.
cjl