next up previous contents
Next: Ancestor A2 Up: Predefined Ancestor Programs Previous: Predefined Ancestor Programs

   
Ancestor A1

This self-reproducing program operates by copying itself one instruction at a time into the Nucleus Working Memory. It is assumed that the program starts at memory location zero (as is usually the case); no attempt is made to look for a binding pattern to calculate the start address. Similarly, copying continues until an execution of the instruction mov_ic sets the flag, which indicates that the end of the program has been reached. When copying is complete, the nwm_divide instruction is issued to produce the offspring. A promoter is provided that will attach itself to the beginning of the program to initiate execution. A new promoter of the same type must be produced by the program itself, to be passed on to its offspring. The program listing is as follows:

1-2 101100111000   Start marked with a specific binding pattern
3 et_collect   Collect some energy
4 nwm_clear    
5 zero_c    
6 push_c    
7 pop_a   ax=0 (i.e. points to start of program)
8 set_jmp    
9 et_collect    
10 clr_f    
11 mov_ic   Main loop:
12 if_not_fl   Copy instructions one at a time into
13 nwm_write   the Nucleus Working Memory, and check
14 if_fl   whether end of program has been reached
15 clr_jmp    
16 jmp    
17 reg_create   Create a new regulator:
18 nop_00   The regulator will be a promoter
19 nop_10    
20 nop_11   These nop's specify a promoter
21 nop_00   that match the binding pattern
22 nop_11   at the beginning of this program
23 nop_10    
24 nop_00    
25 nwm_divide    
promoter 101100111000   Initial promoter


next up previous contents
Next: Ancestor A2 Up: Predefined Ancestor Programs Previous: Predefined Ancestor Programs
Tim Taylor
1999-05-29