Welcome to GameHourz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Concept: Skybuck's BootProgramForThreadsV1 (allows mixed e..

 
   Game Forums (Home) -> Core War RSS
Next:  Warrior: Skybuck's ProtectorV4FasterNoSelfKill  
Author Message
Skybuck Flying

External


Since: May 25, 2006
Posts: 295



(Msg. 1) Posted: Sun Dec 09, 2007 10:58 pm
Post subject: Concept: Skybuck's BootProgramForThreadsV1 (allows mixed execution order of threads)
Archived from groups: rec>games>corewar (more info?)

;redcode
;name BootProgramForThreadsV1
;author Skybuck Flying

; demonstrate the concept of a boot program for threads.
; each thread will jump to the instruction it should execute
; the jumps will happen in order of thread creation.
; the boot program makes it easy to mix the execution order of the
instructions of the threads for the desired result
; a interesting demonstration program is left as an exercise for the reader
Smile

jmp BootBegin

BootBegin
; spawn 7 additional thread for a total of 8 threads
spl 1
spl 1
spl 1

jmp >ThreadCounter

ThreadCounter dat $0, $1
Thread1JumpTo jmp Instruction1
Thread2JumpTo jmp Instruction1
Thread3JumpTo jmp Instruction1
Thread4JumpTo jmp Instruction3
Thread5JumpTo jmp Instruction8
Thread6JumpTo jmp Instruction8
Thread7JumpTo jmp Instruction8
Thread8JumpTo jmp Instruction8

BootEnd

Instruction1
add.ab #1, #0 ; show results for debug
jmp 0 ; first 3 threads on 1

Instruction2
add.ab #1, #0 ; show results for debug
jmp 0

Instruction3
add.ab #1, #0 ; show results for debug
jmp 0

Instruction4
add.ab #1, #0
jmp 0 ; fourth thread on 4

Instruction5
add.ab #1, #0
jmp 0

Instruction6
add.ab #1, #0
jmp 0

Instruction7
add.ab #1, #0
jmp 0

Instruction8
add.ab #1, #0
jmp 0 ; last 4 threads on 8

 >> Stay informed about: Concept: Skybuck's BootProgramForThreadsV1 (allows mixed e.. 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Score Surface for 94nop - Hi, some anonymous person (still called "bvowk" for simplicity ;-) is so kind to provide access to a pile of computers. I have suggested to calculate one score surface for standard settings. It takes roughly 1000 times the time of one "no...

Bug in pMARS - Hi, either I don't know how EQUs work or I have found a bug in the parser of pMARS. So far I cound pin it down to: ;redcode-tiny ;name test ;assert CORESIZE == 800 v3 EQU 3 * (3 / 2 + 1) + 3 v4 EQU (CORESIZE - v3) dat.f v3, v4 With the..

KOTH.ORG: Status - ICWS Experimental 94 03/06/06 - Weekly Status on 03/06/06 -=- irc.KOTH.org is up! Meetings held in #corewars -=- Tons of new features on www.KOTH.org/koth.html pages -=- *FAQ* page located at: www.KOTH.org/corewar-faq.html Current Status of the KOTH.ORG ICWS Experimental 94..

KOTH.ORG: Status - MultiWarrior 94 03/06/06 - Weekly Status on 03/06/06 -=- irc.KOTH.org is up! Meetings held in #corewars -=- Tons of new features on www.KOTH.org/koth.html pages -=- *FAQ* page located at: www.KOTH.org/corewar-faq.html Current Status of the KOTH.ORG Multiwarrior 94 CoreWar..

KOTH.ORG: Status - 94 No Pspace 03/06/06 - Weekly Status on 03/06/06 -=- irc.KOTH.org is up! Meetings held in #corewars -=- Tons of new features on www.KOTH.org/koth.html pages -=- *FAQ* page located at: www.KOTH.org/corewar-faq.html Current Status of the KOTH.ORG 94 No Pspace CoreWar Hill...
   Game Forums (Home) -> Core War All times are: Ekaterinburg, Islamabad, Karachi, Tashkent (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]