←back to thread

414 points henry_flower | 2 comments | | HN request time: 0s | source
Show context
digitalsushi ◴[] No.43108644[source]
Spock levels of fascinating from me. I want to learn how to compile a pdp11 emulator on my mac.
replies(4): >>43108726 #>>43108732 #>>43108743 #>>43109755 #
snovymgodym ◴[] No.43108726[source]
https://opensimh.org/

Works great on Apple Silicon

replies(1): >>43108833 #
haunter ◴[] No.43108833[source]
What’s the difference between an emulator and a simulator in this context?
replies(3): >>43108965 #>>43108980 #>>43119814 #
o11c ◴[] No.43108980[source]
In theory, an emulator is oriented around producing a result (this may mean making acceptable compromises), whereas a simulator is oriented around inspection of state (this usually means being exact).

In practice the terms are often conflated.

replies(2): >>43110169 #>>43111430 #
codr7 ◴[] No.43110169[source]
The difference is about as crystal clear as compiler/interpreter.
replies(1): >>43116620 #
Imustaskforhelp ◴[] No.43116620[source]
compiler creates a binary in elf format or other format which can be run given a shared object exists.

Intepreter either writes it in bytecode and then executes the bytecode line by line ?

Atleast that is what I believe the difference is , care to elaborate , is there some hidden joke of compiler vs intepreter that I don't know about ?

replies(3): >>43117570 #>>43119591 #>>43119624 #
1. amszmidt ◴[] No.43119591[source]
An interpreter runs the code as it is being read in.

A compiler processes the code and provides an intermediate result which is then "interpreted" by the machine.

So to take the "writes it in byte code" -- that is a compiler. "executes the byte code" -- is the interpreter.

If byte code is "machine code" or not, is really secondary.

replies(1): >>43124450 #
2. Imustaskforhelp ◴[] No.43124450[source]
Then isn't theoretically all languages assembly intepreters in the endd