General purpose computer loading into ROM

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

General purpose computer loading into ROM

w0051977
I have recently purchased the book.  It looks good.  I am currently looking at the CPU emulator here: http://www.nand2tetris.org/tutorials/PDF/CPU%20Emulator%20Tutorial.pdf.  Please see the screenshot below:



I don't understand why the assembly program is loaded into ROM.  From what I understand a general purpose computer does not load programs into ROM.  It loads programs into RAM.

If this was a microcontroller then that could be different, however it is not.  It is a general purpose computer.
Reply | Threaded
Open this post in threaded view
|

Re: General purpose computer loading into ROM

cadet1620
Administrator
w0051977 wrote
I don't understand why the assembly program is loaded into ROM.  From what I understand a general purpose computer does not load programs into ROM.  It loads programs into RAM.

If this was a microcontroller then that could be different, however it is not.  It is a general purpose computer.
It's not a general purpose computer; it's a very simple learning tool.

Having separate code and data memory allows for a very simple hardware implementation without having to deal with any conflicts with instructions and data requiring simultaneous access to the RAM.

Think of it as an early model of game console with the games on ROM cartridges and no way to download new games.

--Mark
Reply | Threaded
Open this post in threaded view
|

Re: General purpose computer loading into ROM

w0051977
Thanks.  Have I understood it correctly then? In the case of the Hack CPU: prgram instructions are loaded into ROM and data into RAM?
Reply | Threaded
Open this post in threaded view
|

Re: General purpose computer loading into ROM

cadet1620
Administrator
w0051977 wrote
Thanks.  Have I understood it correctly then? In the case of the Hack CPU: prgram instructions are loaded into ROM and data into RAM?
Yes.