¿ªÔÆÌåÓý

Re: Program Interrupts (signals)


 

¿ªÔÆÌåÓý

Bob,

?

Well a few reasons for using ¡°C¡±. First is we have a decent ¡°C¡± compiler and when I last used a mainframe the thing that stopped us using ¡°C¡± was the dreadful SAS ¡°C¡± compiler.

Its better than ¡°B¡± and any way we don¡¯t have a ¡°B¡± compiler. Bell Labs had a ¡°C¡± compiler, but it appears lost.

Of course the main reason we use ¡°C¡± is because we can deliver working code more quickly than we could in assembler, and re-use existing code as was done with BREXX.

However given the issues with BREXX perhaps its time for a re-write in assembler¡­

¡­ oh and DIAG works because you are running in real problem state, allowing CP to gain control. Pretty sure DIAG in a VM works regardless of the virtual supervisor state

?

Dave

?

?

From: [email protected] <[email protected]> On Behalf Of Bob Polmanter
Sent: 22 April 2020 23:57
To: [email protected]
Subject: Re: [h390-vm] Program Interrupts (signals)

?

Adrian,

Presumably they chained the PSWs so that the injected one only did what it needed to do and "called" the official CMS new PSW for anything it did not understand? Otherwise you have a massive job! Any examples?

So under problem mode can you really manipulate the PSW in this way? Or do I have to change mode and is that possible in CMS, etc etc

In a virtual machine, CMS runs in supervisor state so you can alter the PSW or any storage area you like.? Of course you need to know what you are doing and which specialized instructions to use.


As for examples, I don't have one immediately handy.? I could create an example or write you a program check interrupt handler.? But what would be the point?? You really couldn't use it for an effective purpose.? It would not be able to be used for example to recover from an abend in your C code.? You say you just want to be notified that an abend occurred, but how exactly?? I don't know if your level of C can throw exceptions but if it could, how would that be invoked by the essentially asynchronous process of an interruption?? What you lack in assembler knowledge to do your own handler is equivalent to what I lack in C knowledge to know how I could invoke from assembler whatever C routine is needed to throw the exception into your world.

As I am sure you are aware of by now, I'm obviously in favor of using assembler, but it is not my place to tell you what programming language you should be using.? But I would ask you to consider this:? why would you want to use C on a mainframe system from the 1970s?? You can write all the C and Java you want on a PC; they are better suited for it.? Why use this old and dated platform at all unless you have some special interest in it?? So my point then is that you use something relevant to that platform.? Learn the mainframe, not C.? If you don't want to use assembler then use Cobol or PL/I or whatever from that era, and really learn the intricacies of CMS and mainframe programming.? If you're into programming on this platform, isn't that the real point of using VM/CMS?

Regards,
Bob

?

Join [email protected] to automatically receive all group messages.