Can all registered uses please login, even just for a few minutes..
It helps build a picture where our "good traffic" is coming from..
Thanks :)

MC 68020 instructions

General Discussion, STOS.
Post Reply
pixelpusher
Posts: 144
Joined: Fri Dec 27, 2019 9:01 pm

MC 68020 instructions

Post 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.
User avatar
chronicthehedgehog
Site sponsor
Site sponsor
Posts: 384
Joined: Sun May 08, 2022 6:11 pm
Location: The Midlands
Contact:

Re: MC 68020 instructions

Post 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
User avatar
mrbombermillzy
Moderator
Moderator
Posts: 2347
Joined: Sun Jun 03, 2018 7:37 pm

Re: MC 68020 instructions

Post by mrbombermillzy »

pixelpusher wrote: Sat Aug 23, 2025 11:36 pm 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.
pixelpusher
Posts: 144
Joined: Fri Dec 27, 2019 9:01 pm

Re: MC 68020 instructions

Post by pixelpusher »

chronicthehedgehog wrote: Sat Aug 23, 2025 11:41 pm 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!
User avatar
chronicthehedgehog
Site sponsor
Site sponsor
Posts: 384
Joined: Sun May 08, 2022 6:11 pm
Location: The Midlands
Contact:

Re: MC 68020 instructions

Post by chronicthehedgehog »

pixelpusher wrote: Sun Aug 24, 2025 12:17 am
chronicthehedgehog wrote: Sat Aug 23, 2025 11:41 pm 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:
Post Reply

Return to “SOFTWARE”