🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: rec.games.corewar
4 messages
4 total messages Started by Henk Van Wulpen Sun, 08 Nov 1992 19:51
SLT
#200
Author: Henk Van Wulpen
Date: Sun, 08 Nov 1992 19:51
24 lines
1549 bytes
Hello,

  after having read a lot of stuff about Core War (all doc from soda, and
I've started reading all digests !!!), I have the following question. How
does SLT exactly work ???? I mean, how can one number be less than an other
one !!??? Since Core is circular, all addresses are to be interpreted as
modulo CORESIZE. But as far as I know comparison isn't defined in modulo-
calculus. Is it just that all addresses should be converted to the range
of 0..CORESIZE-1, and then compare these representations ?

   Another question concerns the tournaments. Can a program be entered in
both KotH and the EBS preliminaries ???

Thanks.


Henk.

-----------------------------------------------------------------------------
Henk Van Wulpen                  | Words and eggs must be handled with care.
Engineering and Computer Science | Once broken they are impossible
 senior at the K.U.Leuven        | things to repair.
vwulpen@cs.kuleuven.ac.be        | (Anne Sexton, The Awful Rowing Toward God)
-----------------------------------------------------------------------------
Re: SLT
#213
Author: Wee-Keong LIM
Date: Wed, 11 Nov 1992 23:47
51 lines
2918 bytes

In article <1992Nov8.195147.29858@cs.kuleuven.ac.be> ( number 1456 to me ) Henk
Van Wulpen writes:


>   after having read a lot of stuff about Core War (all doc from soda, and
> I've started reading all digests !!!), I have the following question. How
> does SLT exactly work ???? I mean, how can one number be less than an other
> one !!??? Since Core is circular, all addresses are to be interpreted as
> modulo CORESIZE. But as far as I know comparison isn't defined in modulo-
> calculus. Is it just that all addresses should be converted to the range
> of 0..CORESIZE-1, and then compare these representations ?


	As I understand the SLT command, the numbers in the fields should be
treated as the appropriate kind of address.  The values that are compared are the
B-field values at the specified addresses.

	For example, SLT 1, 2 would check whether the B-field value in location 1
is less than the B-field value in location 2 ( relative to the current location,
of course ).  The indirect, and predecrement indirect have the usual meanings. 
The only other restriction is that immediate values ( e.g. #5 ) can only be in
the A-field.  I'm not sure why, since it still makes sense to comare the value at
some location in A-field with the immediate value given in the B-field.

	In any case, using immediate mode is the only case where the actual
numbers in the fields are used in the comparison.  I'm not sure how this
confusion arose, since this is how I interpreted the docs ( I usually just
refer to the '88 standard ).  Oh well, I had trouble too - I read the docs about
5 times before I understood it :-).

	I'm glad to have some discussion about the specs.  Is there any movement
towards a new specification ( or a refinement of the old ones ) ?  I'd be
interested to know.


		Thanks, in advance.

					Keong.

+-----------------------------------------------------------------------------+
|e-mail: keong@ecr.mu.oz.au    University of Melbourne, Melbourne, Australia. |
|                                                                             |
| "The difficult we can do right away, the impossible takes a little longer." |
|    Hence,        "Nothing is Impossible"                                    |
+-----------------------------------------------------------------------------+


+-----------------------------------------------------------------------------+
|e-mail: keong@ecr.mu.oz.au    University of Melbourne, Melbourne, Australia. |
Re: SLT
#214
Author: Henk Van Wulpen
Date: Thu, 12 Nov 1992 16:38
42 lines
2293 bytes
In article <9231710.16573@mulga.cs.mu.OZ.AU>, keong@ecr.mu.OZ.AU (Wee-Keong LIM) writes:
|> 
|> 
|> In article <1992Nov8.195147.29858@cs.kuleuven.ac.be> ( number 1456 to me ) Henk
|> Van Wulpen writes:
|> 
|> 
|> >   after having read a lot of stuff about Core War (all doc from soda, and
|> > I've started reading all digests !!!), I have the following question. How
|> > does SLT exactly work ???? I mean, how can one number be less than an other
|> > one !!??? Since Core is circular, all addresses are to be interpreted as
|> > modulo CORESIZE. But as far as I know comparison isn't defined in modulo-
|> > calculus. Is it just that all addresses should be converted to the range
|> > of 0..CORESIZE-1, and then compare these representations ?
|> 
|> 
|> 	As I understand the SLT command, the numbers in the fields should be
|> treated as the appropriate kind of address.  The values that are compared are the
|> B-field values at the specified addresses.
|> 
|> 	For example, SLT 1, 2 would check whether the B-field value in location 1
|> is less than the B-field value in location 2 ( relative to the current location,
|> of course ).  The indirect, and predecrement indirect have the usual meanings. 
|> The only other restriction is that immediate values ( e.g. #5 ) can only be in
|> the A-field.  I'm not sure why, since it still makes sense to comare the value at
|> some location in A-field with the immediate value given in the B-field.
|>

Well that isn't exactly what my problem is... Take the following code for
instance :

	JMP	lbl,	#-1
	DAT	#0,	#0
	SLT	-1,	-2


Now, the SLT compares  #0  to  #-1, but is #0 less than or greater than #-1 ???
Is #-1 converted to CORESIZE-1 ??? Or does the comparison evaluate as true 
(i.e. #-1 is less than #0) ?


Henk.
Sonic Boom 1.30 [X-Hill Source]
#295
Author: Eric J. Schwertfeger
Date: Wed, 18 Nov 1992 18:11
114 lines
3345 bytes
Want to see a very painful death against Corona?  watch this :-)
More like suicide, really, but there's not much I can do about it.

;redcode-x
;name Sonic Boom 1.30
;author Eric J. Schwertfeger
;strategy Two SPL bombing carpet bombers going opposite
;strategy Directions, with a monitor that relaunches carpet
;strategy bombers whenever both die.
;strategy v 1.3X Going back to original bombing pattern, hence return
;strategy        to 1.XX numbers.
WAIT	EQU	(568)
FSTEP	EQU	(16*12)
RSTEP	EQU	(-16*12)
RCSRC	DAT	0,RBDST+(RSTEP)+1
RSTART	MOV	RCSRC,<(RBDST-RSTEP)
	MOV	RBDST-RSTEP,<(RBDST-RSTEP)
	MOV	RBDST-RSTEP,<(RBDST-RSTEP)
	MOV	RBDST-RSTEP,<(RBDST-RSTEP)
	MOV	RBDST-RSTEP,<(RBDST-RSTEP)
	MOV	RBDST-RSTEP,<(RBDST-RSTEP)
	MOV	RBDST-RSTEP,<(RBDST-RSTEP)
	MOV	RBDST-RSTEP,<(RBDST-RSTEP)
	MOV	RCSRC,<(RBDST-RSTEP)	; this pass
	MOV	RCSRC,<(RBDST-RSTEP)
	MOV	RCSRC,<(RBDST-RSTEP)
	MOV	RCSRC,<(RBDST-RSTEP)
RMOVE	MOV	<(RCSRC-RSTEP),<(RCDST-RSTEP)
RCDST	JMP	RSTART+RSTEP,RBDST+(RSTEP*2)+1
RBDST	SPL	0,#RSTART-240
SHOOT	SPL	FLAUNCH
	SPL	RLAUNCH
	MOV	#(WAIT/3),DELAY
WATCH	JMN	DIE,RSTART-150
	JMN	DIE,FBDST+150
DELAY	DJN	WATCH,#DELAY
	JMP	SHOOT
FLAUNCH MOV     #FCDST+2+FSTEP-FCSRC,FCSRC-FSTEP
        MOV     #2+(FSTEP*2),FCDST-FSTEP
        MOV     #FCDST+2+FSTEP-FCSRC,FCSRC
        MOV     #2+(FSTEP*2),FCDST
	MOV	#241,FBDST
	SPL	1
	SPL	1
	SPL	1
	SPL	1
	JMP	FMOVE
DIE	DAT	0,0
LAUNCH  SPL     DLAUNCH
        DJN     0,#(32*2+4)
        MOV     DIE,DSTART+(32*DSKIP)
        JMP     SHOOT
DSKIP   EQU     (247)
DLAUNCH MOV     DSRC,DSRC-DSKIP
        MOV     DDEST,DDEST-DSKIP
        SPL     1
        MOV     -1,0
        JMP     DSTART
DSRC    DAT     DDEST+1+DSKIP
DSTART  MOV     <DSRC-DSKIP,<DDEST-DSKIP
DDEST   JMP     DSTART+DSKIP,#1+(DSKIP*2)
	DAT	0,0
	DAT	0,0
	DAT	0,0
	DAT	0,0
	DAT	0,0
	DAT	0,0
	DAT	0,0
	DAT	0,0
	DAT	0,0
	DAT	0,0
	DAT	0,0
	DAT	0,0
	DAT	0,0
	DAT	0,0
	DAT	0,0
	DAT	0,0
	DAT	0,0
	DAT	0,0
	DAT	0,0
	DAT	0,0
	DAT	0,0
	DAT	0,0
	DAT	0,0
RLAUNCH MOV     #RCDST+2+RSTEP-RCSRC,RCSRC-RSTEP
        MOV     #2+(RSTEP*2),RCDST-RSTEP
        MOV     #RCDST+2+RSTEP-RCSRC,RCSRC
        MOV     #2+(RSTEP*2),RCDST
	MOV	#-254,RBDST
	SPL	1
	SPL	1
	SPL	1
	SPL	1
	JMP	RMOVE
FCSRC	DAT	0,FBDST+(FSTEP)+1
FSTART	MOV	FCSRC,>(FBDST-FSTEP)
	MOV	FBDST-FSTEP,>(FBDST-FSTEP)
	MOV	FBDST-FSTEP,>(FBDST-FSTEP)
	MOV	FBDST-FSTEP,>(FBDST-FSTEP)
	MOV	FBDST-FSTEP,>(FBDST-FSTEP)
	MOV	FBDST-FSTEP,>(FBDST-FSTEP)
	MOV	FBDST-FSTEP,>(FBDST-FSTEP)
	MOV	FBDST-FSTEP,>(FBDST-FSTEP)
	MOV	FCSRC,>(FBDST-FSTEP)
	MOV	FCSRC,>(FBDST-FSTEP)
	MOV	FCSRC,>(FBDST-FSTEP)
	MOV	FCSRC,>(FBDST-FSTEP)
FMOVE	MOV	<(FCSRC-FSTEP),<(FCDST-FSTEP)
FCDST	JMP	FSTART+FSTEP,FBDST+(FSTEP*2)+1
FBDST	SPL	0,#241
	END	LAUNCH

-- 
Eric J. Schwertfeger, maniac@cs.unlv.edu
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads