home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / TIERRA40.ZIP / TIERRA / GB2 / 0095AAA.TIE < prev    next >
Text File  |  1992-09-10  |  5KB  |  103 lines

  1.  
  2. format: 3  bits: 3
  3. genotype: 0095aaa  parent genotype: 0666god
  4. comments: the ancestor for instruction set 2.
  5.  
  6. track 0: prot
  7.           xwr
  8. nop1    ; 010 000 01   0 beginning marker
  9. nop1    ; 010 000 01   1 beginning marker
  10. nop1    ; 010 000 01   2 beginning marker
  11. nop1    ; 010 000 01   3 beginning marker
  12. zero    ; 010 000 12   4 zero out ax so that adrb offset is zero
  13. adrb    ; 010 000 1c   5 find start, ax = start+4, bx = templ size, cx = offset
  14. nop0    ; 010 000 00   6 complement to beginning marker
  15. nop0    ; 010 000 00   7 complement to beginning marker
  16. nop0    ; 010 000 00   8 complement to beginning marker
  17. nop0    ; 010 000 00   9 complement to beginning marker
  18. bx      ; 010 000 03  10 abcd -> babc
  19. sub     ; 010 000 11  11 bx = ax - bx, bx = start, ax = start+4, cx = offset
  20. ax      ; 010 000 02  12 abab
  21. cx      ; 010 000 04  13 caba
  22. dx      ; 010 000 05  14 dcab
  23. zero    ; 010 000 12  15 zero out dx so that adrf offset is zero
  24. adrf    ; 010 000 1d  16 find end, dx=end, cx=templ size, ax=offset, bx=start
  25. nop0    ; 010 000 00  17 complement to end marker
  26. nop0    ; 010 000 00  18 complement to end marker
  27. nop0    ; 010 000 00  19 complement to end marker
  28. nop1    ; 010 000 01  20 complement to end marker
  29. inc     ; 010 000 11  22 increment to include dummy instruction at end
  30. bx      ; 010 000 03  21 bdca
  31. sub     ; 010 000 11  22 cx = dx - bx, bx=mom, dx=end, cx=size, ax=offset
  32. nop1    ; 010 000 01  23 reproduction loop marker
  33. nop1    ; 010 000 01  24 reproduction loop marker
  34. nop0    ; 010 000 00  25 reproduction loop marker
  35. nop1    ; 010 000 01  26 reproduction loop marker
  36. cx      ; 010 000 04  27 cbdc, cx=size, bx=mom, dx=end
  37. push    ; 010 000 1a  39 save size on stack
  38. mal     ; 010 000 1e  34 allocate daughter, cx=daughter, bx=mom, dx=end, ax=off
  39. ax      ; 010 000 04  27 acbd
  40. pop     ; 010 000 04  27 ax=size, cx=daughter, bx=mom, dx=end of mom
  41. call    ; 010 000 1a  39
  42. nop0    ; 010 000 00  40 copy procedure complement
  43. nop0    ; 010 000 00  41 copy procedure complement
  44. nop1    ; 010 000 01  42 copy procedure complement
  45. nop1    ; 010 000 01  43 copy procedure complement dx=ret adr, cx=size, bx=mom
  46. zero    ; 010 000 12  44 zero out dx so that IP offset is zero
  47. divide  ; 010 000 1f  45 create independent daughter cell
  48. bx      ; 010 000 04  27 bdcb, bx=mom, dx=ret adr, cx=size
  49. jmpb    ; 010 000 19  50
  50. nop0    ; 010 000 00  51 reproduction loop complement
  51. nop0    ; 010 000 00  52 reproduction loop complement
  52. nop1    ; 010 000 01  53 reproduction loop complement
  53. nop0    ; 010 000 00  54 reproduction loop complement
  54. ifz     ; 010 000 16  55
  55. nop1    ; 010 000 01  56 copy procedure template
  56. nop1    ; 010 000 01  57 copy procedure template
  57. nop0    ; 010 000 00  58 copy procedure template
  58. nop0    ; 010 000 00  59 copy procedure template
  59. push    ; 010 000 0a  63 save (ax) length on stack
  60. bx      ; 010 000 03  60 bacd, bx=mom, ax=length, cx=daughter, dx=end of mom
  61. push    ; 010 000 0a  61 save (bx) start of mom on stack
  62. cx      ; 010 000 02  69 cbac, cx=daughter, bx=mom, ax=length, dx=end of mom
  63. nop1    ; 010 000 01  64 copy loop template
  64. nop0    ; 010 000 00  65 copy loop template
  65. nop1    ; 010 000 01  66 copy loop template
  66. nop0    ; 010 000 00  67 copy loop template
  67. movii   ; 010 000 09  70 move contents of [bx] to [cx] (copy one instruction)
  68. ax      ; 010 000 04  71 acba, ax=length, cx=daughter, bx=mom, dx=end of mom
  69. dec     ; 010 000 0f  72 decrement ax (size)
  70. ifz     ; 010 000 16  78 if ax == 0 perform next instruction, otherwise skip it
  71. jmp     ; 010 000 18  79 jump to template below (copy procedure exit)
  72. nop0    ; 010 000 00  80 copy procedure exit complement
  73. nop1    ; 010 000 01  81 copy procedure exit complement
  74. nop0    ; 010 000 00  82 copy procedure exit complement
  75. nop0    ; 010 000 00  83 copy procedure exit complement
  76. bx      ; 010 000 02  84 bacb, bx=mom, ax=length, cx=daughter, dx=end of mom
  77. inc     ; 010 000 0e  85 inc addr of mother cell
  78. cx      ; 010 000 03  86 cbac, cx=daughter, bx=mom, ax=length, dx=end of mom
  79. inc     ; 010 000 0e  87 inc addr of daughter
  80. jmpb    ; 010 000 19  92 jump back to top of copy loop
  81. nop0    ; 010 000 00  93 copy loop complement
  82. nop1    ; 010 000 01  94 copy loop complement
  83. nop0    ; 010 000 00  95 copy loop complement
  84. nop1    ; 010 000 01  96 copy loop complement
  85. ifz     ; 010 000 16  97 dummy instruction to separate templates
  86. nop1    ; 010 000 01  98 copy procedure exit template
  87. nop0    ; 010 000 00  99 copy procedure exit template
  88. nop1    ; 010 000 01 100 copy procedure exit template
  89. nop1    ; 010 000 01 101 copy procedure exit template
  90. bx      ; 010 000 03 104 bcba
  91. pop     ; 010 000 0b 105 pop bx (start of mom) off the stack
  92. cx      ; 010 000 04 102 cbcb
  93. pop     ; 010 000 0b 103 pop cx (size) off the stack
  94. dx      ; 010 000 05 106 dcbc
  95. pop     ; 010 000 0b 107 pop dx (IP) off the stack
  96. jmp     ; 010 000 18 108 return, dx=ret adr, cx=size, bx=mom
  97. ifz     ; 010 000 16 109 dummy to separate jmp from template
  98. nop1    ; 010 000 01 110 end template
  99. nop1    ; 010 000 01 111 end template
  100. nop1    ; 010 000 01 112 end template
  101. nop0    ; 010 000 00 113 end template
  102. ifz     ; 010 000 16 114 dummy to separate creatures
  103.