This is an old revision of the document!
Notes, scratchspace, and collaborative wiki for our endeavors in HPC Systems and Networking
As mentioned, there are commonly 4 methods of addressing, which we will find CPUs break out separate instruction variations for:
Due to the script-centric nature of the simulator, for our core ALU functionality, we really don't need to implement these specific actions… we can merely create temporary register files, loading any of this data in and then doing the register-to-register operation; but for practice individuals can choose to implement this functionality (like having an add.sh for reg-to-reg, addimm.sh for immediate, addmem.sh for memory interaction, and addind.sh for indirection).
Also, if context is unclear, always assume a register is the medium to be used.
Functionality that needs to be implemented:
The datamanip/ directory will contain helper programs/scripts to aid us to juggling data around, both for our interacting-with-simulator uses, but also core CPU functionality that just focuses an data manipulation, but may not otherwise invoke ALU functionality (like adjusting flags register)
Functionality related to memory (RAM/ROM), which the CPU treats as external and non-primary storage.
It is stored in a binary file (in an attempt to conceptually distinguish it from the “easy-to-read” ASCII-ized binary of our registers), so we have to access it in more specific ways
The point of memget/memput is that all other simulator functions needing to interact with memory should rely on these to do their heavy lifting. Nothing else should touch memory but these. Everything else that needs it uses these scripts.
Utility scripts related to registers.
The sim/ directory is for the runtime of the configured machine in question (our 6502 CPU + related hardware components, including any “software” we wish to run on them).
It consists of several subdirectories:
To acclimate everyone, we will be covering the basics, and attempting to provide everyone with ample opportunities to have a hand in helping to implement core simulator functionality.
Sort of the tinderbox approach (exposure to ideas that may spark understanding)
Each week we may stop and focus on a particular aspect of the simulator (such as take an instruction, and suss out what needs to happen for it to work).
The general trend is that this stuff is so stupidly simple and obvious it is hard to comprehend just how simple and obvious it is. We are used to things being far more complex.
That is one of the things I love about Computer Organization / this project… I get to see people experiencing those moments of clarity, and slowly realizing more and more what is going on (the stark simplicity, but vast redundancy of the whole thing).