Timothy Miller wrote:
On 7/11/06, Patrick McNamara <[EMAIL PROTECTED]> wrote:
Timothy Miller wrote:
>
> Counter values are encoded as (2049-count).  Thus, a value of 2048
> indicates a count of 1, and a value of 0 indicates a count of 2049.
> For longer counts, use more instructions.
>
> Assembly mnemonics look like this:
> OPCODE [syncs and flags] #count addr
>
For those opcodes that take a counter argument, is a count of 0 defined
as valid?  Specifically for the instruction set are these equivelent?

SEND
SEND 0

Or are these equivalent?

SEND
SEND 1

Zero is not meaningful, although if you put the corresponding value of
2049 in the instruction field, it would indeed have the same effect as
2048 (which is 1).  In fact all values from 2048 through 4095 all mean
"1".

Ah, that is good. That means my compiler generates "correct" binaries as it is.
This is a quirk of the way I do the counter.  When the number counts
up to having the high bit being 1, that means there are no more
iterations.  I could do a translation as instructions are written to
the program file, but it's hardly worth the extra logic.

Also, since this assembly language should be primarily for reading and
debugging, I would suggest making the count parameter manditory when
it's meaningful for the instruction.

That is how I have it coded.

Thanks for the clarification.

Patrick M

_______________________________________________
Open-graphics mailing list
[email protected]
http://lists.duskglow.com/mailman/listinfo/open-graphics
List service provided by Duskglow Consulting, LLC (www.duskglow.com)

Reply via email to