[TUHS] Early Unix function calls: expensive?
imp at bsdimp.com
Wed Jan 6 04:03:35 AEST 2016
Back in the early days of my career, I saw MARK used once in
MACRO-11 to implement a switch statement. It was horrific and super
long compared to the code that replaced it a few months later. It was a
horrible abuse of the instruction, and the person who wrote the code
(not me) was just learning PDP-11 ropes at the time. The replacement
code was also faster. I doubt I'd ever have noticed if this code didn't
wind up in the hot path and attract the attention of the senior engineer
on the project. He was so horrified, he called us all together to go over
what the instruction actually did, and why it was such a bad idea.
On Tue, Jan 5, 2016 at 10:46 AM, Ronald Natalie <ron at ronnatalie.com> wrote:
> No, to my knowledge NO compiler I ever came across (I worked on the dark
> side DOS BATCH, RT-11, RSX-11, and RSTS-11 in various languages though
> primarily MACRO-11 and FORTRAN) ever used this linkage. Certainly, none
> of the UNIX products did. It was goofy. We played around with it and
> it just didn’t do anything you couldn’t do better with JSR/RET and some
> clever stack manipulation with MOV instructions.
> On Jan 5, 2016, at 12:43 PM, Clem Cole <clemc at ccc.com> wrote:
> On Tue, Jan 5, 2016 at 12:28 PM, Ronald Natalie <ron at ronnatalie.com>
>> I remember going to the T11 (PDP-11 on a single chip) announcement and
>> having them say the complete instruction set was supported with the
>> exception of MARK.
> right... which is why I don't think FTN use it, or the HW folks would
> have been forced to put it in.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the TUHS