Porting some code pieces written over the last two decades on a small CF part (mcf52211) and moaning. I often set or clear carry upon exiting a call to indicate if the status index returned in d0 is meaningful. Clearing it without damaging registers is easy, say just tst.l d0 . But setting it is a madness, no way to directly manipulate the ccr, one must do say push d0 moveq #1,d0 to have the C bit set move.w d0,ccr that's what we were after pull d0
Then consider that unlike with 68k.cpu32 push and pull here are two opcodes each: push: subq.l #4,a7 move.l d0,a7
pull: movem.l (a7),d0 addq.l #4,a7
I looked with some hope at NEG etc. opcodes which I remembered were setting C, but that has been on the 6809, not on 68k... (beats me how I remember that over the decades but I do, unless I am wrong of course :-) ). Such a madness, I am glad I opted for power some 10-12 years ago to move to from cpu32, that CF part is not bad at all really but the instruction set is somewhat crippled. Not all bad, just some small but key things missing.
Dimiter
------------------------------------------------------ Dimiter Popoff Transgalactic Instruments
------------------------------------------------------