home .. forth .. misc mail list archive ..

Re: Complementary polarity scheme.




On Fri, 9 Dec 1994, Jeff Fox wrote:

> Chuck's software is all written from the "pattern" view.  That is he
> sees the 1s and 0s as they appear as voltage on the bus. FFFFF means
> a pattern of all 5V.  His software XORS patterns with AAAAA to get
> numbers.  SO his cross assembler XORS a number ( a double in FPC) with
> AAAAA to represent it as a number or address in MuP21 memory space.
> The confusion comes from the fact that he represents the opcodes
> from a different view because of his way of seeing them as hardware.
> 
> >From some of the things Chuck has said in public some people have
> gotten very strange ideas that on MuP21 you must always think
> about if something is a number or a pattern, and that the logical
> instructions work on patterns and the math works on numbers and that
> you have to convert with AAAAA XOR in between etc.  This is true when
> you are CROSS DEVELOPING for MuP21, but it is pretty much invisible
> on the chip isself.
> 
> It can get confusing when you are writting software on the PC that will
> will run on MuP21 and deal with opcodes there...  So it is easy to 
> get caught in a mental loop when trying do design assemblers and 
> compilers in the cross development arena.  Each time you shift
> mental viewpoint from the way the stuff will look to MuP21 when
> it is running, and the way it will look while still on the 
> PC can get confusing.  If you AAAAA XOR twice it goes away,
> but if you do it again it comes back.
> 
> In P21Forth there is a version of Chuck's assembler.  Except the
> opcodes are xored with AAAAA because P21 SEES from its own  bus 
> representation.  To P21 a number is just a number, and only 
> when you deal with i/o to non-complementary-polarity-bus machines
> do you deal with patterns.  So in P21Fort the  word for IN or OUT
> on the parallel port includes AA XOR.  
> 
> If MuP21 outputs 00 to an 8 bit  port it would appear as AA because
> MuP21 represents bits on the bus in this complementary way.  To
> MuP21 a 0 is a 0.  But if it wants to send a physical 0 to the
> outside world (that does not see it from the AAAAA physical=0logical)
> it must XOR it with AAAAA.
> 
> This is an issue when doing cross development.  If you compile or
> assemble on a PC then all data and address for MuP21 must have the
> AAAAA XOR relationship between the way MuP21 and the PC will see it.

Jeff,  
   It seems to me that any time you are doing _anything_ except putting 
pictures on the monitor you have to deal with the AAAAA XOR, or is it 
55555 XOR, or FFFFF XOR from the MuP21 viewpoint?  That seems easy enough to 
deal with though.  My problem is that Chuck mentioned in one of his talks
that one of the arguments to the AND and -OR instructions needs to be a 
pattern.  Is this true? and if so you need to be conscious of it at all 
times, even when you are not dealing with the outside world.  I'm not 
complaining, I just need some clarification and I haven't got my MuP21 
kit working well enough to do the testing yet.  One more question:  I 
understand you have a MuP21 Forth available from Offete for $50.00.  What 
hardware is required.  I have Ting's kit.  What would I need to add to be 
able to run your Forth?

Thanks,
Charley.  (charley@netcom.com)