Newsgroups: comp.sys.transputer
From: seeger@physik.tu-chemnitz.de (Steffen Seeger)
Subject: Re: Transputer cj instruction
Organization: University of Technology Chemnitz-Zwickau, FRG
Date: 5 Apr 94 09:22:15 GMT
Message-ID: <seeger.765537735@zwerg1>

aph@cam-orl.co.uk (Andrew Haley) writes:

>The cj instruction is a jump if false; it jumps if Areg is zero.  The
>odd thing is that if the branch is not taken, Areg is discarded; if
>the branch is taken, Areg is not discarded.  This has been giving me
>considerable headaches, both in writing assembly code and code
>generation.  Does any reader of this newsgroup understand why the cj
>instruction does this?

>Andrew.

May be thats because it gives you a simple possibility to check (channel)
pointers. If it is a NIL (=0) one, you jump over the code (eg in a repeated
alt construct) and if not you need not to reload the pointer. I think thats
the main reason but another might be that a lot of statemants are something
like 

IF condition THEN 
	do something with the value of condition

, thus without an ELSE branch - so you need to reload the registers anyway.


				Best regards,

						Steffen.


PS: Does anyone know of a FREE transputer assembler?



