[Coco] Byte Order Question
Robert Gault
robert.gault at worldnet.att.net
Wed Jul 28 11:37:05 EDT 2004
David Gacke wrote:
> Hi All,
>
> I've got a byte order question and I'm sure someone on here can give me
> the correct answer.
>
> I'm trying to figure out the byte order of 16 and 32 bit register writes
> from a 6809 and 6309
>
> I'll use text characters as an example.
>
> For instance, if I have a 32 bit value of say 0x41424344 ('ABCD') and I
> were to write that to video display memory, what would I see?
>
> Would it be:
>
> ABCD
>
> CDBA
>
> DCBA
>
>
> Also, what about 16 bit writes of say 0x4142..
>
> Is it
>
> AB or BA?
>
>
> I need someone to give me a sanity check while I'm coding something. :)
>
> Thanks a bunch!
>
>
> Dave
>
>
>
>
>
One further point to add to the other responses. It depends on whether
the text screen is the low res 32 column or high res 40/80 column
screens on a Coco3.
On the high res screens of a Coco3, every other byte is not text but an
attribute byte. Text screens have the following format:
even byte - character, odd byte - attribute
attribute bits
0 - 2 background palette address
3 - 5 foreground " "
6 underline
7 blink
More information about the Coco
mailing list