There are three ways to interpret what you are asking for: Once you have that, writing a simple compiler is pretty straightforward, and then you use the simple compiler to build larger, better ones.
These very small programs are then used to build larger programs, building up to a native assembler. This (or some variant) is how all new hardware gets it's first, very small, programs entered. Allen then wrote a small machine code tape loader, which he entered using the target machine's (the Altair) front panel.Ī front panel is a bunch of switches which allows you to enter machine code instructions directly into memory. For example, Bill Gates and Paul Allen wrote their first version of MS Basic (which was targeted at 8080 chips) on a DecSystem-10 mainframe, and punched the machine code for it onto paper tape. To answer your underlying question, compilers are normally written on machines for which a compiler or interpreter already exists.