[Coco] 6309/6809 opcodes with mixed 8/16 bit registers

Luis Antoniosi retrocanada76 at gmail.com
Tue Nov 20 15:49:10 EST 2012


It's is limited but I can think some ways where it would be useful.
Like sub-string search where you can compare 2 first characters
instead of one. If there is a mismatch, it will continue on the next
byte on string, and not next word. Supose you want to find all CR/LF
in a text file.

On Tue, Nov 20, 2012 at 3:41 PM,  <jdaggett at gate.net> wrote:
> On 20 Nov 2012 at 9:49, Harry Hurst wrote:
>
>> Let's say the X register contains $EC00, the PC is at $EB00, and memory
>> word at $EC00 is $8000. The instruction at $EB00 is $33 $90 which would
>> mean LEAU [,X+] to the 6809. After executing this instruction:
>>
>> PC: $EB02
>> X:  $EC01
>> U:  $8000
>>
>> This is not useful. LEAU [,X++], on the other hand, which is a valid
>> index/indirect form, can be quite useful. I just want to make my 6x09
>> simulator as accurate as I possibly can, so I'm investigating as many
>> non-valid, unlikely byte sequences as I can imagine. These are just a few
>> that I have tested so far.
>>
>> HH
>
>
> Harry
>
> This is actually usefull if you wish to parse through a table one byte at a time even though you
> are loading a word at a time into the X pointer register. To examine the actual byte that you
> want you could mask the other byte then do a compare. Granted it may not be a practical or
> efficient method but it is legal to do so. LEAU[,X++] is far more practical usage than
> LEAU[,X+]. You can do a compare word instead of making a byte and then do a compare
> byte.
>
> Not all sequences of opcodes and routines are created equally efficient. There may come a
> time when you actrually have to do things a bit slower in order to wait for an event to happen
> and have plenty of time. It is prettier than having a sequences of NOPs in the code to waste
> time or the next event or waste memory space for useless NOP stalls.
>
> james
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco



-- 
Panasonic FSA1-WSX
Commodore 64
Commodore 64C
Commodore 128
Apple //c
TRS-Color Computer 2
TRS-Color Computer 3
TI-99/4A
..and more coming!



More information about the Coco mailing list