I'm reviewing and updating the verification suite for my w11 FPGA project. And stumbled again over the MARK instruction. This instruction is as ugly as it is useless (will not work with I/D space enabled). I really wonder why it was added to the instruction set at all. MARK adds nothing which couldn't be done with the basic instruction set. Does anybody know why MARK was added and whether it was ever used by DEC ? Just for curiosity.
I guess you know the story/speculation that it was added (among some
other things) to enable DEC to extend some patent or whatever, to
protect the PDP-11 from being cloned for a while longer?
Apart from that, one could of course speculate that it was an attempt at making function call return cleanup automated in a "nice" way. But as
you observe, the MARK instruction is as ugle as it is useless. I don't
know of any software that ever used it.
I really can't come up with a single argument in favor of this instruction.
On Tuesday, July 19, 2022 at 11:05:50 AM UTC+2, Johnny Billquist wrote:
I guess you know the story/speculation that it was added (among some
other things) to enable DEC to extend some patent or whatever, to
protect the PDP-11 from being cloned for a while longer?
No, I didn't know about that story/speculation.Do you have a URL to a source where this is discussed ?
Apart from that, one could of course speculate that it was an attempt at
making function call return cleanup automated in a "nice" way. But as
you observe, the MARK instruction is as ugle as it is useless. I don't
know of any software that ever used it.
The MARK is pushed by the caller to the stack. The caller could do an "ADD #2*NPAR, SP" as well.
I really can't come up with a single argument in favor of this instruction. So as you said, the deeper reason is most likely non-technical.
That could require some digging. I might try to find references when I have some time...
Um. No. MARK is about cleanup, not making space on the stack. Not sure
if you've read the full explanation of the instruction and how it was/is supposed to be used. But here is an example (from a manual):
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 63 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 492971:07:11 |
| Calls: | 840 |
| Files: | 1,301 |
| D/L today: |
10 files (28,220K bytes) |
| Messages: | 264,285 |