Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Learning Core Wars

65 views
Skip to first unread message

kylek...@gmail.com

unread,
Apr 19, 2016, 9:48:10 PM4/19/16
to
Hello,

I've been trying to learn RedCode for a few weeks now, however, most of the time, I can't understand the tutorials. Most that I have seen will explain the basic instructions, go over the three basic warriors, then end.

So, instead of reading tutorials, I tried to look at various warriors that people have made, however, most warriors I find are optimized and uncommented, and even stepping through a program step by step remains confusing.

After struggling for a couple of days, I decided to come to rec.games.corewar for help and advice. I have prior experience in programming, which makes me feel dumber for being unable to understand RedCode.

I understand the instruction set of ICWS-88, except for SPL and DJN, and I know how to use the immediate, indirect, and relative addressing modes. I'm having a hard time understanding how to use the labels, which is making the examples in ARES especially confusing. I am finding it impossible to understand the pre-decrement addressing mode.

Is there anyone who may be able to help me understand the labels used in programs, or be able to point me in the correct direction to understanding them?

Where could I find examples of decently readable code that utilizes decremenation?

Thanks for your time.

--Kyle

Skybuck Flying

unread,
Apr 19, 2016, 11:54:27 PM4/19/16
to
Hi,

Check this folder out:

http://www.skybuck.org/Corewars/SkybucksCorewarsSimulator/version%200.37/Unpacked/SkybucksCorewarsSimulator/version%200.37/

Especially this file:

http://www.skybuck.org/Corewars/SkybucksCorewarsSimulator/version%200.37/Unpacked/SkybucksCorewarsSimulator/version%200.37/RedcodeExt2009Spec100.htm

It describes the instructions in detail.

I also wrote a corewars simulator, it's fully compatible with pmars.

I never got around to finishing the GUI though.

As far as I can remember it does allow stepping through the individual parts
of how an instruction is executed.

This might be of some help to try and understand those pre and post
operators.

If you want to give it a try and are still confused how to use it I can
offer some further help/assistence with that.

For now,
Goodbye and good luck !
Skybuck.

0 new messages