home *** CD-ROM | disk | FTP | other *** search
/ 300 Favorite Games / 300GAMES.iso / 316 / sample1.atr < prev    next >
Text File  |  1992-02-11  |  1KB  |  84 lines

  1. ;   Sample Robot #1
  2. ;
  3. ;   variable declarations must appear before their first reference, 
  4. ;   but otherwise may be anywhere. They are used to figure out how
  5. ;   to compile the program, but are not actually compiled into it.
  6. ;
  7. ; Define some variables..
  8. #def accuracy
  9. #def shoot
  10. #def cool
  11. #def start
  12.  
  13. ; Let's give names to our subroutines...
  14. set     shoot  100
  15. set     cool    50
  16. set     start   1
  17.  
  18.  
  19. ; Settings
  20. opo     13 0
  21. opo     18 10
  22. opo     20 1000
  23.  
  24. ; 40% chance of turning on over-burn
  25. ipo     10 az
  26. cmp     az 600
  27. jls     1
  28. opo     22 1
  29.  
  30.  
  31. ;  ---------Main----------
  32. :1
  33.  
  34.   opo   11  0
  35.   opo   14  -9
  36.  
  37.   ipo   2   az
  38.   sub   cz  az  200
  39.   jgr   cool
  40.  
  41.   ipo   7   az
  42.   sub   cz  az  5000
  43.   jls   shoot  1
  44.  
  45.  
  46. jmp 1
  47. ; END-------Main----------
  48.  
  49.  
  50. ; Get moving, veer off, wait, then return to main loop.
  51. :50
  52.   opo   11  100
  53.   opo   14  -30
  54.   del   25
  55. jmp start
  56.  
  57.  
  58.  
  59. ; Firing subroutine
  60.  
  61. :100
  62.   opo   11  100
  63. :101
  64.  
  65.   ipo   8   accuracy
  66.   opo   15  accuracy
  67.  
  68.   ipo   2   az
  69.   sub   cz  az  250
  70.   jgr   102
  71.  
  72.   ipo   7   az
  73.   sub   cz  az  5000
  74.   jne   101 
  75.  
  76. :102
  77. ret
  78.  
  79.  
  80. ; should never execute this.
  81. int 2
  82.  
  83.  
  84.