; Simple example machine language programm to add two numbers ; in direct mode (load numbers from memory) ; ; Peter Christen, 16 March 2004 START a10 ; start address of the program, initialise PC to this AT a1 ; address where numbers and result is stored 000 000 000 000 010 0 ; a1: decimal 4 000 000 000 000 010 1 ; a2: decimal 5 000 000 000 000 000 0 ; a3: decimal 0 (result will be stored into here) AT a10 ; store the following data (instructions) from a10 onwards 001 001 0 000 000 001 ; a10: load mem[a1] 001 011 0 000 000 010 ; a11: add mem[a2] 001 010 0 000 000 011 ; a12: store mem[a3] 110101 0 000 000 001 ; a13: trap 1 (halt)