[comp.sys.handhelds] Chip 48 v2.25 question

steve@gumby.Altos.COM (Steve Scherf) (03/29/91)

I have an esoteric question about two instructions in the Chip48 machine
code. If this has already been discussed here, please bear with me as I
have not been reading this group for the past 4 or 5 months.

In the original document from gson@niksula.hut.fi there is a one-line
description of each of the instructions and their opcodes. Two in particular
are described ambiguously; these are the instruction to do a left shift one bit
and the analogous instruction to do a right shift. The documentation states
that the opcode for a right shift of register VX is 8XY6 where X is the
hex digit after the 'V' in VX. That's all fine and dandy, but what's 'Y'?
This is a single register operation, so why is there a 'Y' in the opcode?
Similarly, the left shift opcode is 8XYE with no obvious reason for a 'Y'.

Also, not actually having written a chip 48 program yet, can anyone tell me
what the byte ordering for a two byte instruction is? Is it big-endian like
sprites?

Thanks!

-- 
Steve Scherf
steve@Altos.COM    ...!{sun|sco|pyramid|amdahl|uunet}!altos!steve

These opinions are solely mine, but others may share them if they like.

gson@blob.hut.fi (Andreas Gustafsson) (04/04/91)

In article <4741@gumby.Altos.COM> steve@altos.COM (Steve Scherf) writes:
: I have an esoteric question about two instructions in the Chip48 machine
: code.
:
: In the original document from gson@niksula.hut.fi there is a one-line
: description of each of the instructions and their opcodes. Two in particular
: are described ambiguously; these are the instruction to do a left shift one
: bit and the analogous instruction to do a right shift. The documentation 
: states that the opcode for a right shift of register VX is 8XY6 where X 
: is the hex digit after the 'V' in VX. That's all fine and dandy, but 
: what's 'Y'?

It's can be anything; the interpreter doesn't use it.  It appears
that you are using the version 2.20 documentation; in 2.25 the opcode
is called "8X06" to avoid unnecessary confusion.

: Also, not actually having written a chip 48 program yet, can anyone tell 
: me what the byte ordering for a two byte instruction is? Is it big-endian 
: like sprites?

Yes.  For instance, the 8106 instruction (shift V1 right) is stored as
the bytes 81 and 06, where 81 is at the lower address.  This
translates into the nibbles 1 8 0 6, in increasing address order.

As a reminder to all, the official CHIP-48 FTP location is still
vega.hut.fi:/pub/misc/hp48sx/asap/*.
-- 
Andreas Gustafsson
Internet: gson@niksula.hut.fi
Voice: +358 0 563 5592

bson@rice-chex.ai.mit.edu (Jan Brittenson) (04/05/91)

In a posting of [4 Apr 91 14:47:36 GMT]
   gson@niksula.hut.fi (Andreas Gustafsson) writes:

 > For instance, the 8106 instruction (shift V1 right) is stored as the
 > bytes 81 and 06, where 81 is at the lower address.  This translates
 > into the nibbles 1 8 0 6, in increasing address order.

   I don't mean to nit-pick Andreas, but of course he meant 1 8 6 0.
(Just to avoid chaos & confusion.)

Oh, and while I'm typing away...

   I would like to get in touch with Paul Schlyter. But the address he
supplied me with - pausch@saaf.electra.se doesn't work.  Nor does any
of the following:

	saaf.electra.se!pausch@sunic.sunet.se
	@sunic.sunet.se: saaf.electra.se!pausch@kth.se

	saaf!pausch@sunic.sunet.se
	@sunic.sunet.se: saaf!pausch@kth.se

   There are also numerous other people who have sent me mail, but no
amount of work can produce a useful return path - not even recreating
a uucp bang path by deciphering the Received: data.  The problem is
that may of these messages have been replies to posts, and many news
readers aren't configured to supply any rational return address. And
the news path may differ from the mail path. If you have sent me mail,
but not received an answer, check your mail address. I eventually
reply to all mail I receive if it seems to me that the sender expects
a reply (and so does everyone else I know). Apologies for wasting net
bandwidth like this.

						-- Jan Brittenson
						   bson@ai.mit.edu

steve@gumby.Altos.COM (Steve Scherf) (04/09/91)

Thanks! to those of you who answered my Chip 48 question. I actually figured
out the byte order question by (yes!) just trying it.

I could have sworn that I had the 2.25 documentation; can some kind soul out
there send it to me? And the binary? I don't have ftp access. :-(

-- 
Steve Scherf
steve@Altos.COM    ...!{sun|sco|pyramid|amdahl|uunet}!altos!steve

These opinions are solely mine, but others may share them if they like.