• Please review our updated Terms and Rules here

DECUS C under RT11 memory requirements?

Oldcoder

Member
Joined
Feb 28, 2021
Messages
49
I have downloaded a DECUS C dsk image for RT11. However, when I try to run it under simh, KMON-F informs me 'Insufficient memory'

I am trying to run it under a simh 11/73 emulation with 4M RAM.
I can run AS.

.run dl1:cc

RT11XM 5.03 - insufficient memory
.sh mem

Extended memory
------------------------

17760000 IOPAGE 4096 HDW
02000000 MEMTOP
01000000 VM 131072 SHR
00176200 ............. 98752
00170000 SL 1600 PVT
00160000 DU 2048 PVT

Low memory
----------------
155564 DL 582
120036 RMON 7595
106774 USR 2321
001000..BG.. 17918

=================
RT11SJ 5.03 - works
.sh mem

160000 IOPOAGE 4096
156062 DL 487
145054 RMON 2307
001000 ..BG.. 25622


=================
It also works under

RT11FB 5.03
.sh mem

160000 IOPOAGE 4096
156062 DL 487
133540 RMON 4713
001000 ..BG.. 23216

Can I only run the compiler in small memory systems?

Thoughts please.

Thanks

Peter
 
The other thing that might help is to perform a system generation to get rid of a load of code within the SJ and XM monitors that you are never going to use. This will make the memory footprint smaller meaning you can shoehorn more user ‘stuff’ in...

Dave
 
DECUS C requires about 20k words just to run. The main reason is the code generator
overlay which needs 14k words. The parser overlay requires only about 10k words.

On top of this, once the compiler runs, it needs space for symbol tables etc. Even with a
single-job monitor this space runs out fairly quickly. A solution to this problem, for RT-11,
was to let the parser additionally use that 4k words at the end of its overlay for symbol
tables etc.

I've put a copy of the modified CC.SAV compiler, along with AS.SAV, the assembler
up at https://github.com/rust11/rust/tree/master/kit as a logical disk, DECUSC.DSK,
which can also be mounted as a DY: disk. The modified version also includes some
bug fixes, support for "//" comments and for "size_t". I haven't had a problem with
memory exhaustion using this compiler for over a decade. That said, I use RUST/SJ
rather than RT-11, however the two systems are usually compatible.
 
Hi Ian
I am also trying to get to grips with the Decus C compiler here - I can't see the file DECUSC.DSK on your github - but there is DCC.DSK - is that it or am I missing anything?

I am running with TSX, so the compiler runs OK - no memory issues, but I cannot figure out how to use floating point operations on multiple terminals without it messing up - it runs fine on any single terminal, but it appears TSX doesn't save the FPU regs when it switches between processes...

Any basic code examples - especially with linked external functions and headers would be really useful to get started - as would any good documents, I have the Decus C docs and the DEC C manuals from bitsavers already - but they are pretty sketchy!

Any pointers or help would be really appreciated, thank you!

Robin
 
Robin

Yes, DCC.DSK has the package.

Are you using TSX or TSX-plus?

Are you using the DECUS-C compiler from DCC.DSK or an alternate distribution?

BTW: I've used TSX only a little.

TSX-plus requires that a program issue the RT-11 .SFPA program request to enable FPU register context switching.

1690566114954.png
1690566058527.png
http://bitsavers.org/pdf/dec/pdp11/tsxPlus/manuals_6.31/TSX-Plus_ProgrRef_Jan88.pdf

I don't know which DECUS-C compiler you're using at the moment. I made some changes to the DECUS-C compiler in my DCC.DSK package to automatically invoke .SFPA. I think the compiler already had some kind of similar mechanism that I improved or added to.

I'll have a look for some example C programs. In fact, I write my code in a different language that is then translated into C, so I don't have a lot of DECUS-C code here.

I'll look at these issues again tomorrow.


Ian
 
Hi Ian,
Many thanks for getting back to me - I'm sure I remember your name from back in the 80s - I was fixing PDP11 hardware then in the UK and doing a bit of Dibol programming for fun and work...

I have recently got a compatible (Baydel) Desktop system up and working with RT-11 V5.07 and TSX Plus V6.5, using TSX gets me multiuser editing and compiling for Dibol and C working, I have sorted the calling external functions in external libraries now,

These are my Decus CC compiler files:

1690568882874.png

I have previously done some C for microcontrollers mostly with Visual Code on ESP32, so this is a bit of a step back in time - but I have some great help..

Any updated / improved versions and documentation would be really useful though - especially if it shows how to use the .SPFA EMT, I am working towards nice little working demos of a multi-user system to get a PDP11 on display and working for visitors to use at a computer museum, so I'm looking for good hardware needing a home and getting back into writing software on the systems as well...

I will have a look in the DCC.DSK package, thank you!

Robin
 
Last edited:
Back
Top