how machine language code can be burned inside ROM ?
In unit 5.4, he says this about "plug-and-play ROM chips " : "we burn our code, the machine instructions code, into a RAM chip. We take this RAM chip, we plug it into the computer, we press the Reset button, and the computer will start executing this particular program."
Here I'm pretty sure he meant "into a ROM chip. We take this ROM chip".
But my question is, how the code can even get burned inside ROM chip ?
In my understanding, a ROM chip is prebuilt, hard-wired, so that the code cannot be changed.
Is he talking about a programmable ROM, one that can understand the Hack machine language ?
But if so, when the computer is shutdown, how does that ROM stores the program if power is off ?
Re: how machine language code can be burned inside ROM ?
Yes, he meant ROM.
Except for special applications, most modern microcomputers have programmable ROM. This ROM can be erased and reprogrammed by an external device, variously called a ROM programmer, or debug probe, etc.
On some microcomputers the microcomputer itself can erase and reprogram portions of its program ROM. Erasing and reprogramming ROM is very much slower than accessing RAM, and the programmable ROM has a limited number of erase/program cycles before is wears out.
The most common type is Flash memory, the same as in USB memory sticks.