Discussion:
[Simh] PDP-11 MARK
dave porter
2018-08-02 00:26:21 UTC
Permalink
Not really a simh question, but this might be an appropriate
bunch of people. What actually used MARK on PDP-11?

I think I recall that some Fortran system (F4P?) used it,
but that's a vague feeling at most.

Certainly as a Macro-11 kernel-mode weenie, I never
felt the need.
Johnny Billquist
2018-08-02 01:06:47 UTC
Permalink
Post by dave porter
Not really a simh question, but this might be an appropriate
bunch of people.  What actually used MARK on PDP-11?
I think I recall that some Fortran system (F4P?) used it,
but that's a vague feeling at most.
Certainly as a Macro-11 kernel-mode weenie, I never
felt the need.
As far as I know, nothing used MARK.
It's ugly in that it requires that I-space and D-space overlap, at least
for the stack, for it to work.
I once heard a rumor that DEC only came up with it to extend some
copyright or patent a few more years, but I'm not sure there is much
truth in that.
Anyway, it was an attempt at having a return mechanism for routines that
cleaned up the stack, in a time where you did not have a frame pointer.

Johnny
--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: ***@softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol
Paul Koning
2018-08-02 13:12:16 UTC
Permalink
Post by Johnny Billquist
Post by dave porter
Not really a simh question, but this might be an appropriate
bunch of people. What actually used MARK on PDP-11?
I think I recall that some Fortran system (F4P?) used it,
but that's a vague feeling at most.
Certainly as a Macro-11 kernel-mode weenie, I never
felt the need.
As far as I know, nothing used MARK.
I believe that is correct.
Post by Johnny Billquist
It's ugly in that it requires that I-space and D-space overlap, at least for the stack, for it to work.
And you have to execute the stack, which is a weird thing for programs to do in any case.
Post by Johnny Billquist
I once heard a rumor that DEC only came up with it to extend some copyright or patent a few more years, but I'm not sure there is much truth in that.
I've had some discussions around DEC with people who knew about MARK, but that particular rumor does not sound at all familiar.
Post by Johnny Billquist
Anyway, it was an attempt at having a return mechanism for routines that cleaned up the stack, in a time where you did not have a frame pointer.
Yes. But the cost (time and space) of pushing the right MARK onto the stack is likely comparable to the cost of simply cleaning up the stack explicitly, without any of the mess associated with that instruction.

paul
Rhialto
2018-08-02 20:00:05 UTC
Permalink
Post by Paul Koning
I believe that is correct.
Most overviews of the instruction set do not even explain what it does.
I only found it in the older ones, such as in the PDP 11-40 Processor
Handbook (page 4-61, pdf page 107).

-Olaf.
--
___ Olaf 'Rhialto' Seibert -- Wayland: Those who don't understand X
\X/ rhialto/at/falu.nl -- are condemned to reinvent it. Poorly.
Bob Eager
2018-08-02 20:25:47 UTC
Permalink
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On Thu, 2 Aug 2018 22:00:05 +0200
Post by Rhialto
Most overviews of the instruction set do not even explain what it
does. I only found it in the older ones, such as in the PDP 11-40
Processor Handbook (page 4-61, pdf page 107).
I remember considering using it when writing a compiler for the 11. In
the end I decided it was more trouble than it was worth.
Paul Koning
2018-08-02 20:40:02 UTC
Permalink
Post by Bob Eager
On Thu, 2 Aug 2018 22:00:05 +0200
Post by Rhialto
Most overviews of the instruction set do not even explain what it
does. I only found it in the older ones, such as in the PDP 11-40
Processor Handbook (page 4-61, pdf page 107).
I remember considering using it when writing a compiler for the 11. In
the end I decided it was more trouble than it was worth.
I came to the same conclusion when I was looking at it the other day, while working on the gcc back-end for pdp11.

paul
Johnny Billquist
2018-08-05 22:55:37 UTC
Permalink
Post by Paul Koning
Post by Johnny Billquist
Post by dave porter
Not really a simh question, but this might be an appropriate
bunch of people. What actually used MARK on PDP-11?
I think I recall that some Fortran system (F4P?) used it,
but that's a vague feeling at most.
Certainly as a Macro-11 kernel-mode weenie, I never
felt the need.
As far as I know, nothing used MARK.
I believe that is correct.
Post by Johnny Billquist
It's ugly in that it requires that I-space and D-space overlap, at least for the stack, for it to work.
And you have to execute the stack, which is a weird thing for programs to do in any case.
Yes.
Post by Paul Koning
Post by Johnny Billquist
I once heard a rumor that DEC only came up with it to extend some copyright or patent a few more years, but I'm not sure there is much truth in that.
I've had some discussions around DEC with people who knew about MARK, but that particular rumor does not sound at all familiar.
Like I said, I'm not sure I put much worth into it.
I don't recall the exact conspiracy theory behind it, but essentially
went along the path of this extension allowed DEC to put a new patent
in, which extended the protection of the architecture for another few
years. But it might also have been more generally related to the EIS.
Can't remember for sure, and I have no recollection where I read it.
Post by Paul Koning
Post by Johnny Billquist
Anyway, it was an attempt at having a return mechanism for routines that cleaned up the stack, in a time where you did not have a frame pointer.
Yes. But the cost (time and space) of pushing the right MARK onto the stack is likely comparable to the cost of simply cleaning up the stack explicitly, without any of the mess associated with that instruction.
The one advantage of MARK is that you don't have to know how much stuff
have been put on the stack in the local routine before leaving. All that
is implicitly cleaned up through the use of the MARK.

But it's definitely not worth it, since you have to sacrifice quite a
lot of potential separate I-space for it, along with forcing you to use
R5 a bit special as well.

Johnny
--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: ***@softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol
Leo Broukhis
2018-08-07 08:15:33 UTC
Permalink
It would have been nice of you, Dave Porter, to include a link to the
source of inspiration for your question:

https://retrocomputing.stackexchange.com/q/7056/4025

Leo
Post by dave porter
Not really a simh question, but this might be an appropriate
bunch of people. What actually used MARK on PDP-11?
I think I recall that some Fortran system (F4P?) used it,
but that's a vague feeling at most.
Certainly as a Macro-11 kernel-mode weenie, I never
felt the need.
_______________________________________________
Simh mailing list
http://mailman.trailing-edge.com/mailman/listinfo/simh
Loading...