The Computer Meditation

  1. The program counter is set to hold the value 0 which contains the MODE instruction, which sets our machine to be in execute mode 0.
  2. While not being provided any kind of other instructions the program counter will increment indefinitely, will decode each number it is looking at while the execution mode is set. It will continue to accept each thing it sees as an instruction assuming it is valid. If it hits an invalid instruction, it will simply fault, and die, given we do not have any exception handling yet.
  3. It will hit a READ instruction on the port 0, and store the result at some unreserved position in our memory. Port 0 is reserved for a keyboard, and the machine will pause until this operation is complete.
  4. Because we do not have any other ways to store some kind of counter for our string display, we will reserve another unreserved address to serve as a counter… and we will need to add an instruction …
  1. Instructions decimal 7, 8 will be the instructions SUB, ADD
  2. The next thing we want is the accumulator which is a register that again just stores something. We will call the accumulator ACCUMULATOR.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store