¿ªÔÆÌåÓý

Re: Can a VM machine ...


 

David Durand wrote:

From an emulation point of view, the current behavior is
reasonable, since the actual action of a diagnose instruction
executed in supervisor mode is completely undefined, and could
even potentially disable the hardware (as it seems that some
models may have allowed diagnose to change the microprogram
control store).
Quite true.


However it's not required. Faithful implementation seems
impossible: There is little if any available documentation
about what DIAG did on different models,
That's why IBM says not to use it: unless you code VERY carefully (check you model, etc) you can't be sure of what it'll do. The same DIAG instruction on one model would very likely behave MUCH differently on a different model. DIAG is basically "IBM's instruction" and not one that its customers were meant to use. It was basically designed (originally) for "IBM use only".


and I suspect that there are very few (if any) surviving programs
where DIAG is used for anything other than communicating with CP.
I'm not so sure. I suspect they're probably are. Hercules for instance supports two different "Power Off" diagnose instructions: one for the 9221 and the other for 4361 and 937X (e.g. 9371).


Given that, I think an argument could be made that Hercules can
just as well print a message on the console when DIAG is executed
in supervisor state, rather than signalling an exception. This
would amount to treating Hercules as a new model,
Hercules is ALREADY a "new model". Hercules is a Hercules model mainframe. It's its own unique model of mainframe, unlike any other.


and defining DIAG for that model in a "harmless", potentially
helpful way. The Hercules console function has to be optional
for security reasons, but if the conditions are met for the
CP DIAGNOSE '008' case, the option could choose between printing
a message (DISABLED HERCULES CONSOLE REQUEST IGNORED: 'command',
and the current extension.
I believe the DIAG8CMD option already covers that. But instead of a "request ignored" message, you get an Operation Exception Program Interrupt. (Or is it a Specification Exception? I forget!)


Depending on what assumptions are made by the implementation of
HCP, it might make sense to alter registers to reflect failure.
Since the architecture allows anything, and requires nothing,
the Hercules behavior of DIAG could be defined in a way that
would not break HCP, if present.
I guess I'm coming to this party late. What exactly is the problem (issue) again?

--
"Fish" (David B. Trout)
Software Development Laboratories

mail: fish@...

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