Ambiguous C?

Orn E. Hansen orn at rsp.is
Fri Apr 28 23:37:53 AEST 1989


In article <111 at ssp1.idca.tds.philips.nl>, roelof at idca.tds.PHILIPS.nl (R. Vuurboom) writes:
> 
> The compiler generated a byte access for 2 bytes further and then tested
> the 6th bit. For locations in memory this will deliver the same result
> however a byte access to the register caused a bus timeout error to occur.
> 
It reads the byte in question, thats what I would expect it to do.  If the
hardware does not support such access it wouldn't respond, causing a BUS
error condition (absence of data transfer acknowledge).

The result to this problem is to read the register into memory (long access)
and then query the copy.  You could also just modify the assembler code for
long access in which case you'd need to use an An for memory reference and
Dn for the bit count.

	MOVE.L  EffAdr,An               * Get address
	MOVE.L  #14,Dn                  * Get Bit count
	BTST.L  Dn,(An)                 * Thest the data in question

HEY! by the way.  What are JEQ, JRA etc. NEW instructions?  What are there
format?  I haven't seen these in any DATA Manual on Motorola mnemonics.
What is a JRA? Jump_Routine_Always, Jump_Relative_Always?  I've only heard
of BRanch Always shorthanded as BRA.



More information about the Comp.lang.c mailing list