| Gaming > Core War > Interesting Bom... |
|
| << Topic |
< Post |
Post 1 of 3 Topic 1900 of 2371
|
Post > |
Topic >> |
Interesting Bombing Code: Very short (2 instructions), Flexible (Length Parameter, Location Parameter)
by "Skybuck Flying" <spam@[EMAIL PROTECTED]
>
Dec 1, 2007 at 04:49 PM
|
mov Bomb, >BombCounter
djn.a -1, BombCounter
BombCounter dat #100, #100 ; A-field = bombing length, B-field = bombing
location.
Bomb dat #0
Very minimalistic it seems ;) :) with ending conditions as well which
prevents self bombing ;)
Could have nice properties for multi-cooperating warriors possibly:
1. At least the bomb instruction is atomic... which means each warrior
will
bomb the next location.
2. Unfortunately it is possible multiple warriors could execute the jump
instruction many times and thus decrement the counter
to rapidly ? or maybe some other concurrency problems could occur of some
warriors run this code fast and some slow because they stunned ;)
But that's the nest step... trying to get warriors to cooperate on this
bombing code ;)
Bye,
Skybuck


|
3 Posts in Topic:
|
"Skybuck Flying" |
2007-12-01 16:49:49 |
|
"Skybuck Flying" |
2007-12-01 17:02:00 |
|
"Skybuck Flying" |
2007-12-01 17:04:05 |
|
Post A Reply:

|