pouët.net

Go to bottom

Looking for m68k (or derivative) asm examples.

category: general [glöplog]
 
Hi yall,

I'm looking for m68k assembler sources so I can figure out the addressing modes by example -- the datasheet I have is completely unreadable.

Can anyone point me to some m68k asm stuff?

Tnx!
added on the 2009-11-18 15:24:12 by trc_wm trc_wm
so you can't read the notation out of the normal normal reference manual: http://www.freescale.com/files/archives/doc/ref_manual/M68000PRM.pdf?
Don't know where you find sources utilizing each and very addressing mode ;)
added on the 2009-11-18 15:45:43 by Psycho Psycho
I'm trying to compile:

bset.b #7,($80000).W

which should be allowed on a Coldfire V1 MCU (MCF51JM128).

However, GNU AS keeps giving me: operands mismatch. -- rather unhelpful as it almost always generates this error whenever something is wrong. To make matters worse, AS does not implement the Motorola syntax directly but uses the AT&T syntax in odd places.

@Psycho: So no; the normal normal reference manual is not helpful.
@StingRay: tnx, but that syntax doesn't seem to work...

added on the 2009-11-18 16:02:36 by trc_wm trc_wm
Then it's not really m68k asm, although it may be some assembly language for m68k ;)
<more than 16 bits>.W looks wrong btw..
added on the 2009-11-18 16:46:01 by Psycho Psycho
coldfire has no .b
added on the 2009-11-18 16:47:15 by krabob krabob
actually * as far as I remember *, coldfire's asm lacks a looot of 68k instructions and adressing mode ( can't run 68k code, needs re-compilation of it, the reason why it was never used as accelerators on amiga & st ).
added on the 2009-11-18 16:51:10 by krabob krabob
I know this french site: http://coldfire.zewan.com/cf/
where it is told how to translate most incompatible 68k ops for coldfire:
kind of:

add.b <ea>,Dn

becomes...

[1] move.l Dn,temp
[2] clr.l temp+4
[3] move.l <ea>,Dn
[4] add.l Dn,temp+3
[5] move.w ccr,Dn
[6] move.w Dn,ccr_temp
[7] move.l temp,Dn
[8] move.w ccr_temp,ccr

... because cf can only manage 32bits arithmetics.
added on the 2009-11-18 17:06:08 by krabob krabob
oh yeah, and the CCR acts differently on cf and 68k.
added on the 2009-11-18 17:09:33 by krabob krabob
Quote:
allmodesnew.asm


damn, there's a lot of modes in there that I didn't know/use back in the day where I coded m68k asm.
Ok, found the reason:

"For BTST, BSET, BCLR and BCHG, if the source operand is a static bit number, the destination cannot be Indexed or Absolute memory."

Although, IMO, this is not clear from the Coldfire instruction reference.
added on the 2009-11-18 17:16:15 by trc_wm trc_wm
PortAsm/68K did a great job to help me fixing m68k code for Coldfire.
added on the 2009-11-18 21:56:10 by pmdata pmdata

login

Go to top