That's not what I was talking about.  You can certainly write a code generator 
in a high level language, and most are done that way.  But you can't create a 
code generator unless you understand the assembly language (or, I suppose, 
technicallly speaking the machine language) of the target machine.  And 
furthermore, you have to understand it quite deeply to create the correct 
machine-specific optimization.  For example, iin GCC the pipeline description 
is written in a high level language, and the code generation framework uses 
that to make instruction scheduling decisions.  But you can't write that 
pipeline description unless you understand the instruction scheduling 
properties of the target machine.

        paul

> On Jun 17, 2026, at 2:15 PM, Mike Katz via cctalk <[email protected]> 
> wrote:
> 
> I'm sorry but I beg to differ with your, it is entirely possible to write the 
> code generator for a compiler in a high level language. Most C-compilers are 
> written that way.
> 
> The initial after reset code may need to be written in assembler to properly 
> setup some registers prior to the run time system for the high level language 
> (stack, interrupt masks, cache initialization, etc.).
> 
> On 6/17/2026 12:55 PM, Paul Koning via cctalk wrote:
>> 
>>> On Jun 17, 2026, at 11:55 AM, Mark Green via cctalk <[email protected]> 
>>> wrote:
>>> 
>>> I recently reviewed a college program that had a COBOL course. It’s not 
>>> quite dead in academia.
>> Speaking of academia: clearly any "academic" who claims Assembler is dead is 
>> unqualified for the job.  It may be true that not very much application code 
>> is written in assembler.  But it should be obvious that competence in 
>> assembler is absolutely necessary in order to build a compiler -- in 
>> particular, a compiler back-end.
>> 
>>      paul
> 

Reply via email to