INTRODUCTION

This program has been designed to teach the main principles of computer machine code. To aid understanding, all the complications of binary and hexadecimal have been removed. Please note that throughout these notes it is intended that the student should only enter instructions displayed in BOLD. Certain key presses are shown in angle brackets, e.g. < > which means press the down arrow cursor key, or <Enter> which means press the ENTER key.

To run DEX insert the program disk and after selecting the appropriate drive simply type:

DEX

After the title page the screen should display 100 memory locations, each containing zero (000). The number label given to each memory location, from 00 to 99, is called the ADDRESS. The processor uses the address to locate a particular memory location, so that it can store or retrieve data.

Programs are entered in the memory locations starting from address 00. Any data used in programs is usually stored in the free memory locations after your program.

The DEX processor has a special storage location called the ACCUMULATOR. This stores numbers for a short time while they are being used in a calculation, or waiting to be output. To see what all this means in practice we'll enter a simple program.

DEX INSTRUCTION SUMMARY

000 INP Input a number and store it in the accumulator.

100 OUT Output the current contents of the accumulator.

2.. LDA Load the contents of a memory location to the accumulator.

3.. STA Store the contents of the accumulator in a memory location.

4.. ADD Add the contents of a memory location to the accumulator.

5.. SUB Subtract the contents of a memory location from the accumulator.

6.. JMP Jump to a memory location and continue program execution from there.

7.. JPZ Jump to a memory location if the contents of the accumulator is zero.

8.. JPN Jump to a memory location if the contents of the accumulator is negative.

900 STP Stop the program.