← Back to context

Comment by uecker

2 hours ago

I do not think that pre- and postincrement operator being inspired by PDP-11 has anything to with fundamental system design questions.

> Q. How do you port an OS from one language to a new one, pre-LLM?

A. you reduce impedance mismatch, but making the new language using similar concepts and mechanisms

--

You're right, this table is just a coincidence, probably derived from the standard math notation, and used in many PLs like FORTRAN and Python ;)

  PDP-11        C
  
  INC R         ++i
  DEC R         --i
  ADD src, dst  dst += src
  SUB src, dst  dst -= src

  (R)+          *p++
  -(R)          *--p
  X(R)          p[x]
  @(R)+         **pp++
  @X(R)         *p[x]

  BR label      goto label  ; near jump
  JMP label     goto label  ; far jump

  • I do not disagree with the point that some superficial aspects are inspired by the PDP-11, I disagree with that this has anything to do with the fundamentals of computing architecture.

    It would also completely contradict the whole idea that everything today simulates the PDP-11 design because of C, as few architectures have this auto-in/decrement addressing modes despite C having native syntax.