This page is still under construction.
Before you go and grab that screwdriver lets make it clear that we are going to attempt to build the computer through the method of software simulation. The idea is to simulate the functioning of a processor. Our program will be the processor and will illustrate how it interacts with the other components that make a computer - namely memory and IO (input/output).
The processor will support a few basic functions (called "instructions") that handle the interaction between itself and the memory, keyboard and monitor. Being a simulation, we have occasion to represent such interaction in a handsome manner through the use of GUI components (windows, edit boxes, buttons etc.,). If you are wondering what the "DooDoo" in the title of this page means, well that is what we will call our computer - "DooDoo"!
DooDoo is composed of the following components,
System Memory
Our computer will have a total of 100 words of memory, each word being 2 bytes in length. This means that all that our computer will have in terms of memory is a measly 200 bytes! Also, to keep things simple we will allow the storage of numbers upto 9999 only in memory. The memory is represented in the program by an array of 100 integers.
Each location in the address space is identified by its index. Therefore, memory location number 1 would be addressed "0000", memory location number 2 would be addressed "0001" and so on upto "0099".
Register Memory
The register is composed of,
DooDoo Instructions
The various operations supported by DooDoo have been tabulated below,
Operation Code | Operation | Description | Example |
10 | READ | Read a word of data from the keyboard to the memory location supplied as the operand. In our simulation this will cause an input-box to be displayed prompting the user for input. | 1015 - Read data into memory location 15 from the user. |
11 | WRITE | Write a word of data from the system memory to the output window (explained below). | 1115 - Print data from memory location 15 to the output window |