Posted by
cdrh on
URL: http://nand2tetris-questions-and-answers-forum.52.s1.nabble.com/Problems-understanding-Hardware-Software-interface-tp4032625p4033032.html
Hi, I'm back again

. I have a different set of questions regarding this chapter, but I don't know if I should post in the same thread I have with different questions that aren't directly related. Anyways if you would like me to delete the reply and make a new thread, just let me know.
@10:15, unit 4.2, Noam talks about addressing modes. I understand the register part. I do not get direct and indirect addressing. He says “Sometimes we have
direct access to memory” what does that even mean? When would we not have direct access to memory? Moving forward, the picture shows R1 being added into M[200]. I’m assuming that it means the contents/data from R1 are being added to M[200]. Now he says “In which case we're telling the computer to directly address not just the register 1, but also a memory address that we just specified inside the command.” What does the term “directly address” mean? I’m sorry, but some of these terminologies are quite confusing to me because they are used synonymously and nebulously at times. And what are you accessing? The data of that cell or the address of that cell? From my understanding, it seems that "direct addressing" is when you take the data (not the address) from that RAM cell and write its value into the D-register. And "indirect addressing" is you have to read the address of that RAM cell FIRST, and now you can write the its value into the D-register. Am I correct? @ 7:01, unit 4.6, Noam is showing examples of typical operations. I’m confused at RAM[17] = 10. How does the machine acquire the constant 10? I thought doing @10 means A = RAM[10], and subsequently makes M = RAM[10], meaning that it’s just the
address location. How is it pulling a raw value constant? I'm guessing it's already there from the instruction set of the HACK architecture.
Question about I/O devices. In the lecture, Noam talks about the screen memory map, and he says its designated in the RAM. So when you go out and buy RAM, is there a certain section within the memory that is designated for the screen memory map? Or…. is there is some kind of ROM inside the monitor that has the screen memory map? Then, once you plug it into the motherboard/GPU/computer, it’ll write its screen memory map to the RAM. Which is the correct understanding?
Off topic, in unit 4.5 @ 6:02, he talks about the screen memory map being 256 by 512, b/w, meaning there are 256*512=131,072 total pixels. I think there’s a mistake because he said it was 13,000. Just pointing that out if you guys want to fix that.
In unit 4.6 @ 9:20, Noam shows that the program is being stored/written into the instruction memory, the ROM. I’m confused here because I thought you can’t write to the ROM and you can only read from it. So from my understanding, the ROM structure (architecture) is similar to RAM with the difference being RAM has cells that are empty and ROM has cells that pre-loaded with the defined instruction set. My understanding is that the program that Noam showed would be loaded into RAM, and the ROM is basically used as a way for the CPU to translate symbolic to binary. This is definitely a wrong understanding, so please correct me. Does the ROM also include the assembler? Agh…… I’m so lost here.