RSX11M DECUS C Compiler

108 views
Skip to first unread message

isy...@gmail.com

unread,
Mar 8, 2023, 10:51:26 AM3/8/23
to [PiDP-11]
Hi All,

 Another question for the RSX11M experts in relation to the DECUS C Compiler.
Possibly better labelled: PDP11 C Compiler (PDP-11 C Guide to PDP-11 C (uu.se))
This is an old chestnut and soooo OS specific. Does anyone know how to a. implement kbhit() b. set getchar() to return single characters without pressing enter and c. turn off local echo?????
I have a very nasty fix for RT11 C if anyone wants a copy..... 

Regards, Ian.
 

Johnny Billquist

unread,
Mar 8, 2023, 1:13:46 PM3/8/23
to pid...@googlegroups.com
If you want/need single character input, you need to step outside of C.
I have a few MACRO-11 routines that are callable from DECUS C for that
purpose. I can dig them up if you can't figure it out yourself. ;-)

However, the manual that you linked to is not the DECUS C compiler, but
the DEC ANSI C compiler. Two completely different compilers...
But I have routines for that one as well...

Johnny

On 2023-03-08 16:51, isy...@gmail.com wrote:
> Hi All,
>
>  Another question for the RSX11M experts in relation to the DECUSC
> Compiler.
> Possibly better labelled: PDP11 C Compiler (PDP-11 C Guide to PDP-11 C
> (uu.se) <http://cookie.update.uu.se/manuals/layered/pdp11c3.pdf>)
> This is an old chestnut and soooo OS specific. Does anyone know how to
> a. implement kbhit() b. set getchar() to return single characters
> without pressing enter and c. turn off local echo?????
> I have a very nasty fix for RT11 C if anyone wants a copy.....
>
> Regards, Ian.
>
> --
> You received this message because you are subscribed to the Google
> Groups "[PiDP-11]" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to pidp-11+u...@googlegroups.com
> <mailto:pidp-11+u...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pidp-11/b30724d2-425a-496d-a608-0a6aaa7de15cn%40googlegroups.com <https://groups.google.com/d/msgid/pidp-11/b30724d2-425a-496d-a608-0a6aaa7de15cn%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: b...@softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol

isy...@gmail.com

unread,
Mar 9, 2023, 6:49:38 AM3/9/23
to [PiDP-11]
Hi Johnny,

 Thanks. I am having some problem identifying the installed compiler. I think it is the DECUS version.
 If you could send some routines to try that would be great as then I don't need to:
 a. Go through the rigmarole of determining the format of the calling stack frame. As luck would have it there is an interface example in QOPEN.MAC for the RT11 compiler.
 b. Fathom out which RSX terminal I/O library calls to use. (Under RT11, I directly manipulate the KL11 registers. Not entirely socially acceptable but RT11 is basically a single task/console system).

Regards, Ian.

Johnny Billquist

unread,
Mar 9, 2023, 6:53:24 AM3/9/23
to pid...@googlegroups.com
Hi. The DECUS C compiler can easily be identified.
If it understands the -h switch, then it's DECUS C. Like this:

.xcc -h
-a: Auto-spawn AS -n: Disable inline EIS
-b: Brief error messages -p: Compile profiling code
-d: Double floating default -r: #define rsts
-e: Enable inline EIS -t: Generate symbol tables
-f: Single floating default -w: Suppress 'no use' warning
-h: Help - give this display -x: Support: display phase
-l: Show code trees in .S file timings; keep temp. files
-m: Bypass preprocessor -z: DEBUG, trap phase entry
?CC-W-1 compilation error(s), no .S file written

The DEC PDP-11 C on the other hand don't have any help, but if you throw
something unknown to it, it looks like this:

.ccc /version
%PDP11C-E-CLP_UNK_QUAL, Unknown QUALIFIER name
\/VERSION\
Message summary: Informational 0 Warning 0 Error 1


Now, if you can tell me which C compiler we're talking about, I can give
you the routines.

Johnny
> > (uu.se <http://uu.se>)
> <http://cookie.update.uu.se/manuals/layered/pdp11c3.pdf
> <http://cookie.update.uu.se/manuals/layered/pdp11c3.pdf>>)
> > This is an old chestnut and soooo OS specific. Does anyone know
> how to
> > a. implement kbhit() b. set getchar() to return single characters
> > without pressing enter and c. turn off local echo?????
> > I have a very nasty fix for RT11 C if anyone wants a copy.....
> >
> > Regards, Ian.
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "[PiDP-11]" group.
> > To unsubscribe from this group and stop receiving emails from it,
> send
> > an email to pidp-11+u...@googlegroups.com
> > <mailto:pidp-11+u...@googlegroups.com>.
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/pidp-11/b30724d2-425a-496d-a608-0a6aaa7de15cn%40googlegroups.com <https://groups.google.com/d/msgid/pidp-11/b30724d2-425a-496d-a608-0a6aaa7de15cn%40googlegroups.com> <https://groups.google.com/d/msgid/pidp-11/b30724d2-425a-496d-a608-0a6aaa7de15cn%40googlegroups.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/pidp-11/b30724d2-425a-496d-a608-0a6aaa7de15cn%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>
> --
> Johnny Billquist || "I'm on a bus
> || on a psychedelic trip
> email: b...@softjar.se || Reading murder books
> pdp is alive! || tryin' to stay hip" - B. Idol
>
> --
> You received this message because you are subscribed to the Google
> Groups "[PiDP-11]" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to pidp-11+u...@googlegroups.com
> <mailto:pidp-11+u...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pidp-11/fae38dac-9ebb-47d0-abfa-997ddc626185n%40googlegroups.com <https://groups.google.com/d/msgid/pidp-11/fae38dac-9ebb-47d0-abfa-997ddc626185n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Johnny Billquist

unread,
Mar 9, 2023, 10:01:21 AM3/9/23
to pid...@googlegroups.com
Meh. Threw together a very small c program to demonstrate the usage of
these routines, and a version for DECUS C, and one for DEC C of the
functions.

Attached to this mail.

I hope they are more or less self explanatory, but otherwise just ask.

Johnny

On 2023-03-09 12:49, isy...@gmail.com wrote:
> <http://cookie.update.uu.se/manuals/layered/pdp11c3.pdf>>)
> > This is an old chestnut and soooo OS specific. Does anyone know
> how to
> > a. implement kbhit() b. set getchar() to return single characters
> > without pressing enter and c. turn off local echo?????
> > I have a very nasty fix for RT11 C if anyone wants a copy.....
> >
> > Regards, Ian.
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "[PiDP-11]" group.
> > To unsubscribe from this group and stop receiving emails from it,
> send
> > an email to pidp-11+u...@googlegroups.com
> > <mailto:pidp-11+u...@googlegroups.com>.
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/pidp-11/b30724d2-425a-496d-a608-0a6aaa7de15cn%40googlegroups.com <https://groups.google.com/d/msgid/pidp-11/b30724d2-425a-496d-a608-0a6aaa7de15cn%40googlegroups.com> <https://groups.google.com/d/msgid/pidp-11/b30724d2-425a-496d-a608-0a6aaa7de15cn%40googlegroups.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/pidp-11/b30724d2-425a-496d-a608-0a6aaa7de15cn%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>
> --
> Johnny Billquist || "I'm on a bus
> || on a psychedelic trip
> email: b...@softjar.se || Reading murder books
> pdp is alive! || tryin' to stay hip" - B. Idol
>
> --
> You received this message because you are subscribed to the Google
> Groups "[PiDP-11]" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to pidp-11+u...@googlegroups.com
> <mailto:pidp-11+u...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pidp-11/fae38dac-9ebb-47d0-abfa-997ddc626185n%40googlegroups.com <https://groups.google.com/d/msgid/pidp-11/fae38dac-9ebb-47d0-abfa-997ddc626185n%40googlegroups.com?utm_medium=email&utm_source=footer>.
deckey.mac
decuskey.mac
testg.c

isy...@gmail.com

unread,
Mar 9, 2023, 5:05:01 PM3/9/23
to [PiDP-11]
Hi Johnny,

 Very helpful. I do have the DEC PDP11 C compiler. Got that wrong! Will try your deckey.mac module.
 I did get as far as finding QIO$ stuff in the lib docs but an example is so much easier.
 I assume I will need to use the TMO bit as well. Will try....

Regards, Ian.

Johnny Billquist

unread,
Mar 9, 2023, 5:39:46 PM3/9/23
to pid...@googlegroups.com
If you want to have a timeout then yes, TF.TMO should be added, along
with an actual timeout given as a parameter. Note that TF.TMO timeout is
in units of 10s.

Johnny
> > > (uu.se <http://uu.se> <http://uu.se <http://uu.se>>)
> > <http://cookie.update.uu.se/manuals/layered/pdp11c3.pdf
> <http://cookie.update.uu.se/manuals/layered/pdp11c3.pdf>
> > <http://cookie.update.uu.se/manuals/layered/pdp11c3.pdf
> <http://cookie.update.uu.se/manuals/layered/pdp11c3.pdf>>>)
> > > This is an old chestnut and soooo OS specific. Does anyone know
> > how to
> > > a. implement kbhit() b. set getchar() to return single characters
> > > without pressing enter and c. turn off local echo?????
> > > I have a very nasty fix for RT11 C if anyone wants a copy.....
> > >
> > > Regards, Ian.
> > >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "[PiDP-11]" group.
> > > To unsubscribe from this group and stop receiving emails from it,
> > send
> > > an email to pidp-11+u...@googlegroups.com
> > > <mailto:pidp-11+u...@googlegroups.com>.
> > > To view this discussion on the web visit
> > >
> >
> https://groups.google.com/d/msgid/pidp-11/b30724d2-425a-496d-a608-0a6aaa7de15cn%40googlegroups.com <https://groups.google.com/d/msgid/pidp-11/b30724d2-425a-496d-a608-0a6aaa7de15cn%40googlegroups.com> <https://groups.google.com/d/msgid/pidp-11/b30724d2-425a-496d-a608-0a6aaa7de15cn%40googlegroups.com <https://groups.google.com/d/msgid/pidp-11/b30724d2-425a-496d-a608-0a6aaa7de15cn%40googlegroups.com>> <https://groups.google.com/d/msgid/pidp-11/b30724d2-425a-496d-a608-0a6aaa7de15cn%40googlegroups.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/pidp-11/b30724d2-425a-496d-a608-0a6aaa7de15cn%40googlegroups.com?utm_medium=email&utm_source=footer> <https://groups.google.com/d/msgid/pidp-11/b30724d2-425a-496d-a608-0a6aaa7de15cn%40googlegroups.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/pidp-11/b30724d2-425a-496d-a608-0a6aaa7de15cn%40googlegroups.com?utm_medium=email&utm_source=footer>>>.
> >
> > --
> > Johnny Billquist || "I'm on a bus
> > || on a psychedelic trip
> > email: b...@softjar.se || Reading murder books
> > pdp is alive! || tryin' to stay hip" - B. Idol
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "[PiDP-11]" group.
> > To unsubscribe from this group and stop receiving emails from it,
> send
> > an email to pidp-11+u...@googlegroups.com
> > <mailto:pidp-11+u...@googlegroups.com>.
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/pidp-11/fae38dac-9ebb-47d0-abfa-997ddc626185n%40googlegroups.com <https://groups.google.com/d/msgid/pidp-11/fae38dac-9ebb-47d0-abfa-997ddc626185n%40googlegroups.com> <https://groups.google.com/d/msgid/pidp-11/fae38dac-9ebb-47d0-abfa-997ddc626185n%40googlegroups.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/pidp-11/fae38dac-9ebb-47d0-abfa-997ddc626185n%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>
> --
> Johnny Billquist || "I'm on a bus
> || on a psychedelic trip
> email: b...@softjar.se || Reading murder books
> pdp is alive! || tryin' to stay hip" - B. Idol
>
> --
> You received this message because you are subscribed to the Google
> Groups "[PiDP-11]" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to pidp-11+u...@googlegroups.com
> <mailto:pidp-11+u...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pidp-11/9b835379-6302-4e41-92d2-0ba024b5c32bn%40googlegroups.com <https://groups.google.com/d/msgid/pidp-11/9b835379-6302-4e41-92d2-0ba024b5c32bn%40googlegroups.com?utm_medium=email&utm_source=footer>.

isy...@gmail.com

unread,
Mar 10, 2023, 12:06:59 PM3/10/23
to [PiDP-11]
Hi Johnny,

 Thanks again for the guidance. I have attached an updated decuskey.mac that does kbhit() as per Microsoft C. Hope it is of use to someone.
 App now working....

BW, Ian.
deckey.mac
Reply all
Reply to author
Forward
0 new messages