home *** CD-ROM | disk | FTP | other *** search
/ Más de 2,500 Juegos / CD2.iso / zipdat / 1347 / 1347.txt next >
Encoding:
Text File  |  1992-04-21  |  37.9 KB  |  961 lines

  1.                           
  2.                           
  3.                           
  4.                           
  5.                           
  6.                           
  7.                           
  8.                           
  9.                             ____________________
  10.                           /                      \
  11.                         /  Binary Armageddon (TM)  \
  12.                       /        B.A.C.S.  v1.40       \
  13. ----------===========<      By:  Ed T. Toton III      >===========----------
  14.                       \      (c) copyright 1992      /
  15.                         \   All rights reserved.   /
  16.                           \______________________/  
  17.                           
  18.                       Special thanks to Jeremy Kusnetz
  19.                             & Kenneth B. Foreman
  20.                               & Erik McClenney
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.   B.A.C.S.   = (c) 1992  =  Ed T. Toton III                          pg 0 
  61.  
  62.  
  63.  
  64.  
  65.  
  66.                          ---  Table of Contents  ---
  67.  
  68.  
  69.  
  70.             Acronyms..........................................2
  71.  
  72.             Overview, history, etc............................2
  73.  
  74.             Things you should have............................4
  75.  
  76.             Using BACS........................................4
  77.  
  78.             Programming.......................................5
  79.  
  80.             Variables/Labels.................................10                                                                                 
  81.  
  82.             Staging a competition............................11
  83.  
  84.             Trouble-shooting and Speed-control...............11
  85.  
  86.             Legal stuff......................................12
  87.  
  88.             Other Software...................................13
  89.  
  90.             Final Notes......................................14
  91.  
  92.             Changes..........................................15
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  [ ED. Note- It is HIGHLY suggested that you make a print-out of this file! ]
  119.  
  120.   B.A.C.S.   = (c) 1992  =  Ed T. Toton III                          pg 1   
  121.  
  122. -----------------------------------------------------------------------------
  123. ACRONYMS AND TERMINOLOGY
  124.  
  125.   In this documentation, I will be referring to several things which I will
  126. need to briefly describe here. Some are acronyms, some are abbreviations, the
  127. rest are simple terms.
  128.  
  129.  Term:      Description:
  130.    BA         =Binary Armageddon
  131.    BABL       =The programming language. Pronounced "Babble".
  132.                (Binary Armageddon Basic Language)
  133.    BACS       =acronym- Binary Armageddon Core Simulator.
  134.                this is the program for which the documentation was written.
  135.    Op Code    =Operational Code. Op-Codes are the numbers that represent
  136.                various commands in a program, and are what BACS actually
  137.                interprets to execute the instructions.
  138.    RAM        =Random Access Memory
  139.  
  140. -----------------------------------------------------------------------------
  141. OVERVIEW, HISTORY, ORIGIN, CORE WARS, Etc..
  142.  
  143.   Binary Armageddon is a game in which you write battle programs, and pit 
  144. them against each other in a fight to the death. The programs are placed
  145. in the memory core in random locations, and none of them know where the 
  146. others are. Some will be offensive, bashing everything, others may be more
  147. defensive and move out of the way of an oncoming rampamt program...
  148.  
  149.   The idea of programs battling one another within a computer is by no means
  150. a new idea. A number of years ago, some researchers from the Massachussetts
  151. Institute of Technology were working on artificial intelligence at AT&T's 
  152. Bell Laboratories and at the Xerox Corporation research center. These 
  153. programmers would on occasion rewrite various programs to eat each other, 
  154. after their collegues had left for the day.
  155.  
  156.   This was the beginnning of what is now called "Core Wars". Here programmers
  157. would match wits by writing programs that would do battle with one another
  158. in the core of the mainframe. Eventually, Core Wars were banned in the 
  159. workplace after a Xerox 530 became infested with these programs, and thus
  160. was the first computer to have a serious virus problem.
  161.  
  162.   But this was not the end, for in 1983, in a speech the ideas came forth,
  163. and in 1984 an article appeared in Scientific American containing information 
  164. on viruses and Core Wars, and offered more details on writing them for a small 
  165. fee of $2.
  166.  
  167.   At this point A. K. Dewdney and his friend David Jones started developing
  168. the game of Core Wars. They devised a system that would allow for writing
  169. simplistic programs in an assembly like language, and to have them battle
  170. within a simulated mainframe on a personal computer. They developed a 
  171. programming language for it called Redcode, and a simulator called MARS 
  172. (Memory Array Redcode Simulator).
  173.  
  174.   
  175.   
  176.   
  177.   
  178.  
  179.  
  180.   B.A.C.S.   = (c) 1992  =  Ed T. Toton III                          pg 2   
  181.  
  182.   Now where does Binary Armageddon come in? Well, a few weeks before I wrote 
  183. this, I had come across some information pertaining to Core Wars, the 
  184. original mainframe battles. I thought it would be fantastic to be able to 
  185. simulate this on an IBM compatable computer, and set forth to create Binary
  186. Armageddon. But I had some difficulties in the design, there were holes in
  187. my plan. At this point I discovered Dewdney's Core Wars, and Redcode, and 
  188. so forth. After seeing what they had done, it was a simple matter to 
  189. incorporate a few of the ideas and finish Binary Armageddon.
  190.  
  191.   Binary Armageddon is being developed with the idea that programs written in
  192. it's language can compete against programs written in Redcode. This feature
  193. is now fairly well implemented, and should work. If you spot any problems, 
  194. please contact me. To run a redcode program in BACS, you must insert a line 
  195. at the top of the Redcode program that says "-Redcode". For more details, 
  196. consult the file REDCODE.TXT.
  197.  
  198.   In BACS (pronounced "backs"), the programming language (BABL, which is
  199. pronounced "Babble") is a cross between PC assembly, ATRA (pronounced
  200. "Ay-truh", stands for Advanced T-Robots Assembly), and Redcode. The language
  201. is considerably different from Redcode in it's syntax, but all Redcode's
  202. commands are supported, and thus with a simple re-wording of them, most
  203. redcode programs can be converted to BACS. The programs DWARF.BA, IMP.BA,
  204. GEMINI.BA, and MEGAMOVE.BA were all originally written in Redcode, and have
  205. been converted in this manner.
  206.  
  207.   Now just what is all this? Binary Armageddon is the name of the game, and 
  208. the game could feasibly be implemented in various manners, using different 
  209. simulator programs. BACS is the name of the program itself for which this 
  210. documentation was written. BACS is a program that allows you to play Binary
  211. Armageddon.
  212.  
  213.   In Binary Armageddon, you will write programs that will battle one another
  214. in a fight to the death. The programming language is very similar to 
  215. assembly language, with some major differences. If you don't already know
  216. a fair amount about programming, you should stop here.
  217.  
  218.   You can pit up to 16 programs against each other at a time, and the graphic
  219. display on the screen shows all 8000 memory locations at once. These memory
  220. locations are color coded, and the colors can represent either the commands
  221. that are contained at those locations, or they can represent which program
  222. they belong to. You can switch between the two color options during the 
  223. battle, thus allowing for a massive amount of flexibility, and provides
  224. for the maximum informative output possible during runtime.
  225.  
  226.  
  227.   For more information, consult some of these fine books listed below...
  228.  
  229.  
  230. Bibliography:
  231.  
  232.         "Computer Viruses, Worms, Data Diddlers, Killer Programs, and 
  233.      Other Threats to your System." By John McAfee and Colin Haynes.
  234.      1989, St. Martin's Press, New York.
  235.  
  236.         "The Magic Machine, A Handbook of Computer Sorcery" by A. K. Dewdney
  237.      1990, W. H. Freeman and Company, New York
  238.  
  239.  
  240.   B.A.C.S.   = (c) 1992  =  Ed T. Toton III                          pg 3   
  241. -----------------------------------------------------------------------------
  242. THINGS YOU SHOULD HAVE
  243.  
  244.    Note- If you don't have an EGA or VGA, you're stuck unless you intend to 
  245.  run the program in trace mode all the time (yuck!).
  246.  
  247.    You need a text editor! Writing programs will be very difficult without 
  248.  one. DOS 5.0 has a nice editor (that's what I'm using to write this), or you
  249.  can use a programming environment (like Turbo Pascal or C or Quick-Basic),
  250.  or you can even use some word processors. If you use basic or or something
  251.  like Word Perfect, you will need to remember to save it as "dos text" or
  252.  "ascii format".
  253.  
  254.    Here are the files you should have:
  255.  
  256.   BA.EXE          -   The Binary Armageddon system (BACS).
  257.   BA.DOC          -   This file.
  258.   COMMENTS.TXT    -   File to read others' comments and for you to 
  259.                       write comments of your own
  260.   BADEMO.DAT      -   A sample config file
  261.   BADEMO.BAT      -   A batch file to run the demo.
  262.   PARABOLA.BA    \
  263.   DWARF.BA        >-  These are some sample programs.
  264.   SCRAMBLE.BA    /  
  265.   ????????.BA     -   Other programs written for use with this BA.
  266.   REDCODE.TXT     -   A description of how to convert Redcode to BABL,
  267.                       and the differences between them, and so forth..
  268.  
  269. -----------------------------------------------------------------------------
  270. USING BACS
  271.  
  272.  
  273.   Operating BACS is quite simple. The syntax to run it is simply 
  274. "BA <config>" where <config> is the filename of the configuration file
  275. you wish to use.
  276.  
  277.   The config file is simply a text file telling BACS which programs to
  278. use in the simulation, and what settings to use. Here is an example:
  279.  
  280. -d0
  281. dwarf.ba
  282. parabola.ba
  283.  
  284.   In this example, BACS would load dwarf and parabola, and run the simulation
  285. with a speed delay of 0. Here is a list of all the paramers available:
  286.  
  287. Item:  Description:
  288.  -D#     Sets the delay in hundreds of a second (minimum period of time
  289.            for each cycle in the simulation). Defaults to 1.
  290.  -P#     Sets the number of cycles between each timer check for the delay.
  291.            Defaults to 1.
  292.  -O      Sets the color coding system to color by ownership instead of
  293.            color by command.
  294.  -CN     Turns off the on-screen counter display.
  295.  -T      Trace mode. No graphics, simply an output showing what command
  296.            each program is executing. Not very useful, was mostly used for
  297.            testing BACS.
  298.  
  299.  
  300.   B.A.C.S.   = (c) 1992  =  Ed T. Toton III                          pg 4   
  301.  
  302.   There are also a few keyboard commands you will want to know:
  303.  
  304. Key:  Description:
  305.  Q         Quit
  306.  C         Toggle counter display
  307.  O         Toggle color code mode
  308.  P         Pause
  309.  
  310.   Note that during trace mode, you can always press Ctrl-Break to exit it
  311. if 'Q' doesn't work (there is an on-screen pause, and on faster computers you 
  312. may not have time to press 'Q' between pauses).
  313.  
  314.   
  315.  
  316.  
  317.   In BACS, the screen is divided into several regions. The most important
  318. of which is the main window. In here is a graphic representation of the 
  319. entire memory core. Each memory location is represented by a small rectangle
  320. within the window. These locations will be color coded. As to what the colors 
  321. mean, well, that depends on which mode you have selected, and over on the
  322. left side of the screen it will show what the colors represent.
  323.   The secondary region surrounds the first, and this is where the list of 
  324. keyboard commands, the counter, and the lists of the color codes are kept.
  325.  
  326.  
  327.  
  328. -----------------------------------------------------------------------------
  329. PROGRAMMING in BABL
  330.  
  331.   It is unavoidable that in order to play Binary Armageddon, you must know
  332. how to make battle programs. The programming language is very similar to 
  333. assembly, and has some similarities to Redcode which is used for Core Wars.
  334. Now remember, I can't teach you to program in general, entire text books
  335. have been written on the subject. All I can do is teach the commands.
  336.  
  337.   First off, some basics about how Binary Armageddon works. All the competing
  338. programs run simultaneously, taking turns executing instructions. This 
  339. simulates multi-user systems on mainframes in that each program can operate
  340. in a simplistic manner, unaware of what the other programs do. Each program
  341. will continue to run until it tries to execute an invalid command, at which
  342. time it is considered dead. Some examples of invalid commands are "DATA" 
  343. statements, and attempts to assign values to immediates, as outlined below.
  344. The simulation will also end when the cycle count gets to 65,536 (in other 
  345. words, when the cycle count gets too large to store in one 16-bit number). At
  346. this time the game will be declared a draw.
  347.  
  348.   The memory core consists of 8000 memory locations, numbered 0 to 7999. 
  349. The core is "circular", and thus absolute addressing is fairly useless. Since 
  350. it is circular, you can tell BACS to deal with a memory location outside of 
  351. the 8000, and have it "loop" around. For instance, if you want to write to 
  352. memory location 9022, BACS will interpret that as 1022. Any number, positive 
  353. or negative, will be looped around as much as necessary to get the intended 
  354. effect.
  355.  
  356.  
  357.  
  358.  
  359.  
  360.   B.A.C.S.   = (c) 1992  =  Ed T. Toton III                          pg 5   
  361.  
  362.   All commands use a relative addressing system, instead of an absolute 
  363. system. For instance, if you try to access location 1000, it won't be the
  364. 1000th location from the start of memory that you access. Rather, you will
  365. access the 1000th location from the command that is being presently executed.
  366. The statement "JMP 0" would be an endless loop, since it would send the
  367. instruction pointer 0 locations away, and thus execute the same command
  368. over and over. "JMP 1" would do nothing, effectively a "NOP" (No-Operation),
  369. since the IP (instruction pointer) would move along anyway. 
  370.  
  371.   The addressing system is further simplified by the fact that each command
  372. is considered to take only one location in memory, as you may have already 
  373. figured out.
  374.  
  375.   Adressing can be done in several manners. Operands can be any of four 
  376. types. They are Registers, Immediates, direct addresses, and indirect 
  377. addresses.
  378.  
  379.   An immediate is a number, plain and simple. In basic, if you were to say
  380. "let x = 5", the '5' is an immediate. Immediates can be used to specify 
  381. specific numbers, but attempting to assign a value to one is an invalid
  382. operation, and thus your program will die. Immediates are assumed if a number
  383. is encountered with no difinitive symbol. However, just to be safe, you may 
  384. want to use it's symbol anyway, which is a "#".
  385.  
  386.   A direct address is a memory location. These are denoted by a "@". Whatever
  387. number follows the "@" is the relative location in memory to look for the 
  388. value to use, or the relative location to deal with. An example would be:
  389.             DATA    5
  390.             MOV   @-1    #9
  391.   In this example, the data starts off being 5, then the MOV command changes
  392. it to 9. Since the destination of the MOV is "@-1", it looks at the location
  393. 1 command back to set to the value of 9.
  394.  
  395.   An indirect address is a system for storing addresses in data areas. These
  396. are denoted by the symbol "&". Here is an example...
  397.             DATA    3
  398.             MOV   &-1    #9
  399.             JMP     5
  400.             DATA    0
  401.   In this example, the MOV command looks back one location, finds the 3, then
  402. looks forward 3 locations from the "DATA 3" statement to set the SECOND data
  403. statement equal to 9. It's very important that you understand how this works.
  404. The second data statement is 3 away from the first, and thus you need a 3 
  405. there. The addresses are thus cumulative (-1 + 3 = 2).
  406.  
  407.  
  408.  
  409.   The simplist program possible is called IMP. It consists of only one 
  410. command. Here it is:
  411.                        MOV   @1   @0
  412.  
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.   B.A.C.S.   = (c) 1992  =  Ed T. Toton III                          pg 6   
  421.  
  422.   Imp takes everything at location 0 (the MOV command itself, and all it's
  423. operands) and copies it to location 1 (the next line down). The instruction 
  424. pointer will of course move to the next line afterwards, which is an exact 
  425. copy of the MOV command. So, Imp goes rifing through the memory core at high
  426. speeds leaving a trail of old used MOV commands. Often times when Imp ploughs
  427. through another program, the other will end up executed one of Imp's old 
  428. MOV's and thus become another Imp. In this event you will probably have a 
  429. draw, since you will have multiple Imps chasing each other throughout 
  430. eternity. You may want to ban these from competitions.
  431.  
  432.  
  433.  
  434.  
  435.  
  436. And now for a library of the commands:
  437.  
  438.  
  439. Op-Code:   Command:  Operands:    Description:
  440.  
  441.   0          DATA          B        Sets up data area, initial value of B
  442.  
  443.   1          MOV       A   B        Sets A equal to B,  (B unchanged)
  444.  
  445.   2          ADD       A   B        Sets A equal to A+B (B unchanged)
  446.  
  447.   3          SUB       A   B        Sets A equal to A-B (B unchanged)
  448.  
  449.   27         MUL       A   B        Sets A equal to A*B (B unchanged)
  450.  
  451.   28         DIV       A   B        Sets A equal to A/B (B unchanged)
  452.                                     (returns integer part of quotient)
  453.  
  454.   29         MOD       A   B        Sets A equal to A mod B (B unchanged)
  455.                                     (returns remainder of A/B)
  456.  
  457.   4          JMP       A            Jumps to location A (A unchanged)
  458.  
  459.   5          CMP       A   B        Compares A and B, neither changed, 
  460.                                     result stored in CZ register.
  461.  
  462.   6          JNE       A            Jumps to A if result of comparison
  463.                                     is NOT EQUAL    (CZ <> 0)
  464.  
  465.   7          JEQ       A            Jumps to A if result of comparison
  466.                                     is EQUAL        (CZ = 0)
  467.  
  468.   8          JLS       A            Jumps to A if result of comparison
  469.                                     is LESS THAN    (CZ < 0)
  470.  
  471.   9          JGR       A            Jumps to A if result of comparison
  472.                                     is GREATER THAN (CZ > 0)
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.   B.A.C.S.   = (c) 1992  =  Ed T. Toton III                          pg 7   
  481.  
  482.   10         IFE       A   B        If A = B, then this will execute the
  483.                                     whatever command follows it. Otherwise
  484.                                     it will skip it.
  485.  
  486.   11         IFN       A   B        If A <> B, then this will execute the
  487.                                     whatever command follows it. Otherwise
  488.                                     it will skip it.
  489.  
  490.   12         IFG       A   B        If A > B, then this will execute the
  491.                                     whatever command follows it. Otherwise
  492.                                     it will skip it.
  493.  
  494.   13         IFL       A   B        If A < B, then this will execute the
  495.                                     whatever command follows it. Otherwise
  496.                                     it will skip it.
  497.  
  498.   14         LOOP      A            Decrements the CT register. If CT is
  499.                                     greater than 0 after decrement, then
  500.                                     it will jump to A.
  501.  
  502.   15         DO        A            For use with LOOP. This sets the CT 
  503.                                     register equal to A.
  504.  
  505.   16         DJZ       A   B        Decrement number at location B (no 
  506.                                     immediates for B!). Then if it is 
  507.                                     equal to 0, it'll jump to A.
  508.  
  509.   30         DJN       A   B        Decrement number at location B (no 
  510.                                     immediates for B!). Then if it is 
  511.                                     not equal to 0, it'll jump to A.
  512.  
  513.   17         JMG       A   B        Jumps to A if value at location B is
  514.                                     greater than 0 (no immediates for B!)
  515.  
  516.   18         JMZ       A   B        Jumps to A if value at location B is
  517.                                     equal to 0 (no immediates for B!)
  518.  
  519.   19         XOR       A   B        Bit-operator:  Sets A equal to "A xor B"
  520.                                                    (B unchanged)
  521.  
  522.   20         OR        A   B        Bit-operator:  Sets A equal to "A or B"
  523.                                                    (B unchanged)
  524.  
  525.   21         AND       A   B        Bit-operator:  Sets A equal to "A and B"
  526.                                                    (B unchanged)
  527.  
  528.   22         NOT       A            Bit-operator:  Sets A equal to "NOT A"
  529.                                          
  530.   23         SHL       A   B        Bit-shifts A left  B times  (B unchanged)
  531.  
  532.   24         SHR       A   B        Bit-shifts A right B times  (B unchanged)
  533.  
  534.   25         ROL       A   B        Bit-rotates A left  B times (B unchanged)
  535.  
  536.   26         ROR       A   B        Bit-rotates A right B times (B unchanged)
  537.  
  538.  
  539.   
  540.   B.A.C.S.   = (c) 1992  =  Ed T. Toton III                          pg 8 
  541.  
  542.   31         PUT1      A   B        Sets the FIRST operand at location A
  543.                                     to equal B. (note that using MOV will
  544.                                     result in the target becoming a DATA
  545.                                     statement. This can be used to edit 
  546.                                     commands in the core).
  547.  
  548.   32         PUT2      A   B        Sets the SECOND operand at location A
  549.                                     to equal B. (See note for PUT1).
  550.  
  551.  
  552. IMPORTANT NOTE- The commands MOV and CMP deal ONLY with the second operand
  553.  of the target memory location when one of their own operands isn't a memory
  554.  address. If they are both addresses, then they will deal with the target
  555.  location as a WHOLE. A CMP will turn up negative if you compare "ADD @5 1"
  556.  and "SUB @5 1" using a command similiar to "CMP @1 @2". If you don't want
  557.  this to happen, use 'IFE' or a similar command. MOV -WILL- change the
  558.  statement at the target address to a DATA statement if you assign it an
  559.  immediate or a value from a register (example: "MOV @-1, #0"). All other
  560.  commands that modify a memory location (except MOV) will change only the one
  561.  operand.
  562.  
  563.  
  564. The registers:
  565.  
  566.    The registers are there for you to have a handy storage place for numbers.
  567. You have 8 at your disposal. There are 10 in all, one is used for loop
  568. counts, and the other is used for comparisons. By changing these you can
  569. confuse and trick the other commands into doing things!
  570.  
  571.  
  572.   Here they are:  AX, AY, AZ, BX, BY, BZ, CX, CY, CZ, CT
  573.  
  574.   CT is for loop counts, and CZ is used for comparisons.
  575.  
  576.  
  577.   Note that you can't have DO..LOOPS inside one another (nested loops) unless
  578. you plan ahead and deal with the CT register. Here is an example of how you
  579. should go about making nested loops:
  580.  
  581.    DATA   0
  582.    ADD  @-1    #1
  583.  
  584.    DO     5
  585.  
  586.    MOV   CX    CT
  587.    DO     8
  588.    ADD  @-5,   10  
  589.    LOOP  -1
  590.    MOV   CT,   CX
  591.  
  592.    LOOP  -5
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.   B.A.C.S.   = (c) 1992  =  Ed T. Toton III                          pg 9 
  601.  
  602.   In this example, the program sets the data area to 0. The net line adds 1,
  603. thus making it 1. After that, the CT register is set to 5 by the DO command,
  604. and is then stored in CX. After the inner loop is executed 8 times (adding 10
  605. to the data value each time), the CT register is restored from CX, and the
  606. outer loop runs as iff there were never another loop. Since the CT register 
  607. was 5, the entire thing is repeated 5 times, for a total of 40 ADD commands.
  608. At the very end, the data value is 401.
  609.  
  610.   I realize that this documentation makes the programming appear more complex 
  611. than it really is. The best thing you can do is play with the sample programs
  612. and to see how they work. You'll find that most of the time, the registers
  613. and bit-operators are rarely used. They are provided to allow for more 
  614. interesting and creative programs, but you need not understand them to create 
  615. perfectly functional ones.
  616.  
  617.  
  618. -----------------------------------------------------------------------------
  619. VARIABLE/LABELS
  620.  
  621.   This new feature will infinitely improve ease of programming for everyone
  622. out there. I have no doubt of this. Whenever the compiler encounters a label,
  623. it takes note of the location, and uses it to compile commands found later
  624. that access the label. You can use labels as you would in other languages, 
  625. and as pseudo-variables. Here's an example:
  626.  
  627. :Main
  628. do      5
  629. mov     &-2,    1
  630. loop    -1
  631. jmp     2
  632. :mynumber
  633. data    0
  634. add     @mynumber,      #1
  635. jmp     main
  636.  
  637.  
  638.   In this example, the program starts off doing a loop (5 times) that sets
  639. a memory location equal to one. We cannot see what memory location is being 
  640. changed, since the program segment is incomplete, but that is unimportant.
  641.   After the loop is complete, the "jmp 2" command jumps over the data 
  642. (remember that labels do not count as commands), and executes the ADD 
  643. command. This command adds one to the data statement preceding it. The '@'
  644. symbol must still be there, but the compiler figures out the number for you
  645. since you put the label name after it.
  646.   Once that is complete, it executes a jump and starts the program over. You
  647. don't need a '@' here, since you normally don't need one anyway. THE LABEL
  648. REPLACES THE NUMBER ONLY, NO EXCEPTIONS. But again, the compiler figures out
  649. the number for you.
  650.  
  651.   Note that labels MUST be located before ALL commands that access them.
  652. There's no way around that. Also note that you may define up to 80 of them.
  653. For an example of a program that uses labels, see SCANMAN.BA.
  654.  
  655.  
  656.  
  657.  
  658.  
  659.  
  660.   B.A.C.S.   = (c) 1992  =  Ed T. Toton III                          pg 10 
  661. -----------------------------------------------------------------------------
  662. STAGING A COMPETITION
  663.  
  664.   First off, gather a few friends who are interested and show some level of 
  665. enthusiasm (I know from experience it is almost impossible to force people
  666. to play!! Heheh <grin>).
  667.  
  668.   Then, you will need to decide on rules. If you wish you can set maximum 
  669. and minimum program size limitations, or whatever. Also decide how long you 
  670. have in which to complete your program.
  671.  
  672.   You may also want to decide in advance how many matches will be run. You
  673. could do something like ten matches, and whichever program wins the most
  674. wins altogether.
  675.  
  676.   You should also decide if you want teams. You could feasibly have teams
  677. of programs working together. It may prove interesting!
  678.  
  679.   Once everything is all together, run the simulation and watch!!! 
  680.  
  681.  
  682. -----------------------------------------------------------------------------
  683. TROUBLE-SHOOTING & SPEED-CONTROL
  684.  
  685.   The BACS program is basically fully automatic and self-contained. It
  686. will probably either work or it won't. If there is a problem, most likely
  687. (but not definitely) you are out of luck. Here are some possible causes of
  688. your difficulty:
  689.  
  690.                  1.  Not enough memory.
  691.                  2.  Incompatable graphics adapter.
  692.                  3.  Damaged copy of BACS.
  693.                  4.  Computer is not sufficiently IBM compatable.
  694.                  5.  You haven't followed any of the instructions.
  695.                  6.  Computer is damaged or not performing properly.
  696.                  7.  You're using too early a version of DOS.
  697.                      (suggest DOS 3.3 or higher)
  698.  
  699.  
  700.   If you HAVE gotten the program to run, but it's too slow, there are some
  701. things you can do to speed it up. First, You can try putting only 2 or 3 
  702. programs in the arena at once. You will find that the program slows down alot
  703. when you put a lot in. Another thing you can do is put the -D0 setting in. 
  704. That will turn off the delay that is placed in the program to keep it running 
  705. at the proper speed on faster computers.
  706.   Another thing that can be done to speed up the simulation is to turn off 
  707. the on-screen cycle counter. On a 12 mhz 286 computer, it has proven to speed
  708. up by over 5 times (rough estimation) after the counter was turned off.
  709.  
  710.  
  711.   If the problem is that the program runs TOO fast, then put the -D1 setting 
  712. in. The -P thing can be used as well to compensate for for excessive speed
  713. changes in the -D setting.
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.   B.A.C.S.   = (c) 1992  =  Ed T. Toton III                          pg 11   
  721.  
  722.   The correlation between -D and -P needs to be explained. The delay will be
  723. implemented every P cycles. Now here's how the delay works: If the number of 
  724. hundredths of a second (as determined by -D) haven't gone by yet, then the 
  725. program will sit and wait for the time to go by. If the amount of time HAS
  726. gone by, then it doesn't bother to wait for it. So if you set -P10 and -D10,
  727. you will probably not see any effect at all (unless your computer is pretty
  728. fast), simply because it will probably take more than ten hundredths 
  729. (or rather one tenth) of a second to perform 10 cycles.
  730.  
  731. -----------------------------------------------------------------------------
  732. NOTICE:
  733.  
  734.    This program is being distributed on the "shareware" concept. It is by
  735. no means completely free. If you think the program is of use to you, please
  736. send a registration fee of $14. If you think that is rediculous, then send
  737. less (or more for that matter). If you hate the program or found too many
  738. bugs, write me and tell me, and include a graphic explanation (but don't
  739. be too harsh!! Heheheh). In any event, write to:
  740.  
  741.                            Ed T. Toton III
  742.                          7101  Talisman Lane
  743.                           Columbia Md 21045
  744.  
  745.  
  746.  
  747.  
  748.  
  749.       And WHY should you register it?
  750.         1.  Because you're supposed to. If you use BACS somehwat often,
  751.              or several people use a copy off the same computer, or you
  752.              keep it on your hard drive for lengthy periods, then it
  753.              should be registered!
  754.         2.  To support my continuing efforts to bring you some level of
  755.              functional programs. If I get no cash, you get no improvements
  756.              in these programs, and I won't be encouraged to make new and
  757.              better software!
  758.         3.  To get that warm glow for knowing that you supported the author 
  759.              of at least one of the many shareware programs you probably use.
  760.         4.  To find out if there is a newer version. All you need to do is 
  761.              ask! But letters with money take priority!
  762.         5.  You could be sick and demented and thus register everything you
  763.              get your hands on.
  764.         6.  To get a registered copy of StratSys 2.0!! If you register this
  765.              program you will recieve a registered copy of StratSys 2.0 in 
  766.              the mail (please tell me what disk type you want). StratSys is
  767.              VGA & Mouse required, and is explained in detail below...
  768.         7.  To find out about my other programs you need only ask!
  769.              But again, letters with money take precedence.
  770.  
  771.         Source code is not yet available. It may be in later versions.
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.   B.A.C.S.   = (c) 1992  =  Ed T. Toton III                          pg 12   
  781. -----------------------------------------------------------------------------
  782. DISCLAIMER:
  783.  
  784.    This program is provided "AS IS" and I make no gauruntees about it's
  785. performance. I will not be and can not be held responsible for any damages 
  786. incurred during it's use, or as a result of it's use. It's on a "use at your 
  787. own risk" basis. Nothing at all should happen, the program is harmless, 
  788. but I have to say it anyway.
  789.  
  790. -----------------------------------------------------------------------------
  791. COPYRIGHT:
  792.  
  793.    This program may be freely distributed (which is actually encouraged) 
  794. AS IS. No one may modify this program in ANY way. ESPECIALLY where names
  795. and credit is given, and INCLUDING all the documentation, data files, and
  796. executable program files. It may NOT be used for comercial or profit-turning 
  797. ventures of any kind, including sale by disk vendors, without the written 
  798. consent by ME, with ONE exception: Disk vendors MAY sell it without my 
  799. written consent ONLY if they charge no more than $5 higher then the cost of 
  800. the disk (excluding any shipping and handling charges). NOTHING may be added 
  801. to it either (except in the case of writing to the file COMMENTS.TXT, and
  802. in the case of adding more robot program files). NO BBS ads are allowed EXCEPT 
  803. as zip comments, or as a single SEPERATE text file.
  804.    Any programs you write for use with Binary Armageddon are yours and you 
  805. may what you wish with them. It is encouraged that you distribute programs
  806. around as well as this program.
  807.  
  808.  
  809. -----------------------------------------------------------------------------
  810. OTHER SOFTWARE:
  811.  
  812.   I have made several programs (not including the 7 or so games I made 
  813.   in quick-basic a while back) that may be of interest to you. Here is
  814.   a list of some of them:     (as of 4/17/92)
  815.  
  816.   Blaze v2.6        : =VGA screen-saver. Supports password security,
  817.                        and a customization system (config file). Has 
  818.                        been known to travel quickly through BBS's.
  819.  
  820.   CompWar v2.6      : =Latest release of CompWar, the on-line game for 
  821.                        use with WWIV BBS systems.
  822.  
  823.   Date-Matcher v1.2 : =On-line match-maker program for BBS's that support
  824.                        DOS interrupt driven door programs (such as WWIV).
  825.  
  826.   T-Robots v2.0     : =(one of my masterpeices) T-Robots is a system in 
  827.                        which you program robots to fight one another. It
  828.                        uses a simple programming language, and you create 
  829.                        the programs with your favorite text-editor. Great
  830.                        for competitions! Supports VGA, EGA, CGA, MCGA,
  831.                        Hercules, and many more graphics devices.
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.   B.A.C.S.   = (c) 1992  =  Ed T. Toton III                          pg 13   
  841.  
  842.   AT-Robots v1.0    : =Advanced T-robots. Extremely similar to T-Robots 2.0
  843.                        except the system has been improved. It supports most
  844.                        graphics adapters in existance (CGA, EGA, VGA, MCGA,
  845.                        Hercules, etc). In this one you program the robots 
  846.                        using ATR assembly (Advanced T-Robots Assembly). Now 
  847.                        you design your own subroutines, and access specific 
  848.                        device ports and memory locations. The ultimate in 
  849.                        competions of logical thought.
  850.  
  851.   StratSys v2.0     : =A 2-player VGA combat strategy game. VERY flexible.
  852.                        Comes with 4 game scenarios (Cival War, Naval Battle,
  853.                        Robot Conquest, and a medieval scenario). Expansion
  854.                        packs are available (at the moment one with 12 
  855.                        scenarios). Comes with an editor for the images and
  856.                        maps, so you can make your own scenarios!
  857.  
  858.   My-Gags set 2.1   : =A set of small gag programs that I have made. They 
  859.                        are designed to be placed in the autoexec.bat file. 
  860.                        Over Half of them are TSR's, including one that 
  861.                        creates "line-noise" through the keyboard buffer,
  862.                        one that beeps occasionally, and one that keeps 
  863.                        changing you caps-lock/numlock/scroll-lock. 
  864.  
  865.   Toton Utilities 1.0 =A set of 8 SMALL but potentially useful utilities.
  866.                        Most are TSR's. Several of them make alternate 
  867.                        drive-lights out of other peripherals. You can make
  868.                        a drive LED on your screen in the corner, or make
  869.                        your scroll-lock act as a drive light. Included
  870.                        is also a program to make clicking sounds as you 
  871.                        press keys, and a program to turn your num-lock
  872.                        off during boot-up (for those of you that hate your
  873.                        num-lock staying on after boot-up).
  874.  
  875.  
  876.  
  877.  
  878.  
  879.  
  880.   
  881. -----------------------------------------------------------------------------
  882. FINAL NOTE:
  883.  
  884.    If you have any questions, concerns, suggestions, criticisms, donations,
  885. remarks, praise or opinions, please write! I WANT TO HEAR FROM YOU!! 
  886. (the address is listed above).
  887.  
  888.  
  889.                                                 Ed T. Toton III
  890.                                                  "Necromancer"
  891.                                                      -1992
  892.  
  893.  
  894.  
  895.  
  896.  
  897.  
  898.  
  899.  
  900.   B.A.C.S.   = (c) 1992  =  Ed T. Toton III                          pg 14 
  901.  
  902.    Oh, and one more thing. Your comments are welcome! If there are any 
  903. statements or comments or suggestions you would like to make to those who
  904. later try to use BACS, please feel free to add them to the file called
  905. COMMENTS.TXT. And if you think the comments are good (either yours, or the
  906. ones already in your COMMENTS.TXT file), please send them to me! I might
  907. make them a part of the next release of the program (if there is one).
  908.  
  909.  
  910. -----------------------------------------------------------------------------
  911. CHANGES:
  912.  
  913.  
  914.    1.1   - The CMP command functions properly now. It used to not work.
  915.            I still can't believe we diodn't spot this sooner.
  916.  
  917.  
  918.    1.2   - Redcode support is now complete and functional.
  919.            See the file "Redcode.Txt" for details.
  920.          - Variables/Labels are now supported!!! 
  921.  
  922.  
  923.    1.21  - Minor documentation changes.
  924.  
  925.  
  926.    1.3   - The color-coding system for the commands has been rearranged
  927.            to be more meaningful. Commands of similar function have been
  928.            grouped to have similar colors.
  929.          - Four new commands added: DJN, MUL, DIV, MOD
  930.  
  931.    1.4   - Two new commands added, and a major revision to how some of the
  932.            others worked (commands are no longer turned into DATA statements
  933.            by commands such as ADD, SUB, etc.. Only MOV will zap the entire
  934.            target location when changing anything. Everything else changes
  935.            ONLY the second operand).
  936.          - The two commands added are PUT1 and PUT2.
  937.  
  938.  
  939.  
  940.  
  941.  
  942.  
  943.  
  944.  
  945.  
  946.  
  947.  
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954.  
  955.  
  956.  
  957.  
  958.  
  959.  
  960.   B.A.C.S.   = (c) 1992  =  Ed T. Toton III                          pg 15 
  961.