On 6/18/2026 1:13 PM, Van Snyder via cctalk wrote:
On Thu, 2026-06-18 at 15:38 +0800, Tom Hunter via
cctalk wrote:
You missed the point. The compiler backend is
emitting assembly code,
so
you better have a very good understanding of the underlying hardware
and
the assembly language for the machine to successfully write a
compiler
backend for the architecture in question.
The IBM 1401 COBOL compiler wrote assembler (Autocoder) on a tape. Then
you had to mount the Autocoder assembler tape and assemble it. And it
included the input COBOL code as Autocoder comments.
Interesting. I did Autocoder but never thought of it as assembler.
Programming the 1401 in assembler was when you took the output from
an Autocder deck and hand optimized it to a single card. :-)
As for translating from one language to another, that was pretty much
standard practice for a long time. GNAT Ada produced C. P2C converted
Pascal to C. F2C the same for Fortran. Early precursors of GNU COBOL
did the same. Assembler knowledge is not necessarily needed to write
a compiler if you have another language to function as the intermediate
stage of the compiler.
bill