🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: rec.games.corewar
Article #214

Re: SLT

#214
From: 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.
Technical Details
Message-ID: <1992Nov12.163801.29914@cs.kuleuven.ac.be>
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!ub4b!news.cs.kuleuven.ac.be!vwulpen
References: <1992Nov8.195147.29858@cs.kuleuven.ac.be> <9231710.16573@mulga.cs.mu.OZ.AU>

Show Full Headers
Complete Article Headers
Newsgroups: rec.games.corewar
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!ub4b!news.cs.kuleuven.ac.be!vwulpen
From: vwulpen@cs.kuleuven.ac.be (Henk Van Wulpen)
Subject: Re: SLT
Message-ID: <1992Nov12.163801.29914@cs.kuleuven.ac.be>
Sender: news@cs.kuleuven.ac.be
Nntp-Posting-Host: pluto.cs.kuleuven.ac.be
Organization: Dept. Computerwetenschappen
References:  <1992Nov8.195147.29858@cs.kuleuven.ac.be> <9231710.16573@mulga.cs.mu.OZ.AU>
Date: Thu, 12 Nov 1992 16:38:01 GMT
Lines: 43