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

Odp: CoreWin needs some sort of absolute constants.

 
   Game Forums (Home) -> Core War RSS
Related Topics:
Score Surface for 94nop - Hi, some anonymous person (still called for ;-) is so kind to provide access to a pile of I have suggested to calculate one score surface for standard settings. It takes roughly 1000 times the time of one surface to..

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: ;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 -=- is up! Meetings held in #corewars -=- Tons of new features on pages -=- *FAQ* page located at: Current Status of the KOTH.ORG ICWS 94..

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

KOTH.ORG: Status - 94 No Pspace 03/06/06 - Weekly Status on 03/06/06 -=- is up! Meetings held in #corewars -=- Tons of new features on pages -=- *FAQ* page located at: Current Status of the KOTH.ORG 94 No Pspace CoreWar Hill:..
Next:  Now that's an ergnomic mouse!  
Author Message
Lukasz Adamowski

External


Since: Dec 03, 2007
Posts: 18



(Msg. 1) Posted: Sat Dec 22, 2007 2:41 pm
Post subject: Odp: CoreWin needs some sort of absolute constants.
Archived from groups: rec>games>corewar (more info?)

Dnia 21-12-2007 o godz. 2:58 Skybuck Flying napisal:
> Hello,
>
> Given the following program:
>
> nop 1
> nop 2
> nop 3
> nop 4
> nop 5
> Here nop Here
>
> The last operation should be generated as:
>
> nop 6

Why do you expect it to be NOP 6?! It is generated correctly! The only
problem is that you expect absolute addressing mode to work in the
compiler. "Here" in your example is not the number of line in your
warrior's code. It was designed to make the code more human-friendly.
I don't know if it works in CoreWin, but pMARS has something like
CURLINE (predefined variable). Read file redcode.ref for more
informations (distributed with pMARS).

Greetings
Lukasz Adamowski

-= "War is a problem, never a solution" =-
-= "Wojna jest problemem, a nie rozwiazaniem" =-

----------------------------------------------------
MOHEROWY PROGRAM: obowiązkowa pamiątka po IV RP.
Czy już ją widziałeś? Kliknij i sprawdź więcej:
http://klik.wp.pl/?adr=http%3A%2F%2Fcorto.www.wp.pl%2Fas%2Fkabaret_neo...ml&sid=

 >> Stay informed about: Odp: CoreWin needs some sort of absolute constants. 
Back to top
Login to vote
Skybuck Flying

External


Since: May 25, 2006
Posts: 295



(Msg. 2) Posted: Sun Dec 23, 2007 6:05 am
Post subject: Re: CoreWin needs some sort of absolute constants. [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Cool,

CURLINE works in CoreWin 2.3 too Wink

However it's only usefull if I want to know the currentline.

What if I wanted to know the absolute line of somewhere else.

So my suggestion of using & to indicate absolute line might still be handy !
Wink

Bye,
Skybuck.

 >> Stay informed about: Odp: CoreWin needs some sort of absolute constants. 
Back to top
Login to vote
Ilmari Karonen

External


Since: Sep 15, 2006
Posts: 40



(Msg. 3) Posted: Sun Dec 23, 2007 4:02 pm
Post subject: Re: CoreWin needs some sort of absolute constants. [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Skybuck Flying <spam.TakeThisOut@hotmail.com> kirjoitti 23.12.2007:
>
> CURLINE works in CoreWin 2.3 too Wink
> However it's only usefull if I want to know the currentline.
> What if I wanted to know the absolute line of somewhere else.

Try "(CURLINE+label)", where "label" is a label placed on the other
line. I'm not sure what you want this for, but it's there.

Similarly, if you want the relative address of "lineA" as seen from
"lineB", just use "(lineA-lineB)". This tends to be somewhat more
useful in practice, e.g. if you need to reset a pointer that resides
on some other instruction ("lineB" in this example).

Note that "lineA" and "lineB" don't have to be labels, they just need
to be expressions that point to the appropriate instructions when used
on the current line; see e.g. the line:

find mov.ab #sorg-1-kill, kill ; redirect clear

in <http://vyznev.net/corewar/planar/TimeLag.red>, which resets the
clear pointer on the line "kill" to point to "sorg-1" (or, rather,
"sorg-1+N*step", where N is the number of scans executed so far),
where "sorg" in turn is defined as:

step equ 3030 ; mod-10
sorg equ (stun-step) ; scan origin

and "stun" is a label. Similarly, the B-value "cend-kill" on the line
labelled "cbmb" ensures that, if the clear hits its own pointer (on
the line "kill"), it will skip to the line "cend" (which, as it
happens, is here defined as "(cbmb+1)").

--
Ilmari Karonen
To reply by e-mail, please replace ".invalid" with ".net" in address.
 >> Stay informed about: Odp: CoreWin needs some sort of absolute constants. 
Back to top
Login to vote
Display posts from previous:   
   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 ]