FireBee Diary 2: from MC68000 to ColdFire
To get volksForth running on the FireBee, the machine code instructions that are available on the MC68000, but not in the ColdFire CPU need to be replaced with a series of instructions that perform the same action.
I found the "Digger V8" dissassembler on Heenk Robbers webpage along with the AHCC C-Compiler. The Digger is able to disassemble both ColdFire and MC68000, and it can switch between the two CPU types with a simple switch. Finding instructions that cannot be executed on the ColdFire is now only a matter of switching the CPU type and watching the assembler code change.
The Digger package also contains a list of all M68000 assembler instructions, with information on the instructions available on each CPU type (MC68000, MC68020, MC68030, ColdFire …).
I made the table below as a quick look-up tool to find MC68000 instructions that need replacement on the ColdFire (this table is still work in progress, the column "workaround" will be filled while I work on the ColdFire porting project):
|ori -> ccr||OR immediate to CCR|
|ori -> sr||OR immediate to Status Register|
|andi -> ccr||AND immediate to CCR|
|andi -> sr||AND immediate to Status Register|
|eori -> ccr||EOR immediate to CCR|
|eori -> sr||EOR immediate to Status Register|
|movep||Move peripheral data|
|trapv||Trap on Overflow|
|rtr||Return and restore condition codes|
|chk.w||Check register against bounds|
|dbcc||Test condition, decrement and branch|
|sbcd Dx,Dy||Subtract decimal with extend|
|sbcd -(Ax),-(Ay)||Subtract decimal with extend|
|subx -(Ax),-(Ay)||Subtract extended|
|abcd Dx,Dy||Add decimal with extend|
|abcd -(Ax),-(Ay)||Exchange registers|
|exg Dx,Dy||Exchange registers|
|exg Ax,Ay||Exchange registers|
|exg Dx,Ay||Exchange registers|
|addx -(Ax),-(Ay)||Add extended|
|roxl||Rotate left with extend|
|roxr||Rotate right with extend|
|asl||Arithmetic shift left|
|asr||Arithmetic shift right|
|lsl||Logical shift left|
|lsr||Logical shoft right|
Firebee Developer Diary 1
On the last day of 2012, Stefan (aka Beetle) brought me the FireBee machine that we both share. I've been programming Atari 8bit machines for over 25 years now, but this is the first time that I enter the realm of the Atari ST family with a 68K or now ColdFire. There is much to learn.
My FireBee Development setup
The FireBee is a modern incarnation of the Atari ST computer line, including Ethernet, USB, CF-Card and SD-Card interfaces. A modern computer. And it still runs Atari TOS programs.