home *** CD-ROM | disk | FTP | other *** search
/ c't freeware shareware 2001 January / CT_SW0101.ISO / pc / software / spiele / strat / bbots.tgz / battlebots-1.0.2-static.tar / tracker.basm < prev    next >
Text File  |  2001-03-11  |  1KB  |  73 lines

  1. RAM: 0
  2.  
  3. DEVICE: 1 1 0
  4. DEVICE: 2 2 0
  5. DEVICE: 3 2 0
  6. DEVICE: 4 2 0
  7. DEVICE: 5 2 0
  8. DEVICE: 6 3 0
  9. DEVICE: 5 2 0
  10. DEVICE: 7 4 0
  11. DEVICE: 13 4 0
  12. DEVICE: 7 4 0
  13. DEVICE: 12 4 0
  14. DEVICE: 0 0 0
  15. DEVICE: 0 0 0
  16. DEVICE: 0 0 0
  17. DEVICE: 0 0 0
  18. DEVICE: 0 0 0
  19. DEVICE: 0 0 0
  20. DEVICE: 0 0 0
  21. DEVICE: 0 0 0
  22. DEVICE: 0 0 0
  23. DEVICE: 0 0 0
  24. DEVICE: 0 0 0
  25. DEVICE: 0 0 0
  26. DEVICE: 0 0 0
  27. DEVICE: 0 0 0
  28. DEVICE: 0 0 0
  29. DEVICE: 0 0 0
  30. DEVICE: 0 0 0
  31. DEVICE: 0 0 0
  32. DEVICE: 0 0 0
  33. DEVICE: 0 0 0
  34. DEVICE: 0 0 0
  35.  
  36. ;It uses the scanner not only to find the enemy
  37. ;but it also uses the "offset" feature in the scanner
  38. ;to determine if he should turn into any direction in
  39. ;order to keep the target within the scanner
  40.  
  41. :start
  42. out 40,1      ; Up with shield
  43. out 21,32    ; scan-arc of 32 bot grades
  44.  
  45. :loop
  46. out 4,75      ; 75% speed ahead
  47.  
  48. out 20,1      ; emit scan pulse
  49. nop
  50. nop
  51.  
  52. in ax, 20     ; get scandist
  53. cmp ax,60000
  54. jae next
  55. in ax, 21     ; get the offset
  56. cmp ax,2
  57. jz shoot      ; it is straight ahead
  58. jae turnright ;it is to our right
  59.  
  60. :turnleft       ;else it is to our left¥
  61. out 8, 1012
  62. jmp shoot
  63.  
  64. :turnright
  65. out 8,12
  66.  
  67. :shoot
  68. out 12,1
  69. jmp loop
  70.  
  71. :next
  72. out 8,6    ; nothing found, turn right
  73. jmp loop