Page 1 of 1

MC 68020 instructions

Posted: 23 Aug 2025 23:36
by pixelpusher
Hi,

I tried - using PASM - to assemble an 68020 instruction

move.l $800(a0,d5.w*4),d6

However it looks like PASM can't handle this (and complains about an offset being out of range). Does anyone have an alternative 68020+ assembler running and knows what the hex code (six bytes) for this instruction is, or has an instruction encoding scheme for this?

I tried chatgpt (a disaster with dozens of wrong and always changing answers) and vasm (which doesn't seem to handle this either - at least not on regular TOS, even with 68030 underneath). NXPs documentation doesn't seem to list it directly either.

Re: MC 68020 instructions

Posted: 23 Aug 2025 23:41
by chronicthehedgehog
Did Motorola syntax change for the new addressing modes - with everything in brackets?

e.g. (d,An,Rm.Size*Scale)

Perhaps it will parse that correctly

Re: MC 68020 instructions

Posted: 24 Aug 2025 00:08
by mrbombermillzy
pixelpusher wrote: 23 Aug 2025 23:36 Hi,

I tried - using PASM - to assemble an 68020 instruction

move.l $800(a0,d5.w*4),d6

However it looks like PASM can't handle this (and complains about an offset being out of range).
I may be mistaken, but I believe thats because it is out of range.

You seem to be using the 'address register indirect with offset and index' addressing mode, in which case, the Motorola syntactic makeup is:

d(An,Xi)

...and d only having an 8 bit signed offset range (so -127 to +127) would put the value of $800 out of range.

Re: MC 68020 instructions

Posted: 24 Aug 2025 00:17
by pixelpusher
chronicthehedgehog wrote: 23 Aug 2025 23:41 Did Motorola syntax change for the new addressing modes - with everything in brackets?

e.g. (d,An,Rm.Size*Scale)

Perhaps it will parse that correctly
That one works (and to the other answer, d > 128 is exactly what the newer ops allow)

Thank you!

Re: MC 68020 instructions

Posted: 24 Aug 2025 00:49
by chronicthehedgehog
pixelpusher wrote: 24 Aug 2025 00:17
chronicthehedgehog wrote: 23 Aug 2025 23:41 Did Motorola syntax change for the new addressing modes - with everything in brackets?

e.g. (d,An,Rm.Size*Scale)

Perhaps it will parse that correctly
That one works (and to the other answer, d > 128 is exactly what the newer ops allow)

Thank you!
:dualthumbup: