[Coco] 6309 bitmd instruction
gene.heskett at verizon.net
Sun Feb 19 16:32:28 EST 2006
On Sunday 19 February 2006 14:19, Boisy Pitre wrote:
>Does anyone know how the 6309 instruction BITMD affects the CC
>register? In my debugging efforts, I am seeing ZERO change in the CC
>register when using this instruction, and am wondering how this
>instruction actually works.
>Any insight, anyone?
Chet Simpson, many years ago now, wrote a nomograph about the 'new' 6309
codes. It might be in there, but it would take me hours to lay my
hands on the copy I printed out way back then. Hey, I got lucky, it
hadn't gone to the basement yet. Only took about 2 minutes to dig it
off the bookshelf over where the coco used to live.
From that, on page 3:
The MD register is a mode and error register and works much in the same
way as the CC register. The bit definitions are as follows:
Bit0 - Execution mode of the 6309
If clear(0), the cpu is in the 6809 emulation mode
If set(1), the cpu is in 6309 native mode
Bit1 - FIRQ mode
If clear(0), the FIRQ will occur normally
If set(1), the FIRQ will operate the same as the IRQ
Bits2-5 are unused.
Read Bits - One of these is set when the 6309 traps an error
Bit6 - This bit is set(1), if an illegal instruction is encountered
Bit7 - This bit is set(1), if a zero division occurs
And thats all it says about the MD register, Boisy. As for
BITMD - Test any bit or bits in the MD register.
Its opcode is $113C, its an immediate mode instruction, takeing 4 cycles
to execute, and 3 bytes total in the execution input stream. I'd say
the third byte is the bit spec to read. One of $40, $80 or $C0
depending on which bit or bits you wanted to read. I never found a use
for it so I can't confirm thats how it works myself. Also don't know
if the write bits can be read back too.
Does this help?
People having trouble with vz bouncing email to me should add the word
'online' between the 'verizon', and the dot which bypasses vz's
stupid bounce rules. I do use spamassassin too. :-)
Yahoo.com and AOL/TW attorneys please note, additions to the above
message by Gene Heskett are:
Copyright 2006 by Maurice Eugene Heskett, all rights reserved.
More information about the Coco