Subject: Corporate Program From: nautilus@acm.rpi.edu (John M. Twilley) Date: Wed, 12 Feb 1992 00:52:31 GMT Message-ID: <+_hsa#_@rpi.edu> This program reminds me of a corporation: Seven hard-working drones who do nothing but look for a non-zero B field. One administrator who does nothing but look for a drone who has found something, then bombs where the worker tells it to. :-) Seriously, this is my first attempt at writing MARS code for no other purpose but to experiment. This code uses semaphore-type signalling, and loses miserably on the KotH. Against stationary targets, it does very well... those that don't fight back too hard, anyway... (Maybe should have named it Federal Contract Program? :-) ) --- ;redcode ;name Corporate Program ;author Jack Twilley ;---- ;strategy This program is designed to copy off seven small portions ;strategy of code whose sole purpose is to find something abnormal. ;strategy If they do, then they set a flag in their routine to a ;strategy non-zero value, and wait until it becomes zero again. ;strategy The second part of the program scans each of the small ;strategy portion's flags, and based on the response, bombs a ;strategy certain portion of core heavily. Having completed that, ;strategy then it resumes scanning the other pointers. ;---- csize equ 8000 num equ 7 ;Number of scanning programs slen equ (send-sstart+1) ;Length of scanning program dist equ 1000 ;(csize/(num+1)) - Distance between the programs step equ 5 stepx2 equ step*2 ;---- ; Scan unit ;---- sstart add #step, spoint snext jmn scall, @spoint spoint jmp sstart, #-1 dat #0, #0 scall add spoint, send jmn 0, send sback jmp sstart, 0 send dat #0, #0 ;---- ; Copy-split unit ;---- cstart add #dist+slen, dest mov #send-2, source cloop mov